0

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.

Image from Game Files

^ 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.

Image comparisons

(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!

Moses
  • 43
  • 1
  • 7
  • 1
    Post your code! And your original image and template. – fmw42 Aug 25 '22 at 21:55
  • 1
    Please read the information guides in the **help center** (https://stackoverflow.com/help), in particular, "How to Ask A Good Question" (https://stackoverflow.com/help/how-to-ask) and "How to create a Minimal, Reproducible Example" (https://stackoverflow.com/help/minimal-reproducible-example). – fmw42 Aug 25 '22 at 21:56

0 Answers0