[问题] opencv findHomography

楼主: a462428 (技伟)   2014-12-03 13:46:57
开发平台(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);
楼主: a462428 (技伟)   2014-12-04 16:13:00
已解决

Links booklink

Contact Us: admin [ a t ] ucptt.com