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
4c020d69
Commit
4c020d69
authored
Feb 07, 2017
by
Vladislav Sovrasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: add python sample
parent
9608d31a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
reg_shift.py
modules/reg/samples/reg_shift.py
+20
-0
No files found.
modules/reg/samples/reg_shift.py
0 → 100755
View file @
4c020d69
#!/usr/bin/python
import
cv2
import
numpy
as
np
import
sys
img1
=
cv2
.
imread
(
sys
.
argv
[
1
])
img1
=
img1
.
astype
(
np
.
float32
)
shift
=
np
.
array
([
5.
,
5.
])
mapTest
=
cv2
.
reg
.
MapShift
(
shift
)
img2
=
mapTest
.
warp
(
img1
)
mapper
=
cv2
.
reg
.
MapperGradShift
()
mappPyr
=
cv2
.
reg
.
MapperPyramid
(
mapper
)
resMap
=
mappPyr
.
calculate
(
img1
,
img2
)
mapShift
=
cv2
.
reg
.
MapTypeCaster_toShift
(
resMap
)
print
(
mapShift
.
getShift
())
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