我正在OpenCV中开发一个应用程序,在Windows上,以下代码是有效的,并且编译/工作:
/* Calculate the transformation points */
std::vector<cv::Point2f> img1;
std::vector<cv::Point2f> img2;
for( int i = 0; i < good_matches.size(); i++ ) {
img1.push_back( keypoints_imageOne[ good_matches[i].queryIdx ].pt );
img2.push_back( keypoints_imageTwo[ good_matches[i].trainIdx ].pt );
}
/* Generate the homogonous matrix from the transformation points */
cv::Mat H = cv::findHomography(img1, img2, CV_RANSAC);
Run Code Online (Sandbox Code Playgroud)
但是,当我切换到我的Mac或Linux盒子时,我得到一个错误,说没有参数的函数原型(因为函数原型需要cv::Mat代替std::vector< cv::Point2f >)
所以我的问题是,我应该如何/应该如何std::vector < cv::Point2f >进行,cv::Mat或者我应该如何去做呢?