python - python中opencv拼接器类的高级实现

标签 python opencv image-stitching opencv-stitching

我想自定义高级拼接器类(例如,添加图像是有序的假设)。尽管如此,python 类只是一个绑定(bind),因此需要我重新实现整个类才能对其进行自定义。

是否有可用的高级拼接器类的 Python 实现?

最佳答案

您可以使用 Stitcher 类提供的方法修改拼接管道:https://docs.opencv.org/4.1.0/d2/d8d/classcv_1_1Stitcher.html

您也可能有兴趣查看 https://github.com/opencv/opencv/blob/master/samples/python/stitching_detailed.py

如果您修改详细示例,则可以通过添加以下内容来加快计算速度,因为您知道图像的顺序:

match_mask = np.zeros((len(features), len(features)), np.uint8)
for i in range(len(features) - 1):
    match_mask[i, i + 1] = 1

(来源:https://software.intel.com/en-us/articles/fast-panorama-stitching)

然后在stitching_detailed.py p=matcher.apply2(features) 中替换这一行有了这个p = matcher.apply2(features, match_mask)

关于python - python中opencv拼接器类的高级实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52912653/

相关文章:

python - 创建插入 mysql 脚本

python - 向量化迭代过程

c++ - 使用 Stitcher 的 OpenCV 断言失败

python - 需要使用python清理网络抓取的数据

使用 Groupby 的 Python Pandas 条件和

opencv - 如何正确训练级联

c++ - openCV 中用于颜色识别的 HSV 图像

python - 如何在 python 中使用 OpenCV 拼接多个随机顺序的图像?

c++ - 使用 Seamfinder 和 Exposurecompensator 进行图像拼接需要更多时间

python - Bash 或 Python,当向终端打印字符时,如何在 FIXED 位置更改字符?