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
5120d690
Commit
5120d690
authored
Jul 14, 2012
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed nonfree rotation invariance tests for detectors
parent
2c0455da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test_rotation_invariance.cpp
modules/nonfree/test/test_rotation_invariance.cpp
+6
-6
No files found.
modules/nonfree/test/test_rotation_invariance.cpp
View file @
5120d690
...
...
@@ -185,9 +185,8 @@ protected:
{
inliersCount
++
;
const
float
maxAngleDiff
=
3.
f
;
// grad
float
angle0
=
keypoints0
[
m0
].
angle
;
const
float
maxAngleDiff
=
15.
f
;
// grad
float
angle0
=
keypoints0
[
m0
].
angle
;
float
angle1
=
keypoints1
[
nearestPointIndex
].
angle
;
if
(
angle0
==
-
1
||
angle1
==
-
1
)
CV_Error
(
CV_StsBadArg
,
"Given FeatureDetector is not rotation invariant, it can not be tested here.
\n
"
);
...
...
@@ -199,7 +198,8 @@ protected:
rotAngle0
-=
360.
f
;
float
angleDiff
=
std
::
max
(
rotAngle0
,
angle1
)
-
std
::
min
(
rotAngle0
,
angle1
);
angleDiff
=
std
::
min
(
angleDiff
,
static_cast
<
float
>
(
2.
*
CV_PI
-
angleDiff
));
angleDiff
=
std
::
min
(
angleDiff
,
static_cast
<
float
>
(
360.
f
-
angleDiff
));
CV_Assert
(
angleDiff
>=
0.
f
);
bool
isAngleCorrect
=
angleDiff
<
maxAngleDiff
;
if
(
isAngleCorrect
)
...
...
@@ -243,13 +243,13 @@ protected:
TEST
(
Features2d_RotationInvariance_Detector_SURF
,
regression
)
{
DetectorRotatationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
),
0.60
f
,
0.
94
f
);
DetectorRotatationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SURF"
),
0.60
f
,
0.
76
f
);
test
.
safe_run
();
}
TEST
(
Features2d_RotationInvariance_Detector_SIFT
,
regression
)
{
DetectorRotatationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SIFT"
),
0.76
f
,
0.
99
f
);
DetectorRotatationInvarianceTest
test
(
Algorithm
::
create
<
FeatureDetector
>
(
"Feature2D.SIFT"
),
0.76
f
,
0.
76
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