开发平台(Platform): (Ex: VC++, GCC, Linux, ...)
问题:
findHomography 喂入四组点 可以解出homography matrix
不过编译过了 但执行到以下code箭头那行时就错了@@
想请问问题出在哪 感谢!!!!
std::vector<cv::Point2f> queryPoints;
std::vector<cv::Point2f> trainPoints;
queryPoints.push_back(cvPoint(0,0));
queryPoints.push_back(cvPoint(1,0));
queryPoints.push_back(cvPoint(0,1));
queryPoints.push_back(cvPoint(1,1));
trainPoints.push_back(cvPoint(2,2));
trainPoints.push_back(cvPoint(2,3));
trainPoints.push_back(cvPoint(3,2));
trainPoints.push_back(cvPoint(3,3));
std::vector<uchar> inliers(queryPoints.size(),0);
→ Mat homography =
cv::findHomography(queryPoints,trainPoints,CV_RANSAC,3,inliers);