Template Function aslam::common::getOptimalNewCameraMatrix

Function Documentation

template<typename DerivedCameraType>
Eigen::Matrix3d aslam::common::getOptimalNewCameraMatrix(const DerivedCameraType &input_camera, double alpha, double scale, bool undistort_to_pinhole)

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


  • [in] input_camera – Aslam camera geometry (distortion and intrinsics used)

  • [in] scale – Output image size scaling parameter wrt. to input image size.

  • [in] alpha – Free scaling parameter between 0 (when all the pixels in the undistorted image will be valid) and 1 (when all the source image pixels will be retained in the undistorted image)

  • [in] undistort_to_pinhole – Undistort image to a pinhole projection (remove distortion and projection effects)


The output camera matrix.