Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Camera Calibration And 3D Reconstruction » cvGetOptimalNewCameraMatrix

cvGetOptimalNewCameraMatrix


Computes the new camera matrix based on the free scaling parameter.

Name Type Range Description
inCameraMatrix Matrix Old camera matrix
inDistCoeffs Matrix Coefficients of distortion
inImageWidth Integer Width of image for old camera matrix
inImageHeight Integer Height of image for old camera matrix
inAlpha Real 0.0 - 1.0 Scaling parameter
inNewImageWidth Integer Width of images for new camera matrix
inNewImageHeight Integer Height of images for new camera matrix
outNewCameraMatrix Matrix New optimal camera matrix
outValidPixROI Region Region that will outline all-good-pixels in the undistorted image

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError inCameraMatrix must be a 3x3 matrix in cvGetOptimalNewCameraMatrix.
DomainError Supported matrix sizes for inDistCoeffs are: 1x4, 4x1, 1x5, 5x1, 1x8, 8x1, 1x12, 12x1 in cvGetOptimalNewCameraMatrix.

Complexity Level

This filter is available on Basic Complexity Level.