此篇随笔主要参考OpenCV 3.0.0的官方文档翻译而来,主要用作理解OpenCV对鱼眼相机的标定、图像校正、3D重建功能的理解。
版权所有,转载请注明出处~
参考链接:https://docs.opencv.org/3.0.0/db/d58/group__calib3d__fisheye.html#gad626a78de2b1dae7489e152a5a5a89e1
---------------------------------------------------------------------
Namespace
1 cv::fisheye
枚举类型
1 enum { 2 cv::fisheye::CALIB_USE_INTRINSIC_GUESS = 1, 3 cv::fisheye::CALIB_RECOMPUTE_EXTRINSIC = 2, 4 cv::fisheye::CALIB_CHECK_COND = 4, 5 cv::fisheye::CALIB_FIX_SKEW = 8, 6 cv::fisheye::CALIB_FIX_K1 = 16, 7 cv::fisheye::CALIB_FIX_K2 = 32, 8 cv::fisheye::CALIB_FIX_K3 = 64, 9 cv::fisheye::CALIB_FIX_K4 = 128, 10 cv::fisheye::CALIB_FIX_INTRINSIC = 256 11 }
函数
//执行相机标定
double cv::fisheye::calibrate (InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, const Size &image_size, InputOutputArray K, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, int flags=0, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 100, DBL_EPSILON))
//使用鱼眼模型为2D点叠加畸变效果
void cv::fisheye::distortPoints (InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha=0)
//为去畸变和图像校正估计新的相机矩阵
void cv::fisheye::estimateNewCameraMatrixForUndistortRectify (InputArray K, InputArray D, const Size &image_size, InputArray R, OutputArray P, double balance=0.0, const Size &new_size=Size(), double fov_scale=1.0)
//通过cv::remap()计算去畸变和图像校正的映射,如果D为空,则使用零失真;如果R为空,则使用单位矩阵
void cv::fisheye::initUndistortRectifyMap (InputArray K, InputArray D, InputArray R, InputArray P, const cv::Size &size, int m1type, OutputArray map1, OutputArray map2)
//使用鱼眼模型映射点
void cv::fisheye::projectPoints (InputArray objectPoints, OutputArray imagePoints, const Affine3d &affine, InputArray K, InputArray D, double alpha=