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
6b789dd2
Commit
6b789dd2
authored
Jul 19, 2011
by
Kirill Kornyakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java tests: adopted for the new package structure
parent
dfdb15be
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
83 additions
and
83 deletions
+83
-83
OpenCVTestCase.java
...java/android_test/src/org/opencv/test/OpenCVTestCase.java
+11
-11
calib3dTest.java
...android_test/src/org/opencv/test/calib3d/calib3dTest.java
+13
-13
MatTest.java
...s/java/android_test/src/org/opencv/test/core/MatTest.java
+3
-3
RotatedRectTest.java
...ndroid_test/src/org/opencv/test/core/RotatedRectTest.java
+4
-4
coreTest.java
.../java/android_test/src/org/opencv/test/core/coreTest.java
+0
-0
VideoCaptureTest.java
...id_test/src/org/opencv/test/highgui/VideoCaptureTest.java
+15
-15
highguiTest.java
...android_test/src/org/opencv/test/highgui/highguiTest.java
+3
-3
imgprocTest.java
...android_test/src/org/opencv/test/imgproc/imgprocTest.java
+16
-16
CascadeClassifierTest.java
.../src/org/opencv/test/objdetect/CascadeClassifierTest.java
+5
-5
objdetectTest.java
...oid_test/src/org/opencv/test/objdetect/objdetectTest.java
+4
-4
videoTest.java
...ava/android_test/src/org/opencv/test/video/videoTest.java
+9
-9
No files found.
modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java
View file @
6b789dd2
...
...
@@ -2,11 +2,11 @@ package org.opencv.test;
import
junit.framework.TestCase
;
import
org.opencv.CvType
;
import
org.opencv.Mat
;
import
org.opencv.Scalar
;
import
org.opencv.core
;
import
org.opencv.highgui
;
import
org.opencv.
core.
CvType
;
import
org.opencv.
core.
Mat
;
import
org.opencv.
core.
Scalar
;
import
org.opencv.core
.Core
;
import
org.opencv.highgui
.Highgui
;
public
class
OpenCVTestCase
extends
TestCase
{
...
...
@@ -85,7 +85,7 @@ public class OpenCVTestCase extends TestCase {
Mat
low
=
new
Mat
(
1
,
1
,
CvType
.
CV_16UC1
,
new
Scalar
(
0
));
Mat
high
=
new
Mat
(
1
,
1
,
CvType
.
CV_16UC1
,
new
Scalar
(
256
));
grayRnd
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
);
c
ore
.
randu
(
grayRnd
,
low
,
high
);
grayRnd
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8U
);
C
ore
.
randu
(
grayRnd
,
low
,
high
);
gray0_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
,
new
Scalar
(
0.0
));
gray1_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
,
new
Scalar
(
1.0
));
...
...
@@ -93,7 +93,7 @@ public class OpenCVTestCase extends TestCase {
gray9_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
,
new
Scalar
(
9.0
));
gray255_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
,
new
Scalar
(
255.0
));
grayE_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
);
grayE_32f
=
Mat
.
eye
(
matSize
,
matSize
,
CvType
.
CV_32FC1
);
grayRnd_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
);
c
ore
.
randu
(
grayRnd_32f
,
low
,
high
);
grayRnd_32f
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_32F
);
C
ore
.
randu
(
grayRnd_32f
,
low
,
high
);
gray0_32f_1d
=
new
Mat
(
1
,
matSize
,
CvType
.
CV_32F
,
new
Scalar
(
0.0
));
...
...
@@ -103,8 +103,8 @@ public class OpenCVTestCase extends TestCase {
rgba0
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8UC4
,
Scalar
.
all
(
0
));
rgba128
=
new
Mat
(
matSize
,
matSize
,
CvType
.
CV_8UC4
,
Scalar
.
all
(
128
));
rgbLena
=
h
ighgui
.
imread
(
OpenCVTestRunner
.
LENA_PATH
);
grayChess
=
h
ighgui
.
imread
(
OpenCVTestRunner
.
CHESS_PATH
);
rgbLena
=
H
ighgui
.
imread
(
OpenCVTestRunner
.
LENA_PATH
);
grayChess
=
H
ighgui
.
imread
(
OpenCVTestRunner
.
CHESS_PATH
);
v1
=
new
Mat
(
1
,
3
,
CvType
.
CV_32F
);
v1
.
put
(
0
,
0
,
1.0
,
3.0
,
2.0
);
v2
=
new
Mat
(
1
,
3
,
CvType
.
CV_32F
);
v2
.
put
(
0
,
0
,
2.0
,
1.0
,
3.0
);
...
...
@@ -163,9 +163,9 @@ public class OpenCVTestCase extends TestCase {
static
private
double
CalcPercentageOfDifference
(
Mat
m1
,
Mat
m2
)
{
Mat
cmp
=
new
Mat
(
0
,
0
,
CvType
.
CV_8U
);
core
.
compare
(
m1
,
m2
,
cmp
,
c
ore
.
CMP_EQ
);
Core
.
compare
(
m1
,
m2
,
cmp
,
C
ore
.
CMP_EQ
);
double
difference
=
100.0
*
(
1.0
-
Double
.
valueOf
(
c
ore
.
countNonZero
(
cmp
))
/
Double
.
valueOf
(
cmp
.
rows
()
*
cmp
.
cols
()));
(
1.0
-
Double
.
valueOf
(
C
ore
.
countNonZero
(
cmp
))
/
Double
.
valueOf
(
cmp
.
rows
()
*
cmp
.
cols
()));
return
difference
;
}
...
...
modules/java/android_test/src/org/opencv/test/calib3d/calib3dTest.java
View file @
6b789dd2
package
org
.
opencv
.
test
.
calib3d
;
import
org.opencv.CvType
;
import
org.opencv.Mat
;
import
org.opencv.Point
;
import
org.opencv.Scalar
;
import
org.opencv.Size
;
import
org.opencv.calib3d
;
import
org.opencv.core
;
import
org.opencv.
core.
CvType
;
import
org.opencv.
core.
Mat
;
import
org.opencv.
core.
Point
;
import
org.opencv.
core.
Scalar
;
import
org.opencv.
core.
Size
;
import
org.opencv.calib3d
.Calib3d
;
import
org.opencv.core
.Core
;
import
org.opencv.test.OpenCVTestCase
;
public
class
calib3dTest
extends
OpenCVTestCase
{
...
...
@@ -27,7 +27,7 @@ public class calib3dTest extends OpenCVTestCase {
Mat
outRvec
=
new
Mat
(
3
,
1
,
CvType
.
CV_32F
);
outRvec
.
put
(
0
,
0
,
1.418641
,
0.88665926
,
0.56020796
);
Mat
outTvec
=
new
Mat
(
3
,
1
,
CvType
.
CV_32F
);
outTvec
.
put
(
0
,
0
,
1.4560841
,
1.0680628
,
0.81598103
);
c
alib3d
.
composeRT
(
rvec1
,
tvec1
,
rvec2
,
tvec2
,
rvec3
,
tvec3
);
C
alib3d
.
composeRT
(
rvec1
,
tvec1
,
rvec2
,
tvec2
,
rvec3
,
tvec3
);
assertMatEqual
(
outRvec
,
rvec3
);
assertMatEqual
(
outTvec
,
tvec3
);
...
...
@@ -145,10 +145,10 @@ public class calib3dTest extends OpenCVTestCase {
public
void
testFilterSpecklesMatDoubleIntDouble
()
{
gray_16s_1024
.
copyTo
(
dst
);
Point
center
=
new
Point
(
gray_16s_1024
.
rows
()/
2
.,
gray_16s_1024
.
cols
()/
2
.);
c
ore
.
circle
(
dst
,
center
,
1
,
Scalar
.
all
(
4096
));
C
ore
.
circle
(
dst
,
center
,
1
,
Scalar
.
all
(
4096
));
assertMatNotEqual
(
gray_16s_1024
,
dst
);
c
alib3d
.
filterSpeckles
(
dst
,
1024.0
,
100
,
0
.);
C
alib3d
.
filterSpeckles
(
dst
,
1024.0
,
100
,
0
.);
assertMatEqual
(
gray_16s_1024
,
dst
);
}
...
...
@@ -158,14 +158,14 @@ public class calib3dTest extends OpenCVTestCase {
public
void
testFindChessboardCornersMatSizeMat
()
{
Size
patternSize
=
new
Size
(
9
,
6
);
c
alib3d
.
findChessboardCorners
(
grayChess
,
patternSize
,
dst
);
C
alib3d
.
findChessboardCorners
(
grayChess
,
patternSize
,
dst
);
assertTrue
(!
dst
.
empty
());
}
public
void
testFindChessboardCornersMatSizeMatInt
()
{
Size
patternSize
=
new
Size
(
9
,
6
);
c
alib3d
.
findChessboardCorners
(
grayChess
,
patternSize
,
dst
,
calib3d
.
CALIB_CB_ADAPTIVE_THRESH
+
calib3d
.
CALIB_CB_NORMALIZE_IMAGE
+
c
alib3d
.
CALIB_CB_FAST_CHECK
);
C
alib3d
.
findChessboardCorners
(
grayChess
,
patternSize
,
dst
,
Calib3d
.
CALIB_CB_ADAPTIVE_THRESH
+
Calib3d
.
CALIB_CB_NORMALIZE_IMAGE
+
C
alib3d
.
CALIB_CB_FAST_CHECK
);
assertTrue
(!
dst
.
empty
());
}
...
...
modules/java/android_test/src/org/opencv/test/core/MatTest.java
View file @
6b789dd2
package
org
.
opencv
.
test
.
core
;
import
org.opencv.CvType
;
import
org.opencv.Mat
;
import
org.opencv.Scalar
;
import
org.opencv.
core.
CvType
;
import
org.opencv.
core.
Mat
;
import
org.opencv.
core.
Scalar
;
import
org.opencv.test.OpenCVTestCase
;
public
class
MatTest
extends
OpenCVTestCase
{
...
...
modules/java/android_test/src/org/opencv/test/core/RotatedRectTest.java
View file @
6b789dd2
package
org
.
opencv
.
test
.
core
;
import
org.opencv.Point
;
import
org.opencv.Rect
;
import
org.opencv.RotatedRect
;
import
org.opencv.Size
;
import
org.opencv.
core.
Point
;
import
org.opencv.
core.
Rect
;
import
org.opencv.
core.
RotatedRect
;
import
org.opencv.
core.
Size
;
import
org.opencv.test.OpenCVTestCase
;
public
class
RotatedRectTest
extends
OpenCVTestCase
{
...
...
modules/java/android_test/src/org/opencv/test/core/coreTest.java
View file @
6b789dd2
This diff is collapsed.
Click to expand it.
modules/java/android_test/src/org/opencv/test/highgui/VideoCaptureTest.java
View file @
6b789dd2
package
org
.
opencv
.
test
.
highgui
;
import
org.opencv.highgui
;
import
org.opencv.VideoCapture
;
import
org.opencv.highgui
.Highgui
;
import
org.opencv.
highgui.
VideoCapture
;
import
org.opencv.test.OpenCVTestCase
;
...
...
@@ -26,8 +26,8 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testGet
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
double
frameWidth
=
capture
.
get
(
h
ighgui
.
CV_CAP_PROP_FRAME_WIDTH
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
double
frameWidth
=
capture
.
get
(
H
ighgui
.
CV_CAP_PROP_FRAME_WIDTH
);
capture
.
release
();
assertTrue
(
0
!=
frameWidth
);
}
...
...
@@ -39,7 +39,7 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testGrabFromRealCamera
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
isSucceed
=
capture
.
grab
();
capture
.
release
();
assertTrue
(
isSucceed
);
...
...
@@ -51,7 +51,7 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testIsOpenedRealCamera
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
isOpened
=
capture
.
isOpened
();
capture
.
release
();
assertTrue
(
isOpened
);
...
...
@@ -59,7 +59,7 @@ public class VideoCaptureTest extends OpenCVTestCase {
public
void
testOpenInt
()
{
capture
=
new
VideoCapture
();
capture
.
open
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
.
open
(
H
ighgui
.
CV_CAP_ANDROID
);
isOpened
=
capture
.
isOpened
();
capture
.
release
();
assertTrue
(
isOpened
);
...
...
@@ -70,7 +70,7 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testRead
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
isSucceed
=
capture
.
read
(
dst
);
capture
.
release
();
assertTrue
(
isSucceed
);
...
...
@@ -79,13 +79,13 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testRelease
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
capture
.
release
();
assertFalse
(
capture
.
isOpened
());
}
public
void
testRetrieveMat
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
capture
.
grab
();
isSucceed
=
capture
.
retrieve
(
dst
);
capture
.
release
();
...
...
@@ -95,7 +95,7 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testRetrieveMatInt
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
capture
.
grab
();
isSucceed
=
capture
.
retrieve
(
dst
,
1
);
capture
.
release
();
...
...
@@ -106,9 +106,9 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testSet
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
.
set
(
h
ighgui
.
CV_CAP_PROP_FRAME_WIDTH
,
640.0
);
double
frameWidth
=
capture
.
get
(
h
ighgui
.
CV_CAP_PROP_FRAME_WIDTH
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
capture
.
set
(
H
ighgui
.
CV_CAP_PROP_FRAME_WIDTH
,
640.0
);
double
frameWidth
=
capture
.
get
(
H
ighgui
.
CV_CAP_PROP_FRAME_WIDTH
);
capture
.
read
(
dst
);
capture
.
release
();
assertEquals
(
640.0
,
frameWidth
);
...
...
@@ -121,7 +121,7 @@ public class VideoCaptureTest extends OpenCVTestCase {
}
public
void
testVideoCaptureInt
()
{
capture
=
new
VideoCapture
(
h
ighgui
.
CV_CAP_ANDROID
);
capture
=
new
VideoCapture
(
H
ighgui
.
CV_CAP_ANDROID
);
assertTrue
(
null
!=
capture
);
isOpened
=
capture
.
isOpened
();
capture
.
release
();
...
...
modules/java/android_test/src/org/opencv/test/highgui/highguiTest.java
View file @
6b789dd2
package
org
.
opencv
.
test
.
highgui
;
import
org.opencv.highgui
;
import
org.opencv.highgui
.Highgui
;
import
org.opencv.test.OpenCVTestCase
;
import
org.opencv.test.OpenCVTestRunner
;
...
...
@@ -8,7 +8,7 @@ import org.opencv.test.OpenCVTestRunner;
public
class
highguiTest
extends
OpenCVTestCase
{
public
void
testImreadString
()
{
dst
=
h
ighgui
.
imread
(
OpenCVTestRunner
.
LENA_PATH
);
dst
=
H
ighgui
.
imread
(
OpenCVTestRunner
.
LENA_PATH
);
assertTrue
(!
dst
.
empty
());
assertEquals
(
3
,
dst
.
channels
());
assertTrue
(
512
==
dst
.
cols
());
...
...
@@ -16,7 +16,7 @@ public class highguiTest extends OpenCVTestCase {
}
public
void
testImreadStringInt
()
{
dst
=
h
ighgui
.
imread
(
OpenCVTestRunner
.
LENA_PATH
,
0
);
dst
=
H
ighgui
.
imread
(
OpenCVTestRunner
.
LENA_PATH
,
0
);
assertTrue
(!
dst
.
empty
());
assertEquals
(
1
,
dst
.
channels
());
assertTrue
(
512
==
dst
.
cols
());
...
...
modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java
View file @
6b789dd2
...
...
@@ -3,12 +3,12 @@ package org.opencv.test.imgproc;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.opencv.CvType
;
import
org.opencv.Mat
;
import
org.opencv.Scalar
;
import
org.opencv.Size
;
import
org.opencv.core
;
import
org.opencv.imgproc
;
import
org.opencv.
core.
CvType
;
import
org.opencv.
core.
Mat
;
import
org.opencv.
core.
Scalar
;
import
org.opencv.
core.
Size
;
import
org.opencv.core
.Core
;
import
org.opencv.imgproc
.Imgproc
;
import
org.opencv.test.OpenCVTestCase
;
...
...
@@ -21,7 +21,7 @@ public class imgprocTest extends OpenCVTestCase {
//FIXME: this test crashes
//public void test_Can_Call_accumulate() {
// dst = new Mat(gray1.rows(), gray1.cols(), Mat.CvType.CV_32FC1);
//
i
mgproc.accumulate(gray1, dst);
//
I
mgproc.accumulate(gray1, dst);
// assertMatEqual(gray1, dst);
//}
...
...
@@ -80,10 +80,10 @@ public class imgprocTest extends OpenCVTestCase {
public
void
testBlurMatMatSize
()
{
Size
sz
=
new
Size
(
3
,
3
);
i
mgproc
.
blur
(
gray0
,
dst
,
sz
);
I
mgproc
.
blur
(
gray0
,
dst
,
sz
);
assertMatEqual
(
gray0
,
dst
);
i
mgproc
.
blur
(
gray255
,
dst
,
sz
);
I
mgproc
.
blur
(
gray255
,
dst
,
sz
);
assertMatEqual
(
gray255
,
dst
);
}
...
...
@@ -105,7 +105,7 @@ public class imgprocTest extends OpenCVTestCase {
public
void
testBoxFilterMatMatIntSize
()
{
Size
sz
=
new
Size
(
3
,
3
);
i
mgproc
.
boxFilter
(
gray0
,
dst
,
8
,
sz
);
I
mgproc
.
boxFilter
(
gray0
,
dst
,
8
,
sz
);
assertMatEqual
(
gray0
,
dst
);
}
...
...
@@ -133,13 +133,13 @@ public class imgprocTest extends OpenCVTestCase {
ranges
.
add
(
0.0f
);
ranges
.
add
(
256.0f
);
Mat
hist
=
new
Mat
();
i
mgproc
.
calcHist
(
images
,
channels
,
new
Mat
(),
hist
,
histSize
,
ranges
);
c
ore
.
normalize
(
hist
,
hist
);
I
mgproc
.
calcHist
(
images
,
channels
,
new
Mat
(),
hist
,
histSize
,
ranges
);
C
ore
.
normalize
(
hist
,
hist
);
i
mgproc
.
calcBackProject
(
images
,
channels
,
hist
,
dst
,
ranges
,
255
);
I
mgproc
.
calcBackProject
(
images
,
channels
,
hist
,
dst
,
ranges
,
255
);
assertTrue
(
grayChess
.
size
().
equals
(
dst
.
size
()));
assertEquals
(
grayChess
.
depth
(),
dst
.
depth
());
assertTrue
(
0
!=
c
ore
.
countNonZero
(
dst
));
assertTrue
(
0
!=
C
ore
.
countNonZero
(
dst
));
}
public
void
testCalcHistListOfMatListOfIntegerMatMatListOfIntegerListOfFloat
()
{
...
...
@@ -157,7 +157,7 @@ public class imgprocTest extends OpenCVTestCase {
truth
.
put
(
5
,
0
,
100.0
);
Mat
hist
=
new
Mat
();
i
mgproc
.
calcHist
(
images
,
channels
,
new
Mat
(),
hist
,
histSize
,
ranges
);
I
mgproc
.
calcHist
(
images
,
channels
,
new
Mat
(),
hist
,
histSize
,
ranges
);
assertMatEqual
(
truth
,
hist
);
}
...
...
@@ -183,7 +183,7 @@ public class imgprocTest extends OpenCVTestCase {
truth
.
put
(
9
,
5
,
100.0
);
Mat
hist
=
new
Mat
();
i
mgproc
.
calcHist
(
images
,
channels
,
new
Mat
(),
hist
,
histSize
,
ranges
);
I
mgproc
.
calcHist
(
images
,
channels
,
new
Mat
(),
hist
,
histSize
,
ranges
);
assertMatEqual
(
truth
,
hist
);
}
...
...
modules/java/android_test/src/org/opencv/test/objdetect/CascadeClassifierTest.java
View file @
6b789dd2
...
...
@@ -2,10 +2,10 @@ package org.opencv.test.objdetect;
import
java.util.ArrayList
;
import
org.opencv.Mat
;
import
org.opencv.Rect
;
import
org.opencv.Size
;
import
org.opencv.imgproc
;
import
org.opencv.
core.
Mat
;
import
org.opencv.
core.
Rect
;
import
org.opencv.
core.
Size
;
import
org.opencv.imgproc
.Imgproc
;
import
org.opencv.objdetect.CascadeClassifier
;
import
org.opencv.test.OpenCVTestCase
;
import
org.opencv.test.OpenCVTestRunner
;
...
...
@@ -36,7 +36,7 @@ public class CascadeClassifierTest extends OpenCVTestCase {
ArrayList
<
Rect
>
faces
=
new
ArrayList
<
Rect
>();
Mat
greyLena
=
new
Mat
();
imgproc
.
cvtColor
(
rgbLena
,
greyLena
,
i
mgproc
.
COLOR_RGB2GRAY
);
Imgproc
.
cvtColor
(
rgbLena
,
greyLena
,
I
mgproc
.
COLOR_RGB2GRAY
);
//TODO: doesn't detect with 1.1 scale
cc
.
detectMultiScale
(
greyLena
,
faces
,
1.09
,
2
,
2
/*TODO: CV_HAAR_SCALE_IMAGE*/
,
new
Size
(
30
,
30
));
...
...
modules/java/android_test/src/org/opencv/test/objdetect/objdetectTest.java
View file @
6b789dd2
...
...
@@ -2,8 +2,8 @@ package org.opencv.test.objdetect;
import
java.util.ArrayList
;
import
org.opencv.Rect
;
import
org.opencv.objdetect
;
import
org.opencv.
core.
Rect
;
import
org.opencv.objdetect
.Objdetect
;
import
org.opencv.test.OpenCVTestCase
;
...
...
@@ -17,7 +17,7 @@ public class objdetectTest extends OpenCVTestCase {
rects
.
add
(
r
);
int
groupThreshold
=
1
;
o
bjdetect
.
groupRectangles
(
rects
,
groupThreshold
);
O
bjdetect
.
groupRectangles
(
rects
,
groupThreshold
);
assertEquals
(
1
,
rects
.
size
());
}
...
...
@@ -33,7 +33,7 @@ public class objdetectTest extends OpenCVTestCase {
int
groupThreshold
=
1
;
double
eps
=
0.2
;
o
bjdetect
.
groupRectangles
(
rects
,
groupThreshold
,
eps
);
O
bjdetect
.
groupRectangles
(
rects
,
groupThreshold
,
eps
);
assertEquals
(
2
,
rects
.
size
());
}
...
...
modules/java/android_test/src/org/opencv/test/video/videoTest.java
View file @
6b789dd2
package
org
.
opencv
.
test
.
video
;
import
org.opencv.CvType
;
import
org.opencv.Mat
;
import
org.opencv.Size
;
import
org.opencv.core
;
import
org.opencv.video
;
import
org.opencv.
core.
CvType
;
import
org.opencv.
core.
Mat
;
import
org.opencv.
core.
Size
;
import
org.opencv.core
.Core
;
import
org.opencv.video
.Video
;
import
org.opencv.test.OpenCVTestCase
;
...
...
@@ -59,8 +59,8 @@ public class videoTest extends OpenCVTestCase {
Mat
prevPts
=
new
Mat
(
1
,
3
,
CvType
.
CV_32FC2
);
prevPts
.
put
(
0
,
0
,
1.0
,
1.0
,
5.0
,
5.0
,
10.0
,
10.0
);
v
ideo
.
calcOpticalFlowPyrLK
(
subLena1
,
subLena2
,
prevPts
,
nextPts
,
status
,
err
);
assertEquals
(
3
,
c
ore
.
countNonZero
(
status
));
V
ideo
.
calcOpticalFlowPyrLK
(
subLena1
,
subLena2
,
prevPts
,
nextPts
,
status
,
err
);
assertEquals
(
3
,
C
ore
.
countNonZero
(
status
));
}
public
void
testCalcOpticalFlowPyrLKMatMatMatMatMatMatSize
()
{
...
...
@@ -68,8 +68,8 @@ public class videoTest extends OpenCVTestCase {
prevPts
.
put
(
0
,
0
,
1.0
,
1.0
,
5.0
,
5.0
,
10.0
,
10.0
);
Size
sz
=
new
Size
(
5
,
5
);
v
ideo
.
calcOpticalFlowPyrLK
(
subLena1
,
subLena2
,
prevPts
,
nextPts
,
status
,
err
,
sz
);
assertEquals
(
0
,
c
ore
.
countNonZero
(
status
));
V
ideo
.
calcOpticalFlowPyrLK
(
subLena1
,
subLena2
,
prevPts
,
nextPts
,
status
,
err
,
sz
);
assertEquals
(
0
,
C
ore
.
countNonZero
(
status
));
}
public
void
testCalcOpticalFlowPyrLKMatMatMatMatMatMatSizeInt
()
{
...
...
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