InitUndistortMap矫正函数

来源:互联网 发布:java笔记 编辑:程序博客网 时间:2024/04/27 15:01

InitUndistortMap

计算形变和非形变图像的对应(map)

void cvInitUndistortMap( const CvMat* intrinsic_matrix,                         const CvMat* distortion_coeffs,                         CvArr* mapx, CvArr* mapy );
intrinsic_matrix
摄像机内参数矩阵(A) [fx 0 cx; 0 fy cy; 0 0 1].
distortion_coeffs
形变系数向量[k1, k2, p1, p2],大小为4x1或者1x4。
mapx
x坐标的对应矩阵。
mapy
y坐标的对应矩阵。

函数cvInitUndistortMap预先计算非形变对应-正确图像的每个像素在形变图像里的坐标。这个对应可以传递给cvRemap函数(跟输入和输出图像一起)。


原创粉丝点击