cv2.createStitcher() not enough keypoints?


cv2.createStitcher() not enough keypoints?



Good day,



I am working on a project to have multiple cameras, each taking an image and then the images will be stitched together. Currently I am trying to use the cv2.createStitcher().stitch(images) function. Below is the code that I use:


import cv2

imageFiles = ['imageCapture1_0.png','imageCapture2_0.png']
images =
for filename in imageFiles:
img = cv2.imread(filename)
images.append(img)

cv2.ocl.setUseOpenCL(False)
stitcher = cv2.createStitcher()
status, result = stitcher.stitch(images)

cv2.imwrite('result.png',result)



The image input is:



left image:



left image



right image:



right image



However, result output type becomes NoneType with size 1 and value: NoneType object of builtins modules. From what I have googled, the cause of this is because there is not enough matching keypoint to stitch the images together. If so, is there a way to stitch image even with less keypoint? Is there a way to set the parameter? I read through the documentation with no luck trying to find the solution. Thank you in advance





what does status return in your case?
– Jeru Luke
Jul 3 at 5:41


status





status, type int, size 1, value 1
– S.Faiq
Jul 4 at 6:03





since it is returning 1 you need to add more images. If that is not what you want then good ahead a try building your own stitching module by incorporating feature points and matching them.
– Jeru Luke
Jul 4 at 7:34





I followed a blog post on panorama stitching. Using the images you provided I am getting an inverted image :D. You can also give it a try HERE
– Jeru Luke
2 days ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages