From eb4ce67dac4b0ebdb7e0c6f97cecd3bf263c14e5 Mon Sep 17 00:00:00 2001 From: Andrey Pavlenko Date: Tue, 29 May 2012 11:04:04 +0000 Subject: [PATCH] fixing Java test and sample after moving drawContours() from Imgproc to Core --- .../android_test/src/org/opencv/test/imgproc/ImgprocTest.java | 4 ++-- .../samples/colorblobdetect/ColorBlobDetectionView.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java b/modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java index 2c3b58e81..5aec91831 100644 --- a/modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java +++ b/modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java @@ -678,7 +678,7 @@ public class ImgprocTest extends OpenCVTestCase { List contours = new ArrayList(); 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)); } @@ -688,7 +688,7 @@ public class ImgprocTest extends OpenCVTestCase { List contours = new ArrayList(); 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)); } diff --git a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionView.java b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionView.java index d9ed3ad7d..ddca9b1b7 100644 --- a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionView.java +++ b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionView.java @@ -203,7 +203,7 @@ public class ColorBlobDetectionView extends SampleCvViewBase implements OnTouchL 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); testColorMat.setTo(mSelectedColorRgba);