Fisheye


Author V. C. Mohan
Date 16 oct 2021

This plugin corrects fish eye type distortions in an image that result in due to camera lens projecting image on to a flat film or sensor array. Distortion from use of very wide angle lens is termed fisheye For fisheye processing "Altera" Manipal dot net in their 2008 paper was considered. In the test mode a distorted matrix of dots is overlain on the specified frame. These will be along lines which will be corrected. Best fit parameters can be arrived at.

Five methods of processing are available. These are:-
. 1. Correction of fish eye distortion with Orthoganal formulation output
. 2. Correction of fish eye distortion with Linear formulation output
. 3. Correction of fish eye distortion with Equi Solid formulation output
. 4. Correction of fish eye distortion with Panoramic formulation output
. 5. Correction of fish eye distortion with Radial formulation

Input formats RGB, Y or YUV444 (no subsampling)only are acceptable.All bit depths are handled. This function is Thread safe. MT_NICE_FILTER

This function operates in two modes decided automatically. If the fisheye image is fully within the input frame, then the output frame will be a square encompassing the corrected image centrally. Additionally a parameter sqr if set to true, the image will be converted to fit the square fully.
In case the input Fisheye image is present only partially in the frame, then the output frame size will be same as input. Adding borders may be required to get the corrected image fully.

The parameters to be specified mainly depend upon the lens of the camera, field of view of lens and size of image. To decide upon the coordinates of the origin and radius of the Fisheye image, help of the function Circles of this plugin may be needed.

Details of parameters
Description Name Type Limits Default
Input clip clip RGB or planar YUV444 or Y format only none
image center x coordinate xo int can be outside frame. frame width / 2
image center y coordinate yo int can be outside frame. frame height / 2
type of interpolation q int 1. manipal scheme, 2. bilinear, 3. bicubic and 4. lanczos 6x6. 1
whether in test mode test Boolean true for test, false for normal false
density of dots in test mode dots Int 1 to 4 2
type of correction scheme method Int 1 to 5 3
whether output to be fitted to square Applicable only if Fisheye image is fully within input frame sqr Boolean true , false true
dim factor for ease of viewing over the image in test mode dim float between 0.0 and 1.0 0.5
Field of view of lens in degrees fov float between 40 and 170 120
refraction coefficient rix float positive value between 1.0 and 1.5 1.15
radius of fisheye image frad integer between 64 and value to ensure at least part of fish is in frame frame width/ 2

To my index page down loadmovePlus plugin To Avisynth