I've been working with Python's opencv library, and am having some trouble getting it to recognize some images.
To summarize the issue, I have hundreds of images pulled from a game. I am attempting to use matchTemplate()
to find these images on the screen at various times, but it appears that the game applies some smoothing/blurring to the images before they're displayed.
^ Original Image from Game Files
I first attempted to match the techniques by resizing the image downward using Pillow's Image.resize()
method, but there was still a clear difference.
(Top to Bottom) Image from Game Files After Pillow Resize -> Image Taken in the Game
I've attempted to use Pillow library's methods of blurring to get the image recognized, but the max confidence I can get with this is about 0.3.
Does anybody have any suggestions for ways to programmatically edit these images with python to be reliably recognizable with matchTemplate()
? I'm not attached to OpenCV, so different methods/libraries relevant to solving my problem are welcome if anyone has better ideas!