首页 > 解决方案 > 有效地在较大图像中找到图像的最佳拟合位置

问题描述

我的图像非常接近于另一个图像的裁剪版本。(同一位置的不同平均图像,意味着去强调移动物体),我想弄清楚在哪里裁剪更大的图像,以便图像适合。

我尝试在图像之间进行 2d 相关性以找到具有最高相关性的点并使用 scipy.signal,correlate2d 找出位置,但它的效率非常低。

使用 opencv 加载图像并转换为 numpy 数组。

任何人都可以提出一种有效的方法来在 python 中执行此操作吗?

标签: pythonimage-processing

解决方案


Template matching from Opencv library suits your need

Here in the link you can find the documentation and a very good example


推荐阅读