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: (


public Image<TColor, TDepth> Undistort<TColor, TDepth>(
	Image<TColor, TDepth> src
where TColor : struct, new(), IColor
where TDepth : new()
Visual Basic
Public Function Undistort(Of TColor As {Structure, New, IColor}, TDepth As New) ( _
	src As Image(Of TColor, TDepth) _
) As Image(Of TColor, TDepth)
Visual C++
generic<typename TColor, typename TDepth>
where TColor : value class, gcnew(), IColor
where TDepth : gcnew()
Image<TColor, TDepth>^ Undistort(
	Image<TColor, TDepth>^ src


Type: Emgu.CV..::..Image<(Of <(<'TColor, TDepth>)>)>
The distorted image

Type Parameters

The color type of the image
The depth of the image

Return Value

The corrected image

See Also