OpenCV之Geometric Image Transformations(二)

1.convertMaps

C++:void convertMaps(InputArray map1, InputArray map2, OutputArray dstmap1, OutputArray dstmap2, int dstmap1type, bool nninterpolation=false );

将图像变换图从一种表示转换为另一种表示。

2.getAffineTransform

C++: Mat getAffineTransform(InputArray src, InputArray dst)
C++: Mat getAffineTransform(const Point2f src[], const Point2f dst[])

根据三对对应点计算仿射变换。

3.getPerspectiveTransform

C++: Mat getPerspectiveTransform(InputArray src, InputArray dst)

C++: Mat getPerspectiveTransform(const Point2f src[], const Point2f dst[])
根据四对对应点计算透视变换。
4.getRectSubPix
C++: void getRectSubPix(InputArray image, Size patchSize, Point2f center, OutputArray patch, int patchType=-1 )
以亚像素精度从图像中检索像素矩形。
5.getRotationMatrix2D
C++: Mat getRotationMatrix2D(Point2f center, double angle, double scale)
计算2D旋转的仿射矩阵。
6.invertAffineTransform
C++: void invertAffineTransform(InputArray M, OutputArray iM)
进行仿射变换。
7.LinearPolar
C: void cvLinearPolar(const CvArr* src, CvArr* dst, CvPoint2D32f center, double maxRadius, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS )

将图像重新映射到极地空间。

8.LogPolar

C: void cvLogPolar(const CvArr* src, CvArr* dst, CvPoint2D32f center, double M, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS )

将图像重新映射到对数极性空间。 

9.remap

C++: void remap(InputArray src, OutputArray dst, InputArray map1, InputArray map2, int interpolation, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar())

C: void cvRemap(const CvArr* src, CvArr* dst, const CvArr* mapx, const CvArr* mapy, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
对图像使用通用的几何变换。
10.resize
C++: void resize(InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR )
调整图像大小。
11.warpAffine
C++: void warpAffine(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar())
C: void cvWarpAffine(const CvArr* src, CvArr* dst, const CvMat* map_matrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
C: void cvGetQuadrangleSubPix(const CvArr* src, CvArr* dst, const CvMat* map_matrix)
对图像应用仿射变换。
12.warpPerspective
C++: void warpPerspective(InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar())
C: void cvWarpPerspective(const CvArr* src, CvArr* dst, const CvMat* map_matrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
将透视转换应用于图像。
13.initUndistortRectifyMap
C++: void initUndistortRectifyMap(InputArray cameraMatrix, InputArray distCoeffs, InputArray R, InputArray newCameraMatrix, Size size, int m1type, OutputArray map1, OutputArray map2)
C: void cvInitUndistortRectifyMap(const CvMat* camera_matrix, const CvMat* dist_coeffs, const CvMat* R, const CvMat* new_camera_matrix, CvArr* mapx, CvArr* mapy)
C: void cvInitUndistortMap(const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvArr* mapx, CvArr* mapy)
计算不失真和整流变换图。
 
14.getDefaultNewCameraMatrix
C++: Mat getDefaultNewCameraMatrix(InputArray cameraMatrix, Size imgsize=Size(), bool centerPrincipalPoint=false )
返回默认的新相机矩阵。
15.undistort
C++: void undistort(InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray newCameraMatrix=noArray() )
C: void cvUndistort2(const CvArr* src, CvArr* dst, const CvMat* camera_matrix, const CvMat* distortion_coeffs, const CvMat* new_camera_matrix=0 )

变换图像以补偿镜头失真。

16.undistortPoints

C++: void undistortPoints(InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray R=noArray(), InputArray P=noArray())
C: void cvUndistortPoints(const CvMat* src, CvMat* dst, const CvMat* camera_matrix, const CvMat* dist_coeffs, const CvMat* R=0, const CvMat* P=0 )
根据观察到的点坐标计算理想点坐标。
 
 
posted @ 2020-11-21 11:58  vkkkkkkkkkk  阅读(274)  评论(0编辑  收藏  举报