Based on this question/answer, I have been trying to use OpenCV's Stitcher class in python. My code is basically the same as in the answer.
import cv2
stitcher = cv2.createStitcher(False)
foo = cv2.imread("D:/foo.png")
bar = cv2.imread("D:/bar.png")
result = stitcher.stitch((foo,bar))
cv2.imwrite("D:/result.jpg", result[1])
The issue is I want to change the mode from Panoramic to Scans. In the c++ documentation, the create method has an input of mode. However, the createStitcher class in Python only takes one input- whether or not to try gpu. Is there a way to specify the mode in Python?
When I tried createStitcherScans, I get an error
stitcher = cv2.createStitcherScans(False)
"AttributeError: 'module' object has no attribute 'createStitcherScans'"
I did find this GitHub issue that seems relevant, regarding Python bindings missing something. But this is over my head and I am not sure how to edit the opencv code to do this properly. I tried adding this to the stitching.hpp:
typedef Stitcher::Mode Mode;
But nothing happened. createStitcher(1, False) still give me the attribute error. Any help would be greatly appreciated.