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
65519ab7
Commit
65519ab7
authored
Jul 31, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9265 from alalek:python_stitching
parents
bdb6b45c
46f05f2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
cv2.cpp
modules/python/src2/cv2.cpp
+1
-1
test_stitching.py
modules/python/test/test_stitching.py
+20
-0
No files found.
modules/python/src2/cv2.cpp
View file @
65519ab7
...
...
@@ -149,7 +149,7 @@ public:
{
if
(
data
!=
0
)
{
CV_Error
(
Error
::
StsAssert
,
"The data should normally be NULL!"
);
// issue #6969:
CV_Error(Error::StsAssert, "The data should normally be NULL!");
// probably this is safe to do in such extreme case
return
stdAllocator
->
allocate
(
dims0
,
sizes
,
type
,
data
,
step
,
flags
,
usageFlags
);
}
...
...
modules/python/test/test_stitching.py
0 → 100644
View file @
65519ab7
#!/usr/bin/env python
import
cv2
from
tests_common
import
NewOpenCVTests
class
stitching_test
(
NewOpenCVTests
):
def
test_simple
(
self
):
img1
=
self
.
get_sample
(
'stitching/a1.png'
)
img2
=
self
.
get_sample
(
'stitching/a2.png'
)
stitcher
=
cv2
.
createStitcher
(
False
)
(
result
,
pano
)
=
stitcher
.
stitch
((
img1
,
img2
))
#cv2.imshow("pano", pano)
#cv2.waitKey()
self
.
assertAlmostEqual
(
pano
.
shape
[
0
],
685
,
delta
=
100
,
msg
=
"rows:
%
r"
%
list
(
pano
.
shape
))
self
.
assertAlmostEqual
(
pano
.
shape
[
1
],
1025
,
delta
=
100
,
msg
=
"cols:
%
r"
%
list
(
pano
.
shape
))
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