Image within another image, is it possible?

Hi guys, I have a question. For example: I have an image of a square of red color, and inside it has the letter “A”. I also have another square that has the letter “A”, but this square is blue in color. So is it possible to recognize the “A” of the squares as the same image? It is if it is possible…so it works with any geometric figure?
example forum

@josewilian you could try to pass the grayscale=True to the find method and lower the matching parameter but I would not recommend doing that unless you have a very specific reason.

What is the use case that you are trying to address?
Our code at the moment uses template matching so it is tuned towards finding the most precise match to the target.

Give it a try and let me know how it works for you.

1 Like

Well, when I was creating the macro for a personal project…I noticed that the same object was in two images, but the background had a different color. And because the background is different color, the bot recognizes as different images!

Got it! In this case, try the grayscale=True with the lower value on matching.