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
358fcbd5
Commit
358fcbd5
authored
Nov 01, 2012
by
marina.kolpakova
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #115 from asmorkalov:java_test_data_update
parents
09dec4e8
34896529
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
54 deletions
+53
-54
BruteForceDescriptorMatcherTest.java
...encv/test/features2d/BruteForceDescriptorMatcherTest.java
+6
-5
BruteForceL1DescriptorMatcherTest.java
...cv/test/features2d/BruteForceL1DescriptorMatcherTest.java
+6
-5
BruteForceSL2DescriptorMatcherTest.java
...v/test/features2d/BruteForceSL2DescriptorMatcherTest.java
+8
-7
FASTFeatureDetectorTest.java
...c/org/opencv/test/features2d/FASTFeatureDetectorTest.java
+6
-3
FlannBasedDescriptorMatcherTest.java
...encv/test/features2d/FlannBasedDescriptorMatcherTest.java
+4
-4
SIFTDescriptorExtractorTest.java
...g/opencv/test/features2d/SIFTDescriptorExtractorTest.java
+9
-17
SURFDescriptorExtractorTest.java
...g/opencv/test/features2d/SURFDescriptorExtractorTest.java
+14
-13
No files found.
modules/java/android_test/src/org/opencv/test/features2d/BruteForceDescriptorMatcherTest.java
View file @
358fcbd5
...
...
@@ -84,11 +84,11 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
matSize
=
100
;
truth
=
new
DMatch
[]
{
new
DMatch
(
0
,
0
,
0
,
1.049694f
),
new
DMatch
(
1
,
0
,
0
,
1.0
66820
f
),
new
DMatch
(
2
,
1
,
0
,
0.494587f
),
new
DMatch
(
3
,
0
,
0
,
1.141826
f
),
new
DMatch
(
4
,
0
,
0
,
1.08
4099
f
)
new
DMatch
(
0
,
0
,
0
,
1.049694
0
f
),
new
DMatch
(
1
,
0
,
0
,
1.0
984558
f
),
new
DMatch
(
2
,
1
,
0
,
0.494587
5
f
),
new
DMatch
(
3
,
1
,
0
,
0.48435235
f
),
new
DMatch
(
4
,
0
,
0
,
1.08
36693
f
)
};
super
.
setUp
();
...
...
@@ -206,6 +206,7 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
matcher
.
add
(
Arrays
.
asList
(
train
));
matcher
.
match
(
query
,
matches
);
assertArrayDMatchEquals
(
truth
,
matches
.
toArray
(),
EPS
);
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceL1DescriptorMatcherTest.java
View file @
358fcbd5
...
...
@@ -84,11 +84,11 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
matSize
=
100
;
truth
=
new
DMatch
[]
{
new
DMatch
(
0
,
1
,
0
,
6.92023
32
f
),
new
DMatch
(
1
,
0
,
0
,
6.0567350
f
),
new
DMatch
(
2
,
1
,
0
,
2.67985
87
f
),
new
DMatch
(
3
,
0
,
0
,
5.8991642
f
),
new
DMatch
(
4
,
0
,
0
,
6.1
321812
f
)
new
DMatch
(
0
,
1
,
0
,
6.92023
40
f
),
new
DMatch
(
1
,
1
,
0
,
6.1675916
f
),
new
DMatch
(
2
,
1
,
0
,
2.67985
90
f
),
new
DMatch
(
3
,
1
,
0
,
2.6545324
f
),
new
DMatch
(
4
,
0
,
0
,
6.1
294870
f
)
};
super
.
setUp
();
}
...
...
@@ -183,6 +183,7 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
matcher
.
add
(
Arrays
.
asList
(
train
));
matcher
.
match
(
query
,
matches
);
assertArrayDMatchEquals
(
truth
,
matches
.
toArray
(),
EPS
);
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/BruteForceSL2DescriptorMatcherTest.java
View file @
358fcbd5
...
...
@@ -89,11 +89,11 @@ public class BruteForceSL2DescriptorMatcherTest extends OpenCVTestCase {
matSize
=
100
;
truth
=
new
DMatch
[]
{
new
DMatch
(
0
,
0
,
0
,
1.101857
8
f
),
new
DMatch
(
1
,
0
,
0
,
1.
1381058
f
),
new
DMatch
(
0
,
0
,
0
,
1.101857
3
f
),
new
DMatch
(
1
,
0
,
0
,
1.
2066052
f
),
new
DMatch
(
2
,
1
,
0
,
0.2446168f
),
new
DMatch
(
3
,
0
,
0
,
1.3037685
f
),
new
DMatch
(
4
,
0
,
0
,
1.17
5271
9f
)
new
DMatch
(
3
,
1
,
0
,
0.23459719
f
),
new
DMatch
(
4
,
0
,
0
,
1.17
433
9f
)
};
super
.
setUp
();
...
...
@@ -189,9 +189,10 @@ public class BruteForceSL2DescriptorMatcherTest extends OpenCVTestCase {
matcher
.
add
(
Arrays
.
asList
(
train
));
matcher
.
match
(
query
,
matches
);
OpenCVTestRunner
.
Log
(
matches
);
OpenCVTestRunner
.
Log
(
matches
);
OpenCVTestRunner
.
Log
(
matches
);
OpenCVTestRunner
.
Log
(
matches
);
OpenCVTestRunner
.
Log
(
matches
);
OpenCVTestRunner
.
Log
(
matches
);
assertArrayDMatchEquals
(
truth
,
matches
.
toArray
(),
EPS
);
}
...
...
modules/java/android_test/src/org/opencv/test/features2d/FASTFeatureDetectorTest.java
View file @
358fcbd5
...
...
@@ -128,7 +128,9 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
detector
.
write
(
filename
);
String
truth
=
"<?xml version=\"1.0\"?>\n<opencv_storage>\n<name>Feature2D.FAST</name>\n<nonmaxSuppression>1</nonmaxSuppression>\n<threshold>10</threshold>\n</opencv_storage>\n"
;
assertEquals
(
truth
,
readFile
(
filename
));
String
data
=
readFile
(
filename
);
assertEquals
(
truth
,
data
);
}
public
void
testWriteYml
()
{
...
...
@@ -137,7 +139,8 @@ public class FASTFeatureDetectorTest extends OpenCVTestCase {
detector
.
write
(
filename
);
String
truth
=
"%YAML:1.0\nname: \"Feature2D.FAST\"\nnonmaxSuppression: 1\nthreshold: 10\n"
;
assertEquals
(
truth
,
readFile
(
filename
));
}
String
data
=
readFile
(
filename
);
assertEquals
(
truth
,
data
);
}
}
modules/java/android_test/src/org/opencv/test/features2d/FlannBasedDescriptorMatcherTest.java
View file @
358fcbd5
...
...
@@ -159,10 +159,10 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
truth
=
new
DMatch
[]
{
new
DMatch
(
0
,
0
,
0
,
1.049694f
),
new
DMatch
(
1
,
0
,
0
,
1.0
66820
f
),
new
DMatch
(
2
,
1
,
0
,
0.494587f
),
new
DMatch
(
3
,
0
,
0
,
1.141826
f
),
new
DMatch
(
4
,
0
,
0
,
1.08
4099
f
)
new
DMatch
(
1
,
0
,
0
,
1.0
984558
f
),
new
DMatch
(
2
,
1
,
0
,
0.494587
5
f
),
new
DMatch
(
3
,
1
,
0
,
0.48435235
f
),
new
DMatch
(
4
,
0
,
0
,
1.08
36693
f
)
};
super
.
setUp
();
...
...
modules/java/android_test/src/org/opencv/test/features2d/SIFTDescriptorExtractorTest.java
View file @
358fcbd5
...
...
@@ -34,11 +34,14 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
truth
=
new
Mat
(
1
,
128
,
CvType
.
CV_32FC1
)
{
{
put
(
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
16
,
12
,
17
,
28
,
26
,
0
,
0
,
2
,
23
,
14
,
12
,
9
,
6
,
0
,
0
,
2
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
14
,
88
,
23
,
17
,
24
,
29
,
0
,
117
,
54
,
117
,
116
,
117
,
22
,
29
,
27
,
117
,
59
,
76
,
19
,
30
,
2
,
9
,
26
,
2
,
7
,
6
,
0
,
0
,
0
,
0
,
0
,
0
,
8
,
50
,
16
,
30
,
58
,
89
,
0
,
117
,
49
,
95
,
75
,
117
,
112
,
117
,
93
,
81
,
86
,
117
,
5
,
5
,
39
,
117
,
71
,
20
,
20
,
12
,
0
,
0
,
1
,
20
,
19
,
0
,
0
,
0
,
2
,
14
,
4
,
1
,
0
,
69
,
0
,
0
,
14
,
90
,
31
,
35
,
56
,
25
,
0
,
0
,
0
,
0
,
2
,
12
,
16
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
1
);
0
,
0
,
0
,
1
,
3
,
0
,
0
,
0
,
15
,
23
,
22
,
20
,
24
,
2
,
0
,
0
,
7
,
8
,
2
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
27
,
16
,
13
,
2
,
0
,
0
,
117
,
86
,
79
,
68
,
117
,
42
,
5
,
5
,
79
,
60
,
117
,
25
,
9
,
2
,
28
,
19
,
11
,
13
,
20
,
2
,
0
,
0
,
5
,
8
,
0
,
0
,
76
,
58
,
34
,
31
,
97
,
16
,
95
,
49
,
117
,
92
,
117
,
112
,
117
,
76
,
117
,
54
,
117
,
25
,
29
,
22
,
117
,
117
,
16
,
11
,
14
,
1
,
0
,
0
,
22
,
26
,
0
,
0
,
0
,
0
,
1
,
4
,
15
,
2
,
47
,
8
,
0
,
0
,
82
,
56
,
31
,
17
,
81
,
12
,
0
,
0
,
26
,
23
,
18
,
23
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
}
};
...
...
@@ -76,18 +79,7 @@ public class SIFTDescriptorExtractorTest extends OpenCVTestCase {
}
public
void
testRead
()
{
MatOfKeyPoint
keypoints
=
new
MatOfKeyPoint
(
keypoint
);
Mat
img
=
getTestImg
();
Mat
descriptors
=
new
Mat
();
String
filename
=
OpenCVTestRunner
.
getTempFileName
(
"yml"
);
writeFile
(
filename
,
"%YAML:1.0\nmagnification: 3.\nisNormalize: 1\nrecalculateAngles: 1\nnOctaves: 6\nnOctaveLayers: 4\nfirstOctave: -1\nangleMode: 0\n"
);
extractor
.
read
(
filename
);
extractor
.
compute
(
img
,
keypoints
,
descriptors
);
assertMatNotEqual
(
truth
,
descriptors
,
EPS
);
fail
(
"Not yet implemented"
);
}
public
void
testWrite
()
{
...
...
modules/java/android_test/src/org/opencv/test/features2d/SURFDescriptorExtractorTest.java
View file @
358fcbd5
...
...
@@ -47,19 +47,20 @@ public class SURFDescriptorExtractorTest extends OpenCVTestCase {
Mat
truth
=
new
Mat
(
1
,
128
,
CvType
.
CV_32FC1
)
{
{
put
(
0
,
0
,
-
0.0041138371
,
0.0041138371
,
0
,
0
,
0
,
0
,
0.0014427509
,
0.0014427509
,
-
0.0081971241
,
0.034624498
,
0.032569118
,
0.032569118
,
-
0.007222258
,
0.0076424959
,
0.0033254174
,
0.0033254174
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
0.10815519
,
0.38033518
,
0.24314292
,
0.24314292
,
-
0.068393648
,
0.068393648
,
0.039715949
,
0.039715949
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
8.7263528
e
-
05
,
8.7263528
e
-
05
,
-
6.0081031
e
-
05
,
6.0081031
e
-
05
,
-
0.00012158759
,
0.00012158759
,
0.0033254174
,
0.0033254174
,
-
0.007222258
,
0.0076424964
,
0.0081971241
,
0.034624498
,
-
0.032569118
,
0.032569118
,
-
0.077379324
,
0.27552885
,
0.14366581
,
0.31175563
,
-
0.013609707
,
0.24329227
,
-
0.091054246
,
0.17476201
,
0.022970313
,
0.022970313
,
-
0.035123408
,
0.035771687
,
0.1907353
,
0.3838968
,
-
0.31571922
,
0.31571922
,
0.0092833797
,
0.0092833797
,
-
0.012892088
,
0.012957365
,
0.029558292
,
0.073337689
,
-
0.043703932
,
0.043703932
,
0.0014427509
,
0.0014427509
,
0
,
0
,
0.0041138371
,
0.0041138371
,
0
,
0
,
-
0.02955829
,
0.073337704
,
0.043703932
,
0.043703932
,
-
0.012892087
,
0.012957364
,
0.0092833797
,
0.0092833797
,
6.0081031
e
-
05
,
6.0081031
e
-
05
,
0.00012158759
,
0.00012158759
,
-
8.7263528
e
-
05
,
8.7263528
e
-
05
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0.045382127
,
0.075976953
,
-
0.031969212
,
0.035002094
,
0.012224297
,
0.012286193
,
-
0.0088025155
,
0.0088025155
,
0.00017225844
,
0.00017225844
,
0
,
0
,
8.2743405
e
-
05
,
8.2743405
e
-
05
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
8.2743405
e
-
05
,
8.2743405
e
-
05
,
-
0.00017225844
,
0.00017225844
,
0
,
0
,
0.31723264
,
0.42715758
,
-
0.19872268
,
0.23621935
,
0.033304065
,
0.033918764
,
-
0.021780485
,
0.021780485
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
0.0088025145
,
0.0088025145
,
0.012224296
,
0.012286192
,
-
0.045382123
,
0.075976953
,
0.031969212
,
0.035002094
,
0.10047197
,
0.21463872
,
-
0.0012294546
,
0.18176091
,
-
0.075555265
,
0.35627601
,
0.01270232
,
0.20058797
,
-
0.037658721
,
0.037658721
,
0.064850949
,
0.064850949
,
-
0.27688536
,
0.44229308
,
0.14888979
,
0.14888979
,
-
0.0031531656
,
0.0031531656
,
0.0068481555
,
0.0072466261
,
-
0.034193151
,
0.040314503
,
0.01108359
,
0.023398584
,
-
0.00071876607
,
0.00071876607
,
-
0.0031819802
,
0.0031819802
,
0
,
0
,
-
0.0013680183
,
0.0013680183
,
0.034193147
,
0.040314503
,
-
0.01108359
,
0.023398584
,
0.006848156
,
0.0072466265
,
-
0.0031531656
,
0.0031531656
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
0.0013680183
,
0.0013680183
,
0
,
0
,
0.00071876607
,
0.00071876607
,
0.0031819802
,
0.0031819802
);
}
};
...
...
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