OpenCV里支持很多边缘提取的办法,可是如何在一幅图像里得到轮廓区域的参数呢,这就需要用到findContours函数,这个函数在OpenCV4Android的原型为: void org.opencv.imgproc.Imgproc.findContours(Mat image, List<MatOfPoint> contours, Mat hierarchy, int mode, int method) image参数为已经二值化的原图 contours参数为检测的轮廓数组,每一个轮廓用一…
http://stackoverflow.com/questions/29491669/real-time-paper-sheet-detection-using-opencv-in-android/29492699#29492699 at srcImg; //you may want to apply Canny or some threshold before searching for contours List<MatOfPoint> contours = new ArrayList&…