CvInvokeGetOptimalNewCameraMatrix Method |
http://www.emgu.com
Returns the new camera matrix based on the free scaling parameter.
Namespace: Emgu.CVAssembly: 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
)
Public Shared Function GetOptimalNewCameraMatrix (
cameraMatrix As IInputArray,
distCoeffs As IInputArray,
imageSize As Size,
alpha As Double,
newImgSize As Size,
ByRef validPixROI As Rectangle,
Optional centerPrincipalPoint As Boolean = false
) As Mat
public:
static Mat^ GetOptimalNewCameraMatrix(
IInputArray^ cameraMatrix,
IInputArray^ distCoeffs,
Size imageSize,
double alpha,
Size newImgSize,
Rectangle% validPixROI,
bool centerPrincipalPoint = false
)
static member GetOptimalNewCameraMatrix :
cameraMatrix : IInputArray *
distCoeffs : IInputArray *
imageSize : Size *
alpha : float *
newImgSize : Size *
validPixROI : Rectangle byref *
?centerPrincipalPoint : bool
(* Defaults:
let _centerPrincipalPoint = defaultArg centerPrincipalPoint false
*)
-> Mat
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:
MatThe new camera matrix based on the free scaling parameter.
See Also