Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
17c45536
Commit
17c45536
authored
Feb 07, 2017
by
Vladislav Sovrasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: use new api in perf tests
parent
4c020d69
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
perf_reg.cpp
modules/reg/perf/perf_reg.cpp
+10
-15
No files found.
modules/reg/perf/perf_reg.cpp
View file @
17c45536
...
...
@@ -72,10 +72,9 @@ Vec<double, 2> perfShift(const Mat& img1)
mapTest
.
warp
(
img1
,
img2
);
// Register
MapperGradShift
mapper
;
Ptr
<
MapperGradShift
>
mapper
=
makePtr
<
MapperGradShift
>
()
;
MapperPyramid
mappPyr
(
mapper
);
Ptr
<
Map
>
mapPtr
;
mappPyr
.
calculate
(
img1
,
img2
,
mapPtr
);
Ptr
<
Map
>
mapPtr
=
mappPyr
.
calculate
(
img1
,
img2
);
MapShift
*
mapShift
=
dynamic_cast
<
MapShift
*>
(
mapPtr
.
get
());
return
mapShift
->
getShift
();
...
...
@@ -96,10 +95,9 @@ Matx<double, 2, 6> perfEuclidean(const Mat& img1)
mapTest
.
warp
(
img1
,
img2
);
// Register
MapperGradEuclid
mapper
;
Ptr
<
MapperGradEuclid
>
mapper
=
makePtr
<
MapperGradEuclid
>
()
;
MapperPyramid
mappPyr
(
mapper
);
Ptr
<
Map
>
mapPtr
;
mappPyr
.
calculate
(
img1
,
img2
,
mapPtr
);
Ptr
<
Map
>
mapPtr
=
mappPyr
.
calculate
(
img1
,
img2
);
MapAffine
*
mapAff
=
dynamic_cast
<
MapAffine
*>
(
mapPtr
.
get
());
Matx
<
double
,
2
,
2
>
resLinTr
=
mapAff
->
getLinTr
();
...
...
@@ -127,10 +125,9 @@ Matx<double, 2, 6> perfSimilarity(const Mat& img1)
mapTest
.
warp
(
img1
,
img2
);
// Register
MapperGradSimilar
mapper
;
Ptr
<
MapperGradSimilar
>
mapper
=
makePtr
<
MapperGradSimilar
>
()
;
MapperPyramid
mappPyr
(
mapper
);
Ptr
<
Map
>
mapPtr
;
mappPyr
.
calculate
(
img1
,
img2
,
mapPtr
);
Ptr
<
Map
>
mapPtr
=
mappPyr
.
calculate
(
img1
,
img2
);
MapAffine
*
mapAff
=
dynamic_cast
<
MapAffine
*>
(
mapPtr
.
get
());
Matx
<
double
,
2
,
2
>
resLinTr
=
mapAff
->
getLinTr
();
...
...
@@ -154,10 +151,9 @@ Matx<double, 2, 6> perfAffine(const Mat& img1)
mapTest
.
warp
(
img1
,
img2
);
// Register
MapperGradAffine
mapper
;
Ptr
<
MapperGradAffine
>
mapper
=
makePtr
<
MapperGradAffine
>
()
;
MapperPyramid
mappPyr
(
mapper
);
Ptr
<
Map
>
mapPtr
;
mappPyr
.
calculate
(
img1
,
img2
,
mapPtr
);
Ptr
<
Map
>
mapPtr
=
mappPyr
.
calculate
(
img1
,
img2
);
MapAffine
*
mapAff
=
dynamic_cast
<
MapAffine
*>
(
mapPtr
.
get
());
Matx
<
double
,
2
,
2
>
resLinTr
=
mapAff
->
getLinTr
();
...
...
@@ -179,10 +175,9 @@ Matx<double, 3, 3> perfProjective(const Mat& img1)
mapTest
.
warp
(
img1
,
img2
);
// Register
MapperGradProj
mapper
;
Ptr
<
MapperGradProj
>
mapper
=
makePtr
<
MapperGradProj
>
()
;
MapperPyramid
mappPyr
(
mapper
);
Ptr
<
Map
>
mapPtr
;
mappPyr
.
calculate
(
img1
,
img2
,
mapPtr
);
Ptr
<
Map
>
mapPtr
=
mappPyr
.
calculate
(
img1
,
img2
);
MapProjec
*
mapProj
=
dynamic_cast
<
MapProjec
*>
(
mapPtr
.
get
());
mapProj
->
normalize
();
...
...
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