Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
eb4ce67d
Commit
eb4ce67d
authored
May 29, 2012
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing Java test and sample after moving drawContours() from Imgproc to Core
parent
40e8d08e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ImgprocTest.java
...android_test/src/org/opencv/test/imgproc/ImgprocTest.java
+2
-2
ColorBlobDetectionView.java
...pencv/samples/colorblobdetect/ColorBlobDetectionView.java
+1
-1
No files found.
modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java
View file @
eb4ce67d
...
@@ -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
));
}
}
...
...
samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionView.java
View file @
eb4ce67d
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment