http://www.emgu.com
This function is an extended version of cvInitUndistortMap. That is, in addition to the correction of lens distortion, the function can also apply arbitrary perspective transformation R and finally it can scale and shift the image according to the new camera matrix

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static void cvInitUndistortRectifyMap(
	IntPtr cameraMatrix,
	IntPtr distCoeffs,
	IntPtr R,
	IntPtr newCameraMatrix,
	IntPtr mapx,
	IntPtr mapy
)
Visual Basic
Public Shared Sub cvInitUndistortRectifyMap ( 
	cameraMatrix As IntPtr,
	distCoeffs As IntPtr,
	R As IntPtr,
	newCameraMatrix As IntPtr,
	mapx As IntPtr,
	mapy As IntPtr
)
Visual C++
public:
static void cvInitUndistortRectifyMap(
	IntPtr cameraMatrix, 
	IntPtr distCoeffs, 
	IntPtr R, 
	IntPtr newCameraMatrix, 
	IntPtr mapx, 
	IntPtr mapy
)
F#
static member cvInitUndistortRectifyMap : 
        cameraMatrix : IntPtr * 
        distCoeffs : IntPtr * 
        R : IntPtr * 
        newCameraMatrix : IntPtr * 
        mapx : IntPtr * 
        mapy : IntPtr -> unit 

Parameters

cameraMatrix
Type: System..::..IntPtr
The camera matrix A=[fx 0 cx; 0 fy cy; 0 0 1]
distCoeffs
Type: System..::..IntPtr
The vector of distortion coefficients, 4x1, 1x4, 5x1 or 1x5
R
Type: System..::..IntPtr
The rectification transformation in object space (3x3 matrix). R1 or R2, computed by cvStereoRectify can be passed here. If the parameter is IntPtr.Zero, the identity matrix is used
newCameraMatrix
Type: System..::..IntPtr
The new camera matrix A'=[fx' 0 cx'; 0 fy' cy'; 0 0 1]
mapx
Type: System..::..IntPtr
The output array of x-coordinates of the map
mapy
Type: System..::..IntPtr
The output array of y-coordinates of the map

See Also