查看opencv的版本:pkg-config --modversion opencv
opencv官方使用手册
根据配对点的像素坐标(齐次坐标)求基础矩阵F,若配对点是归一化坐标,则求得是本质矩阵E
Mat findFundamentalMat(InputArray points1, InputArray points2, int method=FM_RANSAC, double param1=3., double
param2=0.99, OutputArray mask=noArray() )
使用RANSAC算法根据2d-3d点对,计算出物体位姿,返回 T w c T^c_w Twc(使坐标点从世界坐标系旋转到相机坐标系)
void solvePnPRansac(InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray
distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int iterationsCount=100, float
reprojectionError=8.0, int minInliersCount=100, OutputArray inliers=noArray(), int flags=ITERATIVE )
clone 是完全的深拷贝,在内存中申请新的空间;copyTo 也是深拷贝,但是否申请新的内存空间,取决于dst矩阵头中的大小信息是否与src一至,若一致则只深拷贝并覆盖掉原数据,并不申请新的空间,否则先申请空间后再进行拷贝.
使用fast算法检测角点
void cv::FAST ( InputArray image, std::vector< KeyPoint > & keypoints, int threshold, bool nonmaxSuppression = true )
角点检测
void cv::goodFeaturesToTrack(cv::InputArray image, cv::OutputArray corners, int maxCorners, double qualityLevel,
double minDistance, cv::InputArray mask = noArray(), int blockSize = 3, bool useHarrisDetector = false,double k = 0.04 );
src.convertTo(dst, type, scale, shift)
Mat::eye (int rows, int cols, int type)
//提取第1到3列(不包括3)
Mat B = A(Range::all(),Range(1,3));
void triangulatePoints(InputArray projMatr1, InputArray projMatr2, InputArray projPoints1, InputArray projPoints2, OutputArray points4D)