图片搜索不适用于旋转图片

时间:2020-10-16 18:01:09

标签: python opencv

我有以下代码:

from python_imagesearch.imagesearch import imagesearch


pos = imagesearch("./image_to_find.png")
if pos[0] != -1:
    print(pos[0], pos[1])
else:
    print("image not found")

它的作用是搜索当前屏幕,如果找到图像,则打印其电源线。 问题是如果旋转图像,找不到图像。

例如,当image_to_find.png是这个

enter image description here

我的屏幕看起来像这样 enter image description here

它打印出来

位置:5144

但是如果我的屏幕是这个 enter image description here

它打印出来

找不到图片

即使旋转,有什么方法可以找到图像吗?

这是我用的: https://github.com/drov0/python-imagesearch

0 个答案:

没有答案
相关问题