Click or drag to resize
CvInvokeGetOptimalNewCameraMatrix Method
http://www.emgu.com
Returns the new camera matrix based on the free scaling parameter.

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.2.0.2682 (3.2.0.2682)
Syntax
public static Mat GetOptimalNewCameraMatrix(
	IInputArray cameraMatrix,
	IInputArray distCoeffs,
	Size imageSize,
	double alpha,
	Size newImgSize,
	ref Rectangle validPixROI,
	bool centerPrincipalPoint = false
)

Parameters

cameraMatrix
Type: Emgu.CVIInputArray
Input camera matrix.
distCoeffs
Type: Emgu.CVIInputArray
Input vector of distortion coefficients (k1,k2,p1,p2[,k3[,k4,k5,k6[,s1,s2,s3,s4[,?x,?y]]]]) of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
imageSize
Type: System.DrawingSize
Original image size.
alpha
Type: SystemDouble
Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image).
newImgSize
Type: System.DrawingSize
Image size after rectification. By default,it is set to imageSize .
validPixROI
Type: System.DrawingRectangle
output rectangle that outlines all-good-pixels region in the undistorted image.
centerPrincipalPoint (Optional)
Type: SystemBoolean
indicates whether in the new camera matrix the principal point should be at the image center or not. By default, the principal point is chosen to best fit a subset of the source image (determined by alpha) to the corrected image.

Return Value

Type: Mat
The new camera matrix based on the free scaling parameter.
See Also