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
6983774d
Commit
6983774d
authored
Feb 02, 2017
by
Vladislav Sovrasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: use IOArrays in public API
parent
81049548
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
37 additions
and
29 deletions
+37
-29
map.hpp
modules/reg/include/opencv2/reg/map.hpp
+2
-2
mapaffine.hpp
modules/reg/include/opencv2/reg/mapaffine.hpp
+1
-1
mapper.hpp
modules/reg/include/opencv2/reg/mapper.hpp
+1
-1
mappergradaffine.hpp
modules/reg/include/opencv2/reg/mappergradaffine.hpp
+1
-1
mappergradeuclid.hpp
modules/reg/include/opencv2/reg/mappergradeuclid.hpp
+1
-1
mappergradproj.hpp
modules/reg/include/opencv2/reg/mappergradproj.hpp
+1
-1
mappergradshift.hpp
modules/reg/include/opencv2/reg/mappergradshift.hpp
+1
-1
mappergradsimilar.hpp
modules/reg/include/opencv2/reg/mappergradsimilar.hpp
+1
-1
mapperpyramid.hpp
modules/reg/include/opencv2/reg/mapperpyramid.hpp
+1
-1
mapprojec.hpp
modules/reg/include/opencv2/reg/mapprojec.hpp
+1
-1
mapshift.hpp
modules/reg/include/opencv2/reg/mapshift.hpp
+1
-1
map.cpp
modules/reg/src/map.cpp
+1
-1
mapaffine.cpp
modules/reg/src/mapaffine.cpp
+2
-1
mappergradaffine.cpp
modules/reg/src/mappergradaffine.cpp
+3
-3
mappergradeuclid.cpp
modules/reg/src/mappergradeuclid.cpp
+3
-2
mappergradproj.cpp
modules/reg/src/mappergradproj.cpp
+3
-2
mappergradshift.cpp
modules/reg/src/mappergradshift.cpp
+3
-2
mappergradsimilar.cpp
modules/reg/src/mappergradsimilar.cpp
+3
-2
mapperpyramid.cpp
modules/reg/src/mapperpyramid.cpp
+3
-2
mapprojec.cpp
modules/reg/src/mapprojec.cpp
+2
-1
mapshift.cpp
modules/reg/src/mapshift.cpp
+2
-1
No files found.
modules/reg/include/opencv2/reg/map.hpp
View file @
6983774d
...
...
@@ -136,7 +136,7 @@ public:
* \param[in] img1 Original image
* \param[out] img2 Warped image
*/
virtual
void
warp
(
const
cv
::
Mat
&
img1
,
cv
::
Mat
&
img2
)
const
;
virtual
void
warp
(
InputArray
img1
,
OutputArray
img2
)
const
;
/*!
* Warps image to a new coordinate frame. The calculation is img2(x)=img1(T(x)), so in fact
...
...
@@ -145,7 +145,7 @@ public:
* \param[in] img1 Original image
* \param[out] img2 Warped image
*/
virtual
void
inverseWarp
(
const
cv
::
Mat
&
img1
,
cv
::
Mat
&
img2
)
const
=
0
;
virtual
void
inverseWarp
(
InputArray
img1
,
OutputArray
img2
)
const
=
0
;
/*!
* Calculates the inverse map
...
...
modules/reg/include/opencv2/reg/mapaffine.hpp
View file @
6983774d
...
...
@@ -69,7 +69,7 @@ public:
*/
~
MapAffine
(
void
);
void
inverseWarp
(
const
cv
::
Mat
&
img1
,
cv
::
Mat
&
img2
)
const
;
void
inverseWarp
(
InputArray
img1
,
OutputArray
img2
)
const
;
cv
::
Ptr
<
Map
>
inverseMap
(
void
)
const
;
...
...
modules/reg/include/opencv2/reg/mapper.hpp
View file @
6983774d
...
...
@@ -63,7 +63,7 @@ public:
* \param[in,out] res Map from img1 to img2, stored in a smart pointer. If present as input,
* it is an initial rough estimation that the mapper will try to refine.
*/
virtual
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
=
0
;
virtual
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
=
0
;
/*
* Returns a map compatible with the Mapper class
...
...
modules/reg/include/opencv2/reg/mappergradaffine.hpp
View file @
6983774d
...
...
@@ -55,7 +55,7 @@ public:
MapperGradAffine
(
void
);
~
MapperGradAffine
(
void
);
virtual
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
virtual
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
cv
::
Ptr
<
Map
>
getMap
(
void
)
const
;
};
...
...
modules/reg/include/opencv2/reg/mappergradeuclid.hpp
View file @
6983774d
...
...
@@ -55,7 +55,7 @@ public:
MapperGradEuclid
(
void
);
~
MapperGradEuclid
(
void
);
virtual
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
virtual
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
cv
::
Ptr
<
Map
>
getMap
(
void
)
const
;
};
...
...
modules/reg/include/opencv2/reg/mappergradproj.hpp
View file @
6983774d
...
...
@@ -55,7 +55,7 @@ public:
MapperGradProj
(
void
);
~
MapperGradProj
(
void
);
virtual
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
virtual
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
cv
::
Ptr
<
Map
>
getMap
(
void
)
const
;
};
...
...
modules/reg/include/opencv2/reg/mappergradshift.hpp
View file @
6983774d
...
...
@@ -55,7 +55,7 @@ public:
MapperGradShift
(
void
);
virtual
~
MapperGradShift
(
void
);
virtual
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
virtual
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
cv
::
Ptr
<
Map
>
getMap
(
void
)
const
;
};
...
...
modules/reg/include/opencv2/reg/mappergradsimilar.hpp
View file @
6983774d
...
...
@@ -55,7 +55,7 @@ public:
MapperGradSimilar
(
void
);
~
MapperGradSimilar
(
void
);
virtual
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
virtual
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
cv
::
Ptr
<
Map
>
getMap
(
void
)
const
;
};
...
...
modules/reg/include/opencv2/reg/mapperpyramid.hpp
View file @
6983774d
...
...
@@ -59,7 +59,7 @@ public:
*/
MapperPyramid
(
const
Mapper
&
baseMapper
);
void
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
void
calculate
(
InputArray
img1
,
InputArray
img2
,
cv
::
Ptr
<
Map
>&
res
)
const
;
cv
::
Ptr
<
Map
>
getMap
(
void
)
const
;
...
...
modules/reg/include/opencv2/reg/mapprojec.hpp
View file @
6983774d
...
...
@@ -69,7 +69,7 @@ public:
*/
~
MapProjec
(
void
);
void
inverseWarp
(
const
cv
::
Mat
&
img1
,
cv
::
Mat
&
img2
)
const
;
void
inverseWarp
(
InputArray
img1
,
OutputArray
img2
)
const
;
cv
::
Ptr
<
Map
>
inverseMap
(
void
)
const
;
...
...
modules/reg/include/opencv2/reg/mapshift.hpp
View file @
6983774d
...
...
@@ -69,7 +69,7 @@ public:
*/
~
MapShift
(
void
);
void
inverseWarp
(
const
cv
::
Mat
&
img1
,
cv
::
Mat
&
img2
)
const
;
void
inverseWarp
(
InputArray
img1
,
OutputArray
img2
)
const
;
cv
::
Ptr
<
Map
>
inverseMap
(
void
)
const
;
...
...
modules/reg/src/map.cpp
View file @
6983774d
...
...
@@ -49,7 +49,7 @@ Map::~Map(void)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
Map
::
warp
(
const
Mat
&
img1
,
Mat
&
img2
)
const
void
Map
::
warp
(
InputArray
img1
,
OutputArray
img2
)
const
{
Ptr
<
Map
>
invMap
(
inverseMap
());
invMap
->
inverseWarp
(
img1
,
img2
);
...
...
modules/reg/src/mapaffine.cpp
View file @
6983774d
...
...
@@ -62,8 +62,9 @@ MapAffine::~MapAffine(void)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapAffine
::
inverseWarp
(
const
Mat
&
img1
,
Mat
&
img2
)
const
void
MapAffine
::
inverseWarp
(
InputArray
_img1
,
OutputArray
img2
)
const
{
Mat
img1
=
_img1
.
getMat
();
// Rows and columns in destination
Mat
dest_r
,
dest_c
;
dest_r
.
create
(
img1
.
size
(),
CV_32FC1
);
...
...
modules/reg/src/mappergradaffine.cpp
View file @
6983774d
...
...
@@ -56,9 +56,9 @@ MapperGradAffine::~MapperGradAffine(void)
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapperGradAffine
::
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
void
MapperGradAffine
::
calculate
(
InputArray
_img1
,
InputArray
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
{
Mat
img1
=
_img1
.
getMat
();
Mat
gradx
,
grady
,
imgDiff
;
Mat
img2
;
...
...
@@ -70,7 +70,7 @@ void MapperGradAffine::calculate(
// We have initial values for the registration: we move img2 to that initial reference
res
->
inverseWarp
(
image2
,
img2
);
}
else
{
img2
=
image2
;
img2
=
image2
.
getMat
()
;
}
// Get gradient in all channels
...
...
modules/reg/src/mappergradeuclid.cpp
View file @
6983774d
...
...
@@ -57,8 +57,9 @@ MapperGradEuclid::~MapperGradEuclid(void)
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapperGradEuclid
::
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
InputArray
_img1
,
InputArray
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
{
Mat
img1
=
_img1
.
getMat
();
Mat
gradx
,
grady
,
imgDiff
;
Mat
img2
;
...
...
@@ -70,7 +71,7 @@ void MapperGradEuclid::calculate(
// We have initial values for the registration: we move img2 to that initial reference
res
->
inverseWarp
(
image2
,
img2
);
}
else
{
img2
=
image2
;
img2
=
image2
.
getMat
()
;
}
// Matrices with reference frame coordinates
...
...
modules/reg/src/mappergradproj.cpp
View file @
6983774d
...
...
@@ -57,8 +57,9 @@ MapperGradProj::~MapperGradProj(void)
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapperGradProj
::
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
InputArray
_img1
,
InputArray
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
{
Mat
img1
=
_img1
.
getMat
();
Mat
gradx
,
grady
,
imgDiff
;
Mat
img2
;
...
...
@@ -70,7 +71,7 @@ void MapperGradProj::calculate(
// We have initial values for the registration: we move img2 to that initial reference
res
->
inverseWarp
(
image2
,
img2
);
}
else
{
img2
=
image2
;
img2
=
image2
.
getMat
()
;
}
// Get gradient in all channels
...
...
modules/reg/src/mappergradshift.cpp
View file @
6983774d
...
...
@@ -57,8 +57,9 @@ MapperGradShift::~MapperGradShift(void)
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapperGradShift
::
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
InputArray
_img1
,
InputArray
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
{
Mat
img1
=
_img1
.
getMat
();
Mat
gradx
,
grady
,
imgDiff
;
Mat
img2
;
...
...
@@ -68,7 +69,7 @@ void MapperGradShift::calculate(
// We have initial values for the registration: we move img2 to that initial reference
res
->
inverseWarp
(
image2
,
img2
);
}
else
{
img2
=
image2
;
img2
=
image2
.
getMat
()
;
}
// Get gradient in all channels
...
...
modules/reg/src/mappergradsimilar.cpp
View file @
6983774d
...
...
@@ -57,8 +57,9 @@ MapperGradSimilar::~MapperGradSimilar(void)
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapperGradSimilar
::
calculate
(
const
cv
::
Mat
&
img1
,
const
cv
::
Mat
&
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
InputArray
_img1
,
InputArray
image2
,
cv
::
Ptr
<
Map
>&
res
)
const
{
Mat
img1
=
_img1
.
getMat
();
Mat
gradx
,
grady
,
imgDiff
;
Mat
img2
;
...
...
@@ -70,7 +71,7 @@ void MapperGradSimilar::calculate(
// We have initial values for the registration: we move img2 to that initial reference
res
->
inverseWarp
(
image2
,
img2
);
}
else
{
img2
=
image2
;
img2
=
image2
.
getMat
()
;
}
// Get gradient in all channels
...
...
modules/reg/src/mapperpyramid.cpp
View file @
6983774d
...
...
@@ -54,8 +54,9 @@ MapperPyramid::MapperPyramid(const Mapper& baseMapper)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapperPyramid
::
calculate
(
const
Mat
&
img1
,
const
Mat
&
image2
,
Ptr
<
Map
>&
res
)
const
void
MapperPyramid
::
calculate
(
InputArray
_img1
,
InputArray
image2
,
Ptr
<
Map
>&
res
)
const
{
Mat
img1
=
_img1
.
getMat
();
Mat
img2
;
if
(
!
res
.
empty
())
{
...
...
@@ -63,7 +64,7 @@ void MapperPyramid::calculate(const Mat& img1, const Mat& image2, Ptr<Map>& res)
res
->
inverseWarp
(
image2
,
img2
);
}
else
{
res
=
baseMapper_
.
getMap
();
img2
=
image2
;
img2
=
image2
.
getMat
()
;
}
cv
::
Ptr
<
Map
>
ident
=
baseMapper_
.
getMap
();
...
...
modules/reg/src/mapprojec.cpp
View file @
6983774d
...
...
@@ -62,8 +62,9 @@ MapProjec::~MapProjec(void)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapProjec
::
inverseWarp
(
const
Mat
&
img1
,
Mat
&
img2
)
const
void
MapProjec
::
inverseWarp
(
InputArray
_img1
,
OutputArray
img2
)
const
{
Mat
img1
=
_img1
.
getMat
();
// Rows and columns in destination
Mat
dest_r
,
dest_c
;
dest_r
.
create
(
img1
.
size
(),
CV_32FC1
);
...
...
modules/reg/src/mapshift.cpp
View file @
6983774d
...
...
@@ -61,8 +61,9 @@ MapShift::~MapShift(void)
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void
MapShift
::
inverseWarp
(
const
Mat
&
img1
,
Mat
&
img2
)
const
void
MapShift
::
inverseWarp
(
InputArray
_img1
,
OutputArray
img2
)
const
{
Mat
img1
=
_img1
.
getMat
();
// Rows and columns in destination
Mat
dest_r
,
dest_c
;
dest_r
.
create
(
img1
.
size
(),
CV_32FC1
);
...
...
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