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
dbccc9b1
Commit
dbccc9b1
authored
Apr 19, 2012
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improving Imgproc.convexityDefects() and Imgproc.convexHull()
parent
2ec0efaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
19 deletions
+15
-19
ImgprocTest.java
...android_test/src/org/opencv/test/imgproc/ImgprocTest.java
+13
-17
gen_java.py
modules/java/gen_java.py
+2
-2
No files found.
modules/java/android_test/src/org/opencv/test/imgproc/ImgprocTest.java
View file @
dbccc9b1
...
...
@@ -391,16 +391,15 @@ public class ImgprocTest extends OpenCVTestCase {
new
Point
(
20
,
10
),
new
Point
(
30
,
10
)
);
MatOfInt
hull
=
new
MatOfInt
();
Imgproc
.
convexHull
(
points
,
dst
);
Imgproc
.
convexHull
(
points
,
hull
);
MatOfPoint
expHull
=
new
MatOfPoint
(
new
Point
(
40
,
0
),
new
Point
(
30
,
20
),
new
Point
(
0
,
20
),
new
Point
(
20
,
0
)
MatOfInt
expHull
=
new
MatOfInt
(
1
,
2
,
3
,
0
);
assertMatEqual
(
expHull
,
dst
,
EPS
);
assertMatEqual
(
expHull
,
hull
,
EPS
);
}
public
void
testConvexHullMatMatBooleanBoolean
()
{
...
...
@@ -413,17 +412,14 @@ public class ImgprocTest extends OpenCVTestCase {
new
Point
(
3
,
1
)
);
MatOfInt
hull
=
new
MatOfInt
();
Imgproc
.
convexHull
(
points
,
dst
,
true
,
true
);
// TODO_: write better test (last param == false)
Imgproc
.
convexHull
(
points
,
hull
,
true
);
MatOfPoint
expHull
=
new
MatOfPoint
(
new
Point
(
0
,
2
),
new
Point
(
3
,
2
),
new
Point
(
4
,
0
),
new
Point
(
2
,
0
)
MatOfInt
expHull
=
new
MatOfInt
(
3
,
2
,
1
,
0
);
assertMatEqual
(
expHull
,
dst
,
EPS
);
assertMatEqual
(
expHull
,
hull
,
EPS
);
}
public
void
testConvexityDefects
()
{
...
...
@@ -436,8 +432,8 @@ public class ImgprocTest extends OpenCVTestCase {
new
Point
(
30
,
10
)
);
MatOf
Point
hull
=
new
MatOfPoi
nt
();
Imgproc
.
convexHull
(
points
,
hull
,
false
,
false
);
MatOf
Int
hull
=
new
MatOfI
nt
();
Imgproc
.
convexHull
(
points
,
hull
);
MatOfInt4
convexityDefects
=
new
MatOfInt4
();
Imgproc
.
convexityDefects
(
points
,
hull
,
convexityDefects
);
...
...
modules/java/gen_java.py
View file @
dbccc9b1
...
...
@@ -530,9 +530,9 @@ func_arg_fix = {
'meanStdDev'
:
{
'mean'
:
'vector_double'
,
'stddev'
:
'vector_double'
},
'drawContours'
:
{
'contours'
:
'vector_vector_Point'
},
'findContours'
:
{
'contours'
:
'vector_vector_Point'
},
'convexityDefects'
:
{
'contour'
:
'vector_Point'
,
'convexityDefects'
:
'vector_Vec4i'
},
'convexityDefects'
:
{
'contour'
:
'vector_Point'
,
'convex
hull'
:
'vector_int'
,
'convex
ityDefects'
:
'vector_Vec4i'
},
'isContourConvex'
:
{
'contour'
:
'vector_Point'
,
},
'convexHull'
:
{
'points'
:
'vector_Point'
},
'convexHull'
:
{
'points'
:
'vector_Point'
,
'hull'
:
'vector_int'
,
'returnPoints'
:
''
},
'projectPoints'
:
{
'objectPoints'
:
'vector_Point3f'
,
'imagePoints'
:
'vector_Point2f'
,
'distCoeffs'
:
'vector_double'
},
'initCameraMatrix2D'
:
{
'objectPoints'
:
'vector_vector_Point3f'
,
'imagePoints'
:
'vector_vector_Point2f'
,
},
...
...
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