0
最近我在開發使用OpenCV
的android應用程序。現在我遇到一個問題:如何將List <MatofPoint>轉換爲opencv中的Mat?
Imgproc.findContours(grayMat, contours1, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);
此功能後,我想打電話給Imgproc.MatchShapes
檢測2個圖像是否匹配。但是在Java版本下,MatchShapes需要Mat類型的參數。
如何將List<MatOfPoint>
轉換爲Mat?
不知道Java,但contours1應該是某事像ListOfListOfPoints(因爲每個輪廓應該是點的列表) – Micka
,你不需要從看到[MatOfPoint類擴展墊] [1] [1]:http://stackoverflow.com/questions/12380594/opencv-android-convert-matofpoint-to-mat – Sinned