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
f2ec7eeb
Commit
f2ec7eeb
authored
Mar 02, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10966 from alalek:verbose_features2d_test
parents
e869bb6b
da6dc677
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
test_nearestneighbors.cpp
modules/features2d/test/test_nearestneighbors.cpp
+7
-11
No files found.
modules/features2d/test/test_nearestneighbors.cpp
View file @
f2ec7eeb
...
...
@@ -112,11 +112,7 @@ int NearestNeighborTest::checkFind( const Mat& data )
}
double
correctPerc
=
correctMatches
/
(
double
)
pointsCount
;
if
(
correctPerc
<
.75
)
{
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"correct_perc = %d
\n
"
,
correctPerc
);
code
=
cvtest
::
TS
::
FAIL_BAD_ACCURACY
;
}
EXPECT_GE
(
correctPerc
,
.75
)
<<
"correctMatches="
<<
correctMatches
<<
" pointsCount="
<<
pointsCount
;
}
return
code
;
...
...
@@ -152,6 +148,7 @@ void NearestNeighborTest::run( int /*start_from*/ ) {
releaseModel
();
if
(
::
testing
::
Test
::
HasFailure
())
code
=
cvtest
::
TS
::
FAIL_BAD_ACCURACY
;
ts
->
set_failed_test_info
(
code
);
}
...
...
@@ -201,10 +198,9 @@ int CV_FlannTest::knnSearch( Mat& points, Mat& neighbors )
}
// compare results
if
(
cvtest
::
norm
(
neighbors
,
neighbors1
,
NORM_L1
)
!=
0
)
return
cvtest
::
TS
::
FAIL_BAD_ACCURACY
;
EXPECT_LE
(
cvtest
::
norm
(
neighbors
,
neighbors1
,
NORM_L1
),
0
);
return
cvtest
::
TS
::
OK
;
return
::
testing
::
Test
::
HasFailure
()
?
cvtest
::
TS
::
FAIL_BAD_ACCURACY
:
cvtest
::
TS
::
OK
;
}
int
CV_FlannTest
::
radiusSearch
(
Mat
&
points
,
Mat
&
neighbors
)
...
...
@@ -232,11 +228,11 @@ int CV_FlannTest::radiusSearch( Mat& points, Mat& neighbors )
for
(
j
=
0
;
it
!=
indices
.
end
();
++
it
,
j
++
)
neighbors1
.
at
<
int
>
(
i
,
j
)
=
*
it
;
}
// compare results
if
(
cvtest
::
norm
(
neighbors
,
neighbors1
,
NORM_L1
)
!=
0
)
return
cvtest
::
TS
::
FAIL_BAD_ACCURACY
;
EXPECT_LE
(
cvtest
::
norm
(
neighbors
,
neighbors1
,
NORM_L1
),
0
);
return
cvtest
::
TS
::
OK
;
return
::
testing
::
Test
::
HasFailure
()
?
cvtest
::
TS
::
FAIL_BAD_ACCURACY
:
cvtest
::
TS
::
OK
;
}
void
CV_FlannTest
::
releaseModel
()
...
...
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