Back to Aurora Vision Studio website

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

cvGetOptimalNewCameraMatrix


Module: OpenCV

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

Name Type Range Description
Input value inCameraMatrix Matrix Old camera matrix
Input value inDistCoeffs Matrix Coefficients of distortion
Input value inImageWidth Integer Width of image for old camera matrix
Input value inImageHeight Integer Height of image for old camera matrix
Input value inAlpha Real 0.0 - 1.0 Scaling parameter
Input value inNewImageWidth Integer Width of images for new camera matrix
Input value inNewImageHeight Integer Height of images for new camera matrix
Output value outNewCameraMatrix Matrix New optimal camera matrix
Output value 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.