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
51338ec7
Commit
51338ec7
authored
Apr 04, 2012
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java API: fixing Core tests; minor enchantments in CvVector-s API
parent
5a93b275
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
101 additions
and
52 deletions
+101
-52
OpenCVTestCase.java
...java/android_test/src/org/opencv/test/OpenCVTestCase.java
+28
-0
CoreTest.java
.../java/android_test/src/org/opencv/test/core/CoreTest.java
+43
-38
core+CvVectorByte.java
modules/java/src/java/core+CvVectorByte.java
+4
-0
core+CvVectorDMatch.java
modules/java/src/java/core+CvVectorDMatch.java
+2
-2
core+CvVectorDouble.java
modules/java/src/java/core+CvVectorDouble.java
+4
-0
core+CvVectorFloat.java
modules/java/src/java/core+CvVectorFloat.java
+4
-0
core+CvVectorInt.java
modules/java/src/java/core+CvVectorInt.java
+4
-0
core+CvVectorKeyPoint.java
modules/java/src/java/core+CvVectorKeyPoint.java
+2
-2
core+CvVectorPoint.java
modules/java/src/java/core+CvVectorPoint.java
+2
-2
core+CvVectorPoint2f.java
modules/java/src/java/core+CvVectorPoint2f.java
+2
-2
core+CvVectorPoint3.java
modules/java/src/java/core+CvVectorPoint3.java
+2
-2
core+CvVectorPoint3f.java
modules/java/src/java/core+CvVectorPoint3f.java
+2
-2
core+CvVectorRect.java
modules/java/src/java/core+CvVectorRect.java
+2
-2
No files found.
modules/java/android_test/src/org/opencv/test/OpenCVTestCase.java
View file @
51338ec7
...
@@ -205,6 +205,26 @@ public class OpenCVTestCase extends TestCase {
...
@@ -205,6 +205,26 @@ public class OpenCVTestCase extends TestCase {
assertTrue
(
Math
.
abs
(
list1
.
get
(
i
).
doubleValue
()
-
list2
.
get
(
i
).
doubleValue
())
<=
epsilon
);
assertTrue
(
Math
.
abs
(
list1
.
get
(
i
).
doubleValue
()
-
list2
.
get
(
i
).
doubleValue
())
<=
epsilon
);
}
}
public
static
<
E
extends
Number
>
void
assertArrayEquals
(
E
[]
ar1
,
E
[]
ar2
,
double
epsilon
)
{
if
(
ar1
.
length
!=
ar2
.
length
)
{
fail
(
"Arrays have different sizes."
);
}
for
(
int
i
=
0
;
i
<
ar1
.
length
;
i
++)
assertEquals
(
ar1
[
i
].
doubleValue
(),
ar2
[
i
].
doubleValue
(),
epsilon
);
//assertTrue(Math.abs(ar1[i].doubleValue() - ar2[i].doubleValue()) <= epsilon);
}
public
static
void
assertArrayEquals
(
double
[]
ar1
,
double
[]
ar2
,
double
epsilon
)
{
if
(
ar1
.
length
!=
ar2
.
length
)
{
fail
(
"Arrays have different sizes."
);
}
for
(
int
i
=
0
;
i
<
ar1
.
length
;
i
++)
assertEquals
(
ar1
[
i
],
ar2
[
i
],
epsilon
);
//assertTrue(Math.abs(ar1[i].doubleValue() - ar2[i].doubleValue()) <= epsilon);
}
public
static
void
assertListMatEquals
(
List
<
Mat
>
list1
,
List
<
Mat
>
list2
,
double
epsilon
)
{
public
static
void
assertListMatEquals
(
List
<
Mat
>
list1
,
List
<
Mat
>
list2
,
double
epsilon
)
{
if
(
list1
.
size
()
!=
list2
.
size
())
{
if
(
list1
.
size
()
!=
list2
.
size
())
{
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
...
@@ -223,6 +243,14 @@ public class OpenCVTestCase extends TestCase {
...
@@ -223,6 +243,14 @@ public class OpenCVTestCase extends TestCase {
assertPointEquals
(
list1
.
get
(
i
),
list2
.
get
(
i
),
epsilon
);
assertPointEquals
(
list1
.
get
(
i
),
list2
.
get
(
i
),
epsilon
);
}
}
public
static
void
assertArrayPointsEquals
(
Point
[]
vp1
,
Point
[]
vp2
,
double
epsilon
)
{
if
(
vp1
.
length
!=
vp2
.
length
)
{
fail
(
"Arrays have different sizes."
);
}
for
(
int
i
=
0
;
i
<
vp1
.
length
;
i
++)
assertPointEquals
(
vp1
[
i
],
vp2
[
i
],
epsilon
);
}
public
static
void
assertListPoint3Equals
(
List
<
Point3
>
list1
,
List
<
Point3
>
list2
,
double
epsilon
)
{
public
static
void
assertListPoint3Equals
(
List
<
Point3
>
list1
,
List
<
Point3
>
list2
,
double
epsilon
)
{
if
(
list1
.
size
()
!=
list2
.
size
())
{
if
(
list1
.
size
()
!=
list2
.
size
())
{
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
...
...
modules/java/android_test/src/org/opencv/test/core/CoreTest.java
View file @
51338ec7
...
@@ -4,6 +4,9 @@ import org.opencv.core.Core;
...
@@ -4,6 +4,9 @@ import org.opencv.core.Core;
import
org.opencv.core.Core.MinMaxLocResult
;
import
org.opencv.core.Core.MinMaxLocResult
;
import
org.opencv.core.CvException
;
import
org.opencv.core.CvException
;
import
org.opencv.core.CvType
;
import
org.opencv.core.CvType
;
import
org.opencv.core.CvVectorDouble
;
import
org.opencv.core.CvVectorInt
;
import
org.opencv.core.CvVectorPoint
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Mat
;
import
org.opencv.core.Point
;
import
org.opencv.core.Point
;
import
org.opencv.core.Rect
;
import
org.opencv.core.Rect
;
...
@@ -482,11 +485,11 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -482,11 +485,11 @@ public class CoreTest extends OpenCVTestCase {
int
arcStart
=
30
;
int
arcStart
=
30
;
int
arcEnd
=
60
;
int
arcEnd
=
60
;
int
delta
=
2
;
int
delta
=
2
;
List
<
Point
>
pts
=
new
ArrayList
<
Point
>
();
CvVectorPoint
pts
=
new
CvVectorPoint
();
Core
.
ellipse2Poly
(
center
,
axes
,
angle
,
arcStart
,
arcEnd
,
delta
,
pts
);
Core
.
ellipse2Poly
(
center
,
axes
,
angle
,
arcStart
,
arcEnd
,
delta
,
pts
);
List
<
Point
>
truth
=
Arrays
.
asList
(
Point
truth
[]
=
{
new
Point
(
5
,
6
),
new
Point
(
5
,
6
),
new
Point
(
5
,
6
),
new
Point
(
5
,
6
),
new
Point
(
5
,
6
),
new
Point
(
5
,
6
),
...
@@ -502,8 +505,9 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -502,8 +505,9 @@ public class CoreTest extends OpenCVTestCase {
new
Point
(
4
,
6
),
new
Point
(
4
,
6
),
new
Point
(
4
,
6
),
new
Point
(
4
,
6
),
new
Point
(
4
,
6
),
new
Point
(
4
,
6
),
new
Point
(
4
,
6
));
new
Point
(
4
,
6
)
assertListPointEquals
(
truth
,
pts
,
EPS
);
};
assertArrayPointsEquals
(
truth
,
pts
.
toArray
(
new
Point
[
0
]),
EPS
);
}
}
public
void
testEllipseMatPointSizeDoubleDoubleDoubleScalar
()
{
public
void
testEllipseMatPointSizeDoubleDoubleDoubleScalar
()
{
...
@@ -617,7 +621,7 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -617,7 +621,7 @@ public class CoreTest extends OpenCVTestCase {
}
}
public
void
testFillConvexPolyMatListOfPointScalar
()
{
public
void
testFillConvexPolyMatListOfPointScalar
()
{
List
<
Point
>
polyline
=
Arrays
.
asList
(
new
Point
(
1
,
1
),
new
Point
(
5
,
0
),
new
Point
(
6
,
8
),
new
Point
(
0
,
9
)
);
CvVectorPoint
polyline
=
new
CvVectorPoint
(
new
Point
[]{
new
Point
(
1
,
1
),
new
Point
(
5
,
0
),
new
Point
(
6
,
8
),
new
Point
(
0
,
9
)}
);
Core
.
fillConvexPoly
(
gray0
,
polyline
,
new
Scalar
(
150
));
Core
.
fillConvexPoly
(
gray0
,
polyline
,
new
Scalar
(
150
));
...
@@ -626,8 +630,8 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -626,8 +630,8 @@ public class CoreTest extends OpenCVTestCase {
}
}
public
void
testFillConvexPolyMatListOfPointScalarIntInt
()
{
public
void
testFillConvexPolyMatListOfPointScalarIntInt
()
{
List
<
Point
>
polyline1
=
Arrays
.
asLis
t
(
new
Point
(
2
,
1
),
new
Point
(
5
,
1
),
new
Point
(
5
,
7
),
new
Point
(
2
,
7
));
CvVectorPoint
polyline1
=
new
CvVectorPoin
t
(
new
Point
(
2
,
1
),
new
Point
(
5
,
1
),
new
Point
(
5
,
7
),
new
Point
(
2
,
7
));
List
<
Point
>
polyline2
=
Arrays
.
asLis
t
(
new
Point
(
4
,
2
),
new
Point
(
10
,
2
),
new
Point
(
10
,
14
),
new
Point
(
4
,
14
));
CvVectorPoint
polyline2
=
new
CvVectorPoin
t
(
new
Point
(
4
,
2
),
new
Point
(
10
,
2
),
new
Point
(
10
,
14
),
new
Point
(
4
,
14
));
// current implementation of fixed-point version of fillConvexPoly
// current implementation of fixed-point version of fillConvexPoly
// requires image to be at least 2-pixel wider in each direction than
// requires image to be at least 2-pixel wider in each direction than
...
@@ -645,8 +649,8 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -645,8 +649,8 @@ public class CoreTest extends OpenCVTestCase {
public
void
testFillPolyMatListOfListOfPointScalar
()
{
public
void
testFillPolyMatListOfListOfPointScalar
()
{
int
matSize
=
10
;
int
matSize
=
10
;
Mat
gray0
=
Mat
.
zeros
(
matSize
,
matSize
,
CvType
.
CV_8U
);
Mat
gray0
=
Mat
.
zeros
(
matSize
,
matSize
,
CvType
.
CV_8U
);
List
<
Point
>
polyline
=
Arrays
.
asLis
t
(
new
Point
(
1
,
4
),
new
Point
(
1
,
8
),
new
Point
(
4
,
1
),
new
Point
(
7
,
8
),
new
Point
(
7
,
4
));
CvVectorPoint
polyline
=
new
CvVectorPoin
t
(
new
Point
(
1
,
4
),
new
Point
(
1
,
8
),
new
Point
(
4
,
1
),
new
Point
(
7
,
8
),
new
Point
(
7
,
4
));
List
<
List
<
Point
>>
polylines
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polylines
=
new
ArrayList
<
CvVectorPoint
>();
polylines
.
add
(
polyline
);
polylines
.
add
(
polyline
);
Core
.
fillPoly
(
gray0
,
polylines
,
new
Scalar
(
1
));
Core
.
fillPoly
(
gray0
,
polylines
,
new
Scalar
(
1
));
...
@@ -671,13 +675,13 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -671,13 +675,13 @@ public class CoreTest extends OpenCVTestCase {
}
}
public
void
testFillPolyMatListOfListOfPointScalarIntIntPoint
()
{
public
void
testFillPolyMatListOfListOfPointScalarIntIntPoint
()
{
List
<
Point
>
polyline1
=
Arrays
.
asLis
t
(
new
Point
(
1
,
4
),
new
Point
(
1
,
8
),
new
Point
(
4
,
1
),
new
Point
(
7
,
8
),
new
Point
(
7
,
4
));
CvVectorPoint
polyline1
=
new
CvVectorPoin
t
(
new
Point
(
1
,
4
),
new
Point
(
1
,
8
),
new
Point
(
4
,
1
),
new
Point
(
7
,
8
),
new
Point
(
7
,
4
));
List
<
Point
>
polyline2
=
Arrays
.
asLis
t
(
new
Point
(
0
,
3
),
new
Point
(
0
,
7
),
new
Point
(
3
,
0
),
new
Point
(
6
,
7
),
new
Point
(
6
,
3
));
CvVectorPoint
polyline2
=
new
CvVectorPoin
t
(
new
Point
(
0
,
3
),
new
Point
(
0
,
7
),
new
Point
(
3
,
0
),
new
Point
(
6
,
7
),
new
Point
(
6
,
3
));
List
<
List
<
Point
>>
polylines1
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polylines1
=
new
ArrayList
<
CvVectorPoint
>();
polylines1
.
add
(
polyline1
);
polylines1
.
add
(
polyline1
);
List
<
List
<
Point
>>
polylines2
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polylines2
=
new
ArrayList
<
CvVectorPoint
>();
polylines2
.
add
(
polyline2
);
polylines2
.
add
(
polyline2
);
Core
.
fillPoly
(
gray0
,
polylines1
,
new
Scalar
(
1
),
Core
.
LINE_8
,
0
,
new
Point
(
0
,
0
));
Core
.
fillPoly
(
gray0
,
polylines1
,
new
Scalar
(
1
),
Core
.
LINE_8
,
0
,
new
Point
(
0
,
0
));
...
@@ -1190,18 +1194,18 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -1190,18 +1194,18 @@ public class CoreTest extends OpenCVTestCase {
}
}
public
void
testMeanStdDevMatMatMat
()
{
public
void
testMeanStdDevMatMatMat
()
{
List
<
Double
>
mean
=
new
ArrayList
<
Double
>
();
CvVectorDouble
mean
=
new
CvVectorDouble
();
List
<
Double
>
stddev
=
new
ArrayList
<
Double
>
();
CvVectorDouble
stddev
=
new
CvVectorDouble
();
Core
.
meanStdDev
(
rgbLena
,
mean
,
stddev
);
Core
.
meanStdDev
(
rgbLena
,
mean
,
stddev
);
List
<
Double
>
expectedMean
=
Arrays
.
asList
(
new
D
ouble
[]
double
expectedMean
[]
=
new
d
ouble
[]
{
105.3989906311035
,
99.56269836425781
,
179.7303047180176
}
)
;
{
105.3989906311035
,
99.56269836425781
,
179.7303047180176
};
List
<
Double
>
expectedDev
=
Arrays
.
asList
(
new
D
ouble
[]
double
expectedDev
[]
=
new
d
ouble
[]
{
33.74205485167219
,
52.8734582803278
,
49.01569488056406
}
)
;
{
33.74205485167219
,
52.8734582803278
,
49.01569488056406
};
assert
ListEquals
(
expectedMean
,
mean
,
EPS
);
assert
ArrayEquals
(
expectedMean
,
mean
.
toArray
(
null
)
,
EPS
);
assert
ListEquals
(
expectedDev
,
stddev
,
EPS
);
assert
ArrayEquals
(
expectedDev
,
stddev
.
toArray
(
null
)
,
EPS
);
}
}
public
void
testMeanStdDevMatMatMatMat
()
{
public
void
testMeanStdDevMatMatMatMat
()
{
...
@@ -1210,16 +1214,16 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -1210,16 +1214,16 @@ public class CoreTest extends OpenCVTestCase {
Mat
mask
=
gray0
.
clone
();
Mat
mask
=
gray0
.
clone
();
submat
=
mask
.
submat
(
0
,
mask
.
rows
()
/
2
,
0
,
mask
.
cols
()
/
2
);
submat
=
mask
.
submat
(
0
,
mask
.
rows
()
/
2
,
0
,
mask
.
cols
()
/
2
);
submat
.
setTo
(
new
Scalar
(
1
));
submat
.
setTo
(
new
Scalar
(
1
));
List
<
Double
>
mean
=
new
ArrayList
<
Double
>
();
CvVectorDouble
mean
=
new
CvVectorDouble
();
List
<
Double
>
stddev
=
new
ArrayList
<
Double
>
();
CvVectorDouble
stddev
=
new
CvVectorDouble
();
Core
.
meanStdDev
(
grayRnd
,
mean
,
stddev
,
mask
);
Core
.
meanStdDev
(
grayRnd
,
mean
,
stddev
,
mask
);
List
<
Double
>
expectedMean
=
Arrays
.
asList
(
new
Double
[]
{
33
d
}
)
;
double
expectedMean
[]
=
new
double
[]
{
33
d
}
;
List
<
Double
>
expectedDev
=
Arrays
.
asList
(
new
Double
[]
{
0
d
}
)
;
double
expectedDev
[]
=
new
double
[]
{
0
d
}
;
assert
ListEquals
(
expectedMean
,
mean
,
EPS
);
assert
ArrayEquals
(
expectedMean
,
mean
.
toArray
(
null
)
,
EPS
);
assert
ListEquals
(
expectedDev
,
stddev
,
EPS
);
assert
ArrayEquals
(
expectedDev
,
stddev
.
toArray
(
null
)
,
EPS
);
}
}
public
void
testMerge
()
{
public
void
testMerge
()
{
...
@@ -1280,14 +1284,15 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -1280,14 +1284,15 @@ public class CoreTest extends OpenCVTestCase {
rgba0
.
setTo
(
new
Scalar
(
10
,
20
,
30
,
40
));
rgba0
.
setTo
(
new
Scalar
(
10
,
20
,
30
,
40
));
List
<
Mat
>
src
=
Arrays
.
asList
(
rgba0
);
List
<
Mat
>
src
=
Arrays
.
asList
(
rgba0
);
List
<
Mat
>
dst
=
Arrays
.
asList
(
gray3
,
gray2
,
gray1
,
gray0
,
getMat
(
CvType
.
CV_8UC3
,
0
,
0
,
0
));
List
<
Mat
>
dst
=
Arrays
.
asList
(
gray3
,
gray2
,
gray1
,
gray0
,
getMat
(
CvType
.
CV_8UC3
,
0
,
0
,
0
));
List
<
Integer
>
fromTo
=
Arrays
.
asList
(
CvVectorInt
fromTo
=
new
CvVectorInt
(
1
,
new
int
[]
3
,
0
,
{
3
,
0
,
3
,
1
,
3
,
1
,
2
,
2
,
2
,
2
,
0
,
3
,
0
,
3
,
2
,
4
,
2
,
4
,
1
,
5
,
1
,
5
,
0
,
6
);
0
,
6
}
);
Core
.
mixChannels
(
src
,
dst
,
fromTo
);
Core
.
mixChannels
(
src
,
dst
,
fromTo
);
...
@@ -1740,8 +1745,8 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -1740,8 +1745,8 @@ public class CoreTest extends OpenCVTestCase {
public
void
testPolylinesMatListOfListOfPointBooleanScalar
()
{
public
void
testPolylinesMatListOfListOfPointBooleanScalar
()
{
Mat
img
=
gray0
;
Mat
img
=
gray0
;
List
<
List
<
Point
>>
polyline
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polyline
=
new
ArrayList
<
CvVectorPoint
>();
polyline
.
add
(
Arrays
.
asLis
t
(
new
Point
(
1
,
1
),
new
Point
(
7
,
1
),
new
Point
(
7
,
6
),
new
Point
(
1
,
6
)));
polyline
.
add
(
new
CvVectorPoin
t
(
new
Point
(
1
,
1
),
new
Point
(
7
,
1
),
new
Point
(
7
,
6
),
new
Point
(
1
,
6
)));
Core
.
polylines
(
img
,
polyline
,
true
,
new
Scalar
(
100
));
Core
.
polylines
(
img
,
polyline
,
true
,
new
Scalar
(
100
));
...
@@ -1754,8 +1759,8 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -1754,8 +1759,8 @@ public class CoreTest extends OpenCVTestCase {
public
void
testPolylinesMatListOfListOfPointBooleanScalarInt
()
{
public
void
testPolylinesMatListOfListOfPointBooleanScalarInt
()
{
Mat
img
=
gray0
;
Mat
img
=
gray0
;
List
<
List
<
Point
>>
polyline
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polyline
=
new
ArrayList
<
CvVectorPoint
>();
polyline
.
add
(
Arrays
.
asLis
t
(
new
Point
(
1
,
1
),
new
Point
(
7
,
1
),
new
Point
(
7
,
6
),
new
Point
(
1
,
6
)));
polyline
.
add
(
new
CvVectorPoin
t
(
new
Point
(
1
,
1
),
new
Point
(
7
,
1
),
new
Point
(
7
,
6
),
new
Point
(
1
,
6
)));
Core
.
polylines
(
img
,
polyline
,
true
,
new
Scalar
(
100
),
2
);
Core
.
polylines
(
img
,
polyline
,
true
,
new
Scalar
(
100
),
2
);
...
@@ -1764,10 +1769,10 @@ public class CoreTest extends OpenCVTestCase {
...
@@ -1764,10 +1769,10 @@ public class CoreTest extends OpenCVTestCase {
public
void
testPolylinesMatListOfListOfPointBooleanScalarIntIntInt
()
{
public
void
testPolylinesMatListOfListOfPointBooleanScalarIntIntInt
()
{
Mat
img
=
gray0
;
Mat
img
=
gray0
;
List
<
List
<
Point
>>
polyline1
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polyline1
=
new
ArrayList
<
CvVectorPoint
>();
polyline1
.
add
(
Arrays
.
asLis
t
(
new
Point
(
1
,
1
),
new
Point
(
7
,
1
),
new
Point
(
7
,
6
),
new
Point
(
1
,
6
)));
polyline1
.
add
(
new
CvVectorPoin
t
(
new
Point
(
1
,
1
),
new
Point
(
7
,
1
),
new
Point
(
7
,
6
),
new
Point
(
1
,
6
)));
List
<
List
<
Point
>>
polyline2
=
new
ArrayList
<
List
<
Point
>
>();
List
<
CvVectorPoint
>
polyline2
=
new
ArrayList
<
CvVectorPoint
>();
polyline2
.
add
(
Arrays
.
asLis
t
(
new
Point
(
2
,
2
),
new
Point
(
14
,
2
),
new
Point
(
14
,
12
),
new
Point
(
2
,
12
)));
polyline2
.
add
(
new
CvVectorPoin
t
(
new
Point
(
2
,
2
),
new
Point
(
14
,
2
),
new
Point
(
14
,
12
),
new
Point
(
2
,
12
)));
Core
.
polylines
(
img
,
polyline1
,
true
,
new
Scalar
(
100
),
2
,
Core
.
LINE_8
,
0
);
Core
.
polylines
(
img
,
polyline1
,
true
,
new
Scalar
(
100
),
2
,
Core
.
LINE_8
,
0
);
...
...
modules/java/src/java/core+CvVectorByte.java
View file @
51338ec7
...
@@ -7,6 +7,10 @@ public class CvVectorByte extends CvVector {
...
@@ -7,6 +7,10 @@ public class CvVectorByte extends CvVector {
super
(
_d
,
ch
);
super
(
_d
,
ch
);
}
}
public
CvVectorByte
()
{
super
(
_d
,
1
);
}
public
CvVectorByte
(
int
ch
,
long
addr
)
{
public
CvVectorByte
(
int
ch
,
long
addr
)
{
super
(
_d
,
ch
,
addr
);
super
(
_d
,
ch
,
addr
);
}
}
...
...
modules/java/src/java/core+CvVectorDMatch.java
View file @
51338ec7
...
@@ -17,9 +17,9 @@ public class CvVectorDMatch extends CvVectorFloat {
...
@@ -17,9 +17,9 @@ public class CvVectorDMatch extends CvVectorFloat {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorDMatch
(
DMatch
[]
a
)
{
public
CvVectorDMatch
(
DMatch
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
modules/java/src/java/core+CvVectorDouble.java
View file @
51338ec7
...
@@ -7,6 +7,10 @@ public class CvVectorDouble extends CvVector {
...
@@ -7,6 +7,10 @@ public class CvVectorDouble extends CvVector {
super
(
_d
,
ch
);
super
(
_d
,
ch
);
}
}
public
CvVectorDouble
()
{
super
(
_d
,
1
);
}
public
CvVectorDouble
(
int
ch
,
long
addr
)
{
public
CvVectorDouble
(
int
ch
,
long
addr
)
{
super
(
_d
,
ch
,
addr
);
super
(
_d
,
ch
,
addr
);
}
}
...
...
modules/java/src/java/core+CvVectorFloat.java
View file @
51338ec7
...
@@ -7,6 +7,10 @@ public class CvVectorFloat extends CvVector {
...
@@ -7,6 +7,10 @@ public class CvVectorFloat extends CvVector {
super
(
_d
,
ch
);
super
(
_d
,
ch
);
}
}
public
CvVectorFloat
()
{
super
(
_d
,
1
);
}
public
CvVectorFloat
(
int
ch
,
long
addr
)
{
public
CvVectorFloat
(
int
ch
,
long
addr
)
{
super
(
_d
,
ch
,
addr
);
super
(
_d
,
ch
,
addr
);
}
}
...
...
modules/java/src/java/core+CvVectorInt.java
View file @
51338ec7
...
@@ -8,6 +8,10 @@ public class CvVectorInt extends CvVector {
...
@@ -8,6 +8,10 @@ public class CvVectorInt extends CvVector {
super
(
_d
,
ch
);
super
(
_d
,
ch
);
}
}
public
CvVectorInt
()
{
super
(
_d
,
1
);
}
public
CvVectorInt
(
int
ch
,
long
addr
)
{
public
CvVectorInt
(
int
ch
,
long
addr
)
{
super
(
_d
,
ch
,
addr
);
super
(
_d
,
ch
,
addr
);
}
}
...
...
modules/java/src/java/core+CvVectorKeyPoint.java
View file @
51338ec7
...
@@ -17,9 +17,9 @@ public class CvVectorKeyPoint extends CvVectorFloat {
...
@@ -17,9 +17,9 @@ public class CvVectorKeyPoint extends CvVectorFloat {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorKeyPoint
(
KeyPoint
[]
a
)
{
public
CvVectorKeyPoint
(
KeyPoint
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
modules/java/src/java/core+CvVectorPoint.java
View file @
51338ec7
...
@@ -15,9 +15,9 @@ public class CvVectorPoint extends CvVectorInt {
...
@@ -15,9 +15,9 @@ public class CvVectorPoint extends CvVectorInt {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorPoint
(
Point
[]
a
)
{
public
CvVectorPoint
(
Point
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
modules/java/src/java/core+CvVectorPoint2f.java
View file @
51338ec7
...
@@ -15,9 +15,9 @@ public class CvVectorPoint2f extends CvVectorFloat {
...
@@ -15,9 +15,9 @@ public class CvVectorPoint2f extends CvVectorFloat {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorPoint2f
(
Point
[]
a
)
{
public
CvVectorPoint2f
(
Point
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
modules/java/src/java/core+CvVectorPoint3.java
View file @
51338ec7
...
@@ -15,9 +15,9 @@ public class CvVectorPoint3 extends CvVectorInt {
...
@@ -15,9 +15,9 @@ public class CvVectorPoint3 extends CvVectorInt {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorPoint3
(
Point3
[]
a
)
{
public
CvVectorPoint3
(
Point3
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
modules/java/src/java/core+CvVectorPoint3f.java
View file @
51338ec7
...
@@ -15,9 +15,9 @@ public class CvVectorPoint3f extends CvVectorFloat {
...
@@ -15,9 +15,9 @@ public class CvVectorPoint3f extends CvVectorFloat {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorPoint3f
(
Point3
[]
a
)
{
public
CvVectorPoint3f
(
Point3
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
modules/java/src/java/core+CvVectorRect.java
View file @
51338ec7
...
@@ -16,9 +16,9 @@ public class CvVectorRect extends CvVectorInt {
...
@@ -16,9 +16,9 @@ public class CvVectorRect extends CvVectorInt {
super
(
_ch
,
m
);
super
(
_ch
,
m
);
}
}
public
CvVectorRect
(
Rect
[]
a
)
{
public
CvVectorRect
(
Rect
...
a
)
{
super
(
_ch
);
super
(
_ch
);
if
(
a
==
null
)
if
(
a
==
null
||
a
.
length
==
0
)
return
;
return
;
int
cnt
=
a
.
length
;
int
cnt
=
a
.
length
;
create
(
cnt
);
create
(
cnt
);
...
...
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