Commit eb4ce67d authored by Andrey Pavlenko's avatar Andrey Pavlenko

fixing Java test and sample after moving drawContours() from Imgproc to Core

parent 40e8d08e
...@@ -678,7 +678,7 @@ public class ImgprocTest extends OpenCVTestCase { ...@@ -678,7 +678,7 @@ public class ImgprocTest extends OpenCVTestCase {
List<MatOfPoint> contours = new ArrayList<MatOfPoint>(); List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Imgproc.findContours(gray0, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE); Imgproc.findContours(gray0, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
Imgproc.drawContours(gray0, contours, -1, new Scalar(0)); Core.drawContours(gray0, contours, -1, new Scalar(0));
assertEquals(0, Core.countNonZero(gray0)); assertEquals(0, Core.countNonZero(gray0));
} }
...@@ -688,7 +688,7 @@ public class ImgprocTest extends OpenCVTestCase { ...@@ -688,7 +688,7 @@ public class ImgprocTest extends OpenCVTestCase {
List<MatOfPoint> contours = new ArrayList<MatOfPoint>(); List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Imgproc.findContours(gray0, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE); Imgproc.findContours(gray0, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
Imgproc.drawContours(gray0, contours, -1, new Scalar(0), Core.FILLED); Core.drawContours(gray0, contours, -1, new Scalar(0), Core.FILLED);
assertEquals(0, Core.countNonZero(gray0)); assertEquals(0, Core.countNonZero(gray0));
} }
......
...@@ -203,7 +203,7 @@ public class ColorBlobDetectionView extends SampleCvViewBase implements OnTouchL ...@@ -203,7 +203,7 @@ public class ColorBlobDetectionView extends SampleCvViewBase implements OnTouchL
filteredContours.add(new MatOfPoint(contour)); filteredContours.add(new MatOfPoint(contour));
} }
Imgproc.drawContours(mRgba, filteredContours, -1, new Scalar(255,0,0,255)); Core.drawContours(mRgba, filteredContours, -1, new Scalar(255,0,0,255));
Mat testColorMat = mRgba.submat(2, 34, 2, 34); Mat testColorMat = mRgba.submat(2, 34, 2, 34);
testColorMat.setTo(mSelectedColorRgba); testColorMat.setTo(mSelectedColorRgba);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment