Template Function aslam::common::buildUndistortMap

Function Documentation

template<typename InputDerivedCameraType, typename OutputDerivedCameraType>
void aslam::common::buildUndistortMap(const InputDerivedCameraType &input_camera, const OutputDerivedCameraType &output_camera, int map_type, cv::OutputArray map_u, cv::OutputArray map_v)

Calculates the undistortion maps for the given camera geometries.

Parameters
  • input_camera[in] Input camera geometry

  • output_camera_matrix[in] Desired output camera matrix (see getOptimalNewCameraMatrix)

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

  • map_type[in] Type of the output maps. (cv::CV_32FC1, cv::CV_32FC2 or cv::CV_16SC2) Use cv::CV_16SC2 if you don’t know what to choose. (fastest fixed-point)

  • map_u[out] Map that transforms u-coordinates from distorted to undistorted image plane.

  • map_v[out] Map that transforms v-coordinates from distorted to undistorted image plane.