cv.fisheyeUndistortImage - MATLAB File Help |
Transforms an image to compensate for fisheye lens distortion
undistorted = cv.fisheyeUndistortImage(distorted, K, D)
undistorted = cv.fisheyeUndistortImage(..., 'OptionName',optionValue, ...)
K = [fx 0 cx; 0 fy cy; 0 0 1]
.[k1,k2,k3,k4]
.[w,h]
. By default, it is
set to input image size.The function transforms an image to compensate radial and tangential lens distortion.
The function is simply a combination of cv.fisheyeInitUndistortRectifyMap
(with unity R
) and cv.remap (with bilinear interpolation). See the former
function for details of the transformation being performed.
See below the results of cv.fisheyeUndistortImage:
[k1, k2, k3, k4, k5, k6]
of distortion were optimized under
calibration)[k1, k2, k3, k4]
of fisheye distortion were
optimized under calibration)Pictures a) and b) almost the same. But if we consider points of image located far from the center of image, we can notice that on image a) these points are distorted.