Reputation: 911
I would like to customize the high-level stitcher class (for example, to add an assumption that the images are ordered). Nevertheless, the python class is only a binding and thus require me to re-implement the entire class in order to be able to customize it.
Is there a Python implementation of the high-level stitcher class available?
Upvotes: 1
Views: 821
Reputation: 71
You can modify the stitching pipeline using the methods provided by the Stitcher class: https://docs.opencv.org/4.1.0/d2/d8d/classcv_1_1Stitcher.html
You also might be interested in taking a look at https://github.com/opencv/opencv/blob/master/samples/python/stitching_detailed.py
If you modify the detailed example you can do things like speed up computation given you know the order of images by adding this:
match_mask = np.zeros((len(features), len(features)), np.uint8)
for i in range(len(features) - 1):
match_mask[i, i + 1] = 1
(source: https://software.intel.com/en-us/articles/fast-panorama-stitching)
and then replacing this line in stitching_detailed.py p=matcher.apply2(features)
with this p = matcher.apply2(features, match_mask)
Upvotes: 4