[問題] opencv findHomography

看板C_and_CPP (C/C++)作者 (weiwei)時間11年前 (2014/12/03 13:47), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
開發平台(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); -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.162.211.199 ※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1417585620.A.986.html

12/04 16:13, , 1F
已解決
12/04 16:13, 1F
文章代碼(AID): #1KVgFKc6 (C_and_CPP)
文章代碼(AID): #1KVgFKc6 (C_and_CPP)