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
39d7ecc9
Commit
39d7ecc9
authored
Nov 17, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: disabled checks for magic numbers
Results are not bit-exact
parent
dac37a0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
perf_orb.cpp
modules/features2d/perf/opencl/perf_orb.cpp
+8
-13
perf_orb.cpp
modules/features2d/perf/perf_orb.cpp
+10
-7
No files found.
modules/features2d/perf/opencl/perf_orb.cpp
View file @
39d7ecc9
...
...
@@ -27,8 +27,8 @@ OCL_PERF_TEST_P(ORBFixture, ORB_Detect, ORB_IMAGES)
OCL_TEST_CYCLE
()
detector
->
detect
(
frame
,
points
,
mask
);
std
::
sort
(
points
.
begin
(),
points
.
end
(),
comparators
::
KeypointGreater
()
);
SANITY_CHECK_
KEYPOINTS
(
points
,
1e-5
);
EXPECT_GT
(
points
.
size
(),
20u
);
SANITY_CHECK_
NOTHING
(
);
}
OCL_PERF_TEST_P
(
ORBFixture
,
ORB_Extract
,
ORB_IMAGES
)
...
...
@@ -47,13 +47,14 @@ OCL_PERF_TEST_P(ORBFixture, ORB_Extract, ORB_IMAGES)
Ptr
<
ORB
>
detector
=
ORB
::
create
(
1500
,
1.3
f
,
1
);
vector
<
KeyPoint
>
points
;
detector
->
detect
(
frame
,
points
,
mask
);
std
::
sort
(
points
.
begin
(),
points
.
end
(),
comparators
::
KeypointGreater
()
);
EXPECT_GT
(
points
.
size
(),
20u
);
UMat
descriptors
;
OCL_TEST_CYCLE
()
detector
->
compute
(
frame
,
points
,
descriptors
);
SANITY_CHECK
(
descriptors
);
EXPECT_EQ
((
size_t
)
descriptors
.
rows
,
points
.
size
());
SANITY_CHECK_NOTHING
();
}
OCL_PERF_TEST_P
(
ORBFixture
,
ORB_Full
,
ORB_IMAGES
)
...
...
@@ -61,12 +62,6 @@ OCL_PERF_TEST_P(ORBFixture, ORB_Full, ORB_IMAGES)
string
filename
=
getDataPath
(
GetParam
());
Mat
mframe
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
double
desc_eps
=
1e-6
;
#ifdef ANDROID
if
(
cv
::
ocl
::
Device
::
getDefault
().
isNVidia
())
desc_eps
=
2
;
#endif
if
(
mframe
.
empty
())
FAIL
()
<<
"Unable to load source image "
<<
filename
;
...
...
@@ -81,9 +76,9 @@ OCL_PERF_TEST_P(ORBFixture, ORB_Full, ORB_IMAGES)
OCL_TEST_CYCLE
()
detector
->
detectAndCompute
(
frame
,
mask
,
points
,
descriptors
,
false
);
::
perf
::
sort
(
points
,
descriptors
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-5
);
SANITY_CHECK
(
descriptors
,
desc_eps
);
EXPECT_GT
(
points
.
size
(),
20u
);
EXPECT_EQ
((
size_t
)
descriptors
.
rows
,
points
.
size
()
);
SANITY_CHECK
_NOTHING
(
);
}
}
// ocl
...
...
modules/features2d/perf/perf_orb.cpp
View file @
39d7ecc9
...
...
@@ -27,8 +27,9 @@ PERF_TEST_P(orb, detect, testing::Values(ORB_IMAGES))
TEST_CYCLE
()
detector
->
detect
(
frame
,
points
,
mask
);
sort
(
points
.
begin
(),
points
.
end
(),
comparators
::
KeypointGreater
());
SANITY_CHECK_KEYPOINTS
(
points
,
1e-5
);
EXPECT_GT
(
points
.
size
(),
20u
);
SANITY_CHECK_NOTHING
();
}
PERF_TEST_P
(
orb
,
extract
,
testing
::
Values
(
ORB_IMAGES
))
...
...
@@ -45,13 +46,15 @@ PERF_TEST_P(orb, extract, testing::Values(ORB_IMAGES))
Ptr
<
ORB
>
detector
=
ORB
::
create
(
1500
,
1.3
f
,
1
);
vector
<
KeyPoint
>
points
;
detector
->
detect
(
frame
,
points
,
mask
);
sort
(
points
.
begin
(),
points
.
end
(),
comparators
::
KeypointGreater
());
EXPECT_GT
(
points
.
size
(),
20u
);
Mat
descriptors
;
TEST_CYCLE
()
detector
->
compute
(
frame
,
points
,
descriptors
);
SANITY_CHECK
(
descriptors
);
EXPECT_EQ
((
size_t
)
descriptors
.
rows
,
points
.
size
());
SANITY_CHECK_NOTHING
();
}
PERF_TEST_P
(
orb
,
full
,
testing
::
Values
(
ORB_IMAGES
))
...
...
@@ -71,7 +74,7 @@ PERF_TEST_P(orb, full, testing::Values(ORB_IMAGES))
TEST_CYCLE
()
detector
->
detectAndCompute
(
frame
,
mask
,
points
,
descriptors
,
false
);
perf
::
sort
(
points
,
descriptors
);
SANITY_CHECK_KEYPOINTS
(
points
,
1e-5
);
SANITY_CHECK
(
descriptors
);
EXPECT_GT
(
points
.
size
(),
20u
);
EXPECT_EQ
((
size_t
)
descriptors
.
rows
,
points
.
size
()
);
SANITY_CHECK
_NOTHING
(
);
}
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