5
는
나는 윈도우을 OpenCV의에서 응용 프로그램을 개발하고, 에하고있는 다음 코드는 유효하며,/작동 컴파일 :OpenCV의 표준 : : 벡터 <이력서 :: Point2f> :: 매트
/* 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);
내 맥 또는 리눅스 상자 중 하나에 전환 할 때, 나는 (함수 프로토 타입은 std::vector<cv::Point2f>
대신에 cv::Mat
을 필요로)
그래서 인수에 대한 함수 프로토 타입이없는 없다는 오류가 내 질문이 있습니다. std::vector <cv::Point2f>
에서 cv::Mat
으로 전송하려면 어떻게해야합니까? 그렇지 않으면 어떻게해야합니까?
감사합니다, 단지 업데이트 또한 매트 (img1로)에 캐스팅은 업데이트 전에 오류를 제거했습니다. :디 – krslynx