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
162384a8
Commit
162384a8
authored
Oct 16, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed several test failures; currently 9 out of 73 tests fail
parent
06d4aa60
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
25 deletions
+67
-25
akaze.cpp
modules/features2d/src/akaze.cpp
+22
-0
brisk.cpp
modules/features2d/src/brisk.cpp
+1
-1
feature2d.cpp
modules/features2d/src/feature2d.cpp
+10
-0
kaze.cpp
modules/features2d/src/kaze.cpp
+20
-0
KAZEFeatures.cpp
modules/features2d/src/kaze/KAZEFeatures.cpp
+1
-1
test_brisk.cpp
modules/features2d/test/test_brisk.cpp
+1
-1
test_matchers_algorithmic.cpp
modules/features2d/test/test_matchers_algorithmic.cpp
+4
-2
test_orb.cpp
modules/features2d/test/test_orb.cpp
+1
-3
test_rotation_and_scale_invariance.cpp
...es/features2d/test/test_rotation_and_scale_invariance.cpp
+7
-17
No files found.
modules/features2d/src/akaze.cpp
View file @
162384a8
...
...
@@ -187,6 +187,28 @@ namespace cv
}
}
void
write
(
FileStorage
&
fs
)
const
{
fs
<<
"descriptor"
<<
descriptor
;
fs
<<
"descriptor_channels"
<<
descriptor_channels
;
fs
<<
"descriptor_size"
<<
descriptor_size
;
fs
<<
"threshold"
<<
threshold
;
fs
<<
"octaves"
<<
octaves
;
fs
<<
"sublevels"
<<
sublevels
;
fs
<<
"diffusivity"
<<
diffusivity
;
}
void
read
(
const
FileNode
&
fn
)
{
descriptor
=
(
int
)
fn
[
"descriptor"
];
descriptor_channels
=
(
int
)
fn
[
"descriptor_channels"
];
descriptor_size
=
(
int
)
fn
[
"descriptor_size"
];
threshold
=
(
float
)
fn
[
"threshold"
];
octaves
=
(
int
)
fn
[
"octaves"
];
sublevels
=
(
int
)
fn
[
"sublevels"
];
diffusivity
=
(
int
)
fn
[
"diffusivity"
];
}
int
descriptor
;
int
descriptor_channels
;
int
descriptor_size
;
...
...
modules/features2d/src/brisk.cpp
View file @
162384a8
...
...
@@ -2099,7 +2099,7 @@ BriskLayer::BriskLayer(const BriskLayer& layer, int mode)
void
BriskLayer
::
getAgastPoints
(
int
threshold
,
std
::
vector
<
KeyPoint
>&
keypoints
)
{
fast_9_16_
->
set
(
"threshold"
,
threshold
);
fast_9_16_
=
FastFeatureDetector
::
create
(
threshold
);
fast_9_16_
->
detect
(
img_
,
keypoints
);
// also write scores
...
...
modules/features2d/src/feature2d.cpp
View file @
162384a8
...
...
@@ -60,6 +60,11 @@ void Feature2D::detect( InputArray image,
std
::
vector
<
KeyPoint
>&
keypoints
,
InputArray
mask
)
{
if
(
image
.
empty
()
)
{
keypoints
.
clear
();
return
;
}
detectAndCompute
(
image
,
mask
,
keypoints
,
noArray
(),
false
);
}
...
...
@@ -97,6 +102,11 @@ void Feature2D::compute( InputArray image,
std
::
vector
<
KeyPoint
>&
keypoints
,
OutputArray
descriptors
)
{
if
(
image
.
empty
()
)
{
descriptors
.
release
();
return
;
}
detectAndCompute
(
image
,
noArray
(),
keypoints
,
descriptors
,
true
);
}
...
...
modules/features2d/src/kaze.cpp
View file @
162384a8
...
...
@@ -132,6 +132,26 @@ namespace cv
}
}
void
write
(
FileStorage
&
fs
)
const
{
fs
<<
"extended"
<<
(
int
)
extended
;
fs
<<
"upright"
<<
(
int
)
upright
;
fs
<<
"threshold"
<<
threshold
;
fs
<<
"octaves"
<<
octaves
;
fs
<<
"sublevels"
<<
sublevels
;
fs
<<
"diffusivity"
<<
diffusivity
;
}
void
read
(
const
FileNode
&
fn
)
{
extended
=
(
int
)
fn
[
"extended"
]
!=
0
;
upright
=
(
int
)
fn
[
"upright"
]
!=
0
;
threshold
=
(
float
)
fn
[
"threshold"
];
octaves
=
(
int
)
fn
[
"octaves"
];
sublevels
=
(
int
)
fn
[
"sublevels"
];
diffusivity
=
(
int
)
fn
[
"diffusivity"
];
}
bool
extended
;
bool
upright
;
float
threshold
;
...
...
modules/features2d/src/kaze/KAZEFeatures.cpp
View file @
162384a8
...
...
@@ -145,7 +145,7 @@ int KAZEFeatures::Create_Nonlinear_Scale_Space(const Mat &img)
*/
void
KAZEFeatures
::
Compute_KContrast
(
const
Mat
&
img
,
const
float
&
kpercentile
)
{
options_
.
kcontrast
=
compute_k_percentile
(
img
,
kpercentile
,
options_
.
sderivatives
,
options_
.
kcontrast_bins
,
0
,
0
);
options_
.
kcontrast
=
compute_k_percentile
(
img
,
kpercentile
,
options_
.
sderivatives
,
options_
.
kcontrast_bins
,
0
,
0
);
}
/* ************************************************************************* */
...
...
modules/features2d/test/test_brisk.cpp
View file @
162384a8
...
...
@@ -72,7 +72,7 @@ void CV_BRISKTest::run( int )
cvtColor
(
image1
,
gray1
,
COLOR_BGR2GRAY
);
cvtColor
(
image2
,
gray2
,
COLOR_BGR2GRAY
);
Ptr
<
FeatureDetector
>
detector
=
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.BRISK"
);
Ptr
<
FeatureDetector
>
detector
=
BRISK
::
create
(
);
vector
<
KeyPoint
>
keypoints1
;
vector
<
KeyPoint
>
keypoints2
;
...
...
modules/features2d/test/test_matchers_algorithmic.cpp
View file @
162384a8
...
...
@@ -532,12 +532,14 @@ void CV_DescriptorMatcherTest::run( int )
TEST
(
Features2d_DescriptorMatcher_BruteForce
,
regression
)
{
CV_DescriptorMatcherTest
test
(
"descriptor-matcher-brute-force"
,
Algorithm
::
create
<
DescriptorMatcher
>
(
"DescriptorMatcher.BFMatcher"
),
0.01
f
);
CV_DescriptorMatcherTest
test
(
"descriptor-matcher-brute-force"
,
DescriptorMatcher
::
create
(
"BFMatcher"
),
0.01
f
);
test
.
safe_run
();
}
TEST
(
Features2d_DescriptorMatcher_FlannBased
,
regression
)
{
CV_DescriptorMatcherTest
test
(
"descriptor-matcher-flann-based"
,
Algorithm
::
create
<
DescriptorMatcher
>
(
"DescriptorMatcher.FlannBasedMatcher"
),
0.04
f
);
CV_DescriptorMatcherTest
test
(
"descriptor-matcher-flann-based"
,
DescriptorMatcher
::
create
(
"FlannBasedMatcher"
),
0.04
f
);
test
.
safe_run
();
}
modules/features2d/test/test_orb.cpp
View file @
162384a8
...
...
@@ -47,9 +47,7 @@ using namespace cv;
TEST
(
Features2D_ORB
,
_1996
)
{
Ptr
<
FeatureDetector
>
fd
=
ORB
::
create
();
fd
->
set
(
"nFeatures"
,
10000
);
//setting a higher maximum to make effect of threshold visible
fd
->
set
(
"fastThreshold"
,
20
);
//more features than the default
Ptr
<
FeatureDetector
>
fd
=
ORB
::
create
(
10000
,
1.2
f
,
8
,
31
,
0
,
2
,
ORB
::
HARRIS_SCORE
,
31
,
20
);
Ptr
<
DescriptorExtractor
>
de
=
fd
;
Mat
image
=
imread
(
string
(
cvtest
::
TS
::
ptr
()
->
get_data_path
())
+
"shared/lena.png"
);
...
...
modules/features2d/test/test_rotation_and_scale_invariance.cpp
View file @
162384a8
...
...
@@ -615,19 +615,15 @@ TEST(Features2d_RotationInvariance_Detector_ORB, regression)
TEST
(
Features2d_RotationInvariance_Descriptor_BRISK
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.BRISK"
),
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.BRISK"
),
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.BRISK"
)
->
defaultNorm
(),
0.99
f
);
Ptr
<
Feature2D
>
f2d
=
BRISK
::
create
();
DescriptorRotationInvarianceTest
test
(
f2d
,
f2d
,
f2d
->
defaultNorm
(),
0.99
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Descriptor_ORB
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.ORB"
),
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.ORB"
),
Algorithm
::
create
<
DescriptorExtractor
>
(
"Feature2D.ORB"
)
->
defaultNorm
(),
0.99
f
);
Ptr
<
Feature2D
>
f2d
=
ORB
::
create
();
DescriptorRotationInvarianceTest
test
(
f2d
,
f2d
,
f2d
->
defaultNorm
(),
0.99
f
);
test
.
safe_run
();
}
...
...
@@ -646,25 +642,19 @@ TEST(Features2d_RotationInvariance_Descriptor_ORB, regression)
TEST
(
Features2d_ScaleInvariance_Detector_BRISK
,
regression
)
{
DetectorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.BRISK"
),
0.08
f
,
0.49
f
);
DetectorScaleInvarianceTest
test
(
BRISK
::
create
(),
0.08
f
,
0.49
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Detector_KAZE
,
regression
)
{
DetectorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.KAZE"
),
0.08
f
,
0.49
f
);
DetectorScaleInvarianceTest
test
(
KAZE
::
create
(),
0.08
f
,
0.49
f
);
test
.
safe_run
();
}
TEST
(
Features2d_ScaleInvariance_Detector_AKAZE
,
regression
)
{
DetectorScaleInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.AKAZE"
),
0.08
f
,
0.49
f
);
DetectorScaleInvarianceTest
test
(
AKAZE
::
create
(),
0.08
f
,
0.49
f
);
test
.
safe_run
();
}
...
...
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