http://www.emgu.com
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.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static void cvUndistort2(
	IntPtr src,
	IntPtr dst,
	IntPtr intrinsicMatrix,
	IntPtr distortionCoeffs,
	IntPtr newIntrinsicMatrix
)
Visual Basic
Public Shared Sub cvUndistort2 ( 
	src As IntPtr,
	dst As IntPtr,
	intrinsicMatrix As IntPtr,
	distortionCoeffs As IntPtr,
	newIntrinsicMatrix As IntPtr
)
Visual C++
public:
static void cvUndistort2(
	IntPtr src, 
	IntPtr dst, 
	IntPtr intrinsicMatrix, 
	IntPtr distortionCoeffs, 
	IntPtr newIntrinsicMatrix
)
F#
static member cvUndistort2 : 
        src : IntPtr * 
        dst : IntPtr * 
        intrinsicMatrix : IntPtr * 
        distortionCoeffs : IntPtr * 
        newIntrinsicMatrix : IntPtr -> unit 

Parameters

src
Type: System..::..IntPtr
The input (distorted) image
dst
Type: System..::..IntPtr
The output (corrected) image
intrinsicMatrix
Type: System..::..IntPtr
The camera matrix (A) [fx 0 cx; 0 fy cy; 0 0 1].
distortionCoeffs
Type: System..::..IntPtr
The vector of distortion coefficients, 4x1 or 1x4 [k1, k2, p1, p2].
newIntrinsicMatrix
Type: System..::..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

See Also