Transforms the image to compensate radial and tangential lens distortion. The camera matrix and distortion parameters can be determined using cvCalibrateCamera2. For every pixel in the output image the function computes coordinates of the corresponding location in the input image using the formulae in the section beginning. Then, the pixel value is computed using bilinear interpolation. If the resolution of images is different from what was used at the calibration stage, fx, fy, cx and cy need to be adjusted appropriately, while the distortion coefficients remain the same.
Namespace: Emgu.CVAssembly: Emgu.CV (in Emgu.CV.dll) Version: 2.2.1.1150 (2.2.1.1150)
Syntax
C# | Visual Basic | Visual C++ |
Parameters
- src
- IntPtr
The input (distorted) image
- dst
- IntPtr
The output (corrected) image
- intrinsicMatrix
- IntPtr
The camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1].
- distortionCoeffs
- IntPtr
The vector of distortion coefficients, 4x1 or 1x4 [k1, k2, p1, p2].
- newIntrinsicMatrix
- IntPtr
Camera matrix of the distorted image. By default it is the same as cameraMatrix, but you may additionally scale and shift the result by using some different matrix