python-imagesearch icon indicating copy to clipboard operation
python-imagesearch copied to clipboard

Can you use this to search for sprites and not just icons ?

Open Demokdawa opened this issue 5 years ago • 2 comments

I read all of your tutorial about you wakfu-bot, and i was wondering if you used this image-search function to actually search ressources on the screen, or if you just click on every position at random and wait for a collect icon to appear ?

Thx in advance for your answer !

Demokdawa avatar Mar 30 '20 19:03 Demokdawa

clicking on every position on the screen would be awfully inefficient, I search for the element I want to click and then once imagesearch gives me the position, I click on it.

drov0 avatar Mar 30 '20 19:03 drov0

First, thanks for answering me !

Thats exactly what i though !

Before using your module, i tried to template match sprites using openCV, but i couldn't get things detected properly (like i was detecting the sprit, but also things in nearly black part of the screen and lots of noise, even if it not contains the sprite at all, or it's a totally different color). But i didn't worked.

So i'm trying now your approach (and looking at the code, it seems to be something lookalike), and i doesn't get anything on the screen. I think it would work perfectly on icons since they don't change, but for sprites, do i need to capture the sprite ? Or only a part of the sprite ? Or the sprite and the surrounding ?

I even used masks and it still catched things that are totally not lookalike the sprite :/

choux

choux_mask

testscreen10

Thanks in advance for being so quick to answer !

Demokdawa avatar Mar 30 '20 21:03 Demokdawa