Stitching images with transparency #212
Unanswered
alex-rothwell
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can just set |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two images which I want to stitch together. However, the part of the image that I am interested in is a circle in the centre, that is surrounded by a black border, as shown below.
Therefore, I've cropped the image to remove the black background to generate the below images.
As the area that is cropped from the image is now transparent, to read the image in using opencv requires the
cv.IMREAD_UNCHANGED
flag ie.cv.imread("images/preprocess/crop_img1.png", cv.IMREAD_UNCHANGED)
This works fine when reading in each individual image, but when running
stitcher.stitch_verbose
I get the following error:error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\stitching\src\timelapsers.cpp:74: error: (-215:Assertion failed) img.type() == CV_16SC3 in function 'cv::detail::Timelapser::process'
Any ideas or workarounds? Thanks
Beta Was this translation helpful? Give feedback.
All reactions