简体   繁体   English

OpenCv找到相似的图像

[英]OpenCv finding similar image


I'm trying to play with the match_template in opencv, 我正在尝试在opencv中使用match_template,
i try to match this two image, 我尝试匹配这两个图像,
this is the image > https://imgur.com/a/Heea7vm 这是图像> https://imgur.com/a/Heea7vm
the stars I want to search > https://imgur.com/a/9IxHNkI . 我要搜索的星星> https://imgur.com/a/9IxHNkI
The result is over 0.9 which is really good , but when the image change to other monster such as : 结果超过0.9,这确实不错,但是当图像更改为其他怪物时,例如:
https://imgur.com/a/oqjoDOl https://imgur.com/a/oqjoDOl
the result is 0.5 only 结果只有0.5
or when a same monster with more stars such as : 或同一颗具有更多星星的怪物,例如:
https://imgur.com/a/vTFPuBz https://imgur.com/a/vTFPuBz
the result is even higher then other 2star monster 结果甚至比其他2星怪物还要高

I want to use the star image to search all two stars monster , i tried using different matching method in 2 days and I cant really achieve this image serach 我想使用星图搜索所有两个星怪物,我尝试在2天之内使用不同的匹配方法,但我无法真正实现此图像搜索

Is there any ways/recommendation to help me achieve this kind of image search ? 有什么方法/建议可以帮助我实现这种图像搜索?
Thanks!! 谢谢!!

You could try doing the template not with the original images, but with canny edge detection added to both of them, so it should only match the edges of the starts. 您可以尝试不对原始图像进行模板处理,而是对两个图像都添加Canny边缘检测,因此模板应仅与起始边缘匹配。 Maybe even try messing with the color channels, making those stars pop out more from the template/image. 甚至尝试弄乱颜色通道,使这些星星从模板/图像中弹出更多。

Here is something more for you to read. 这里还有更多内容供您阅读。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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