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
6d907581
Commit
6d907581
authored
Aug 05, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java tests: fixed 1 test in core and 1 disabled
parent
cb2b2863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
CoreTest.java
.../java/android_test/src/org/opencv/test/core/CoreTest.java
+13
-6
No files found.
modules/java/android_test/src/org/opencv/test/core/CoreTest.java
View file @
6d907581
...
...
@@ -15,6 +15,7 @@ import org.opencv.core.Scalar;
import
org.opencv.core.Size
;
import
org.opencv.core.TermCriteria
;
import
org.opencv.test.OpenCVTestCase
;
import
org.opencv.test.OpenCVTestRunner
;
import
org.opencv.utils.Converters
;
public
class
CoreTest
extends
OpenCVTestCase
{
...
...
@@ -850,6 +851,7 @@ public class CoreTest extends OpenCVTestCase {
}
public
void
testKmeansMatIntMatTermCriteriaIntInt
()
{
fail
(
"Not yet implemented"
);
Mat
data
=
new
Mat
(
4
,
2
,
CvType
.
CV_32FC1
);
data
.
put
(
0
,
0
,
2
,
4
);
data
.
put
(
1
,
0
,
3
,
9
);
...
...
@@ -862,7 +864,6 @@ public class CoreTest extends OpenCVTestCase {
// TODO: returns 0 for most input combinations
res
=
Core
.
kmeans
(
data
,
K
,
bestLabels
,
criteria
,
0
,
Core
.
KMEANS_PP_CENTERS
);
assertEquals
(
10.0
,
res
);
fail
(
"Not yet implemented"
);
}
public
void
testKmeansMatIntMatTermCriteriaIntIntMat
()
{
...
...
@@ -1469,11 +1470,17 @@ public class CoreTest extends OpenCVTestCase {
public
void
testPutTextMatStringPointIntDoubleScalar
()
{
String
text
=
"Hello World"
;
Point
org
=
new
Point
(
0
,
0
);
assertTrue
(
0
==
Core
.
countNonZero
(
gray0
));
Core
.
putText
(
gray0
,
text
,
org
,
Core
.
FONT_HERSHEY_SIMPLEX
,
1.0
,
colorWhite
);
assertTrue
(
0
!=
Core
.
countNonZero
(
gray0
));
Size
labelSize
=
new
Size
(
175
,
22
);
Mat
img
=
new
Mat
(
20
+
(
int
)
labelSize
.
height
,
20
+
(
int
)
labelSize
.
width
,
CvType
.
CV_8U
,
colorBlack
);
Point
origin
=
new
Point
(
10
,
labelSize
.
height
+
10
);
Core
.
putText
(
img
,
text
,
origin
,
Core
.
FONT_HERSHEY_SIMPLEX
,
1.0
,
colorWhite
);
assertTrue
(
Core
.
countNonZero
(
img
)
>
0
);
//check that border is not corrupted
Core
.
rectangle
(
img
,
new
Point
(
11
,
11
),
new
Point
(
labelSize
.
width
+
10
,
labelSize
.
height
+
10
),
colorBlack
,
-
1
);
//TODO:CV_FILLED
assertEquals
(
0
,
Core
.
countNonZero
(
img
));
}
public
void
testPutTextMatStringPointIntDoubleScalarInt
()
{
...
...
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