List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Imgproc.findContours(gray0, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
- Core.drawContours(gray0, contours, -1, new Scalar(0));
+ Imgproc.drawContours(gray0, contours, -1, new Scalar(0));
assertEquals(0, Core.countNonZero(gray0));
}
List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Imgproc.findContours(gray0, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
- Core.drawContours(gray0, contours, -1, new Scalar(0), Core.FILLED);
+ Imgproc.drawContours(gray0, contours, -1, new Scalar(0), Core.FILLED);
assertEquals(0, Core.countNonZero(gray0));
}
mDetector.process(mRgba);
List<MatOfPoint> contours = mDetector.getContours();
Log.e(TAG, "Contours count: " + contours.size());
- Core.drawContours(mRgba, contours, -1, CONTOUR_COLOR);
+ Imgproc.drawContours(mRgba, contours, -1, CONTOUR_COLOR);
Mat colorLabel = mRgba.submat(2, 34, 2, 34);
colorLabel.setTo(mBlobColorRgba);