简体   繁体   中英

High level implementation of opencv stitcher class in python

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?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM