Image recognition ignore color

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ca10c3sar
Newbie
Posts: 16
Joined: Thu Apr 13, 2017 7:36 pm

Image recognition ignore color

Post by ca10c3sar » Tue Oct 03, 2017 4:33 am

Im trying use image recognition, to detect the arrow direction and go to a label, but the arrows change the color every time, are 30 more colors, so im writing to ask if its possible to ignore the color in image recognition, or what i could do to detect it avoiding the colors :(
aaaaaaaaaaaaaaaaaaa.png

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Image recognition ignore color

Post by Marcus Tettmar » Tue Oct 03, 2017 8:06 am

It's possible that lowering the tolerance would help. Another option might be to use ScreenCapture to capture the screen to a bmp and then run a command line tool to convert it to black and white, then image recognition against that. The arrows would look more similar then right? I can't vouch for how successful that would be - you'd have to give it a try.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ca10c3sar
Newbie
Posts: 16
Joined: Thu Apr 13, 2017 7:36 pm

Re: Image recognition ignore color

Post by ca10c3sar » Tue Oct 03, 2017 12:08 pm

This is my script:

Code: Select all

ScreenCapture>753,506,768,520,%TEMP_DIR%\screenrect.bmp
//Find and Left Click Center of
FindImagePos>%BMP_DIR%\image_13.bmp,%TEMP_DIR%\screenrect.bmp,0.7,0.2,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
  Send>a
Endif
script.png
How i could low the tolerance? where 0.7 i insert 2?
This is my script



"then run a command line tool to convert it to black and white"
What command?

ca10c3sar
Newbie
Posts: 16
Joined: Thu Apr 13, 2017 7:36 pm

Re: Image recognition ignore color

Post by ca10c3sar » Tue Oct 03, 2017 1:06 pm

I dont think will be possible convert all arrows to black/white and recheck again, to then do a action, i have like 5 seconds to send input of each arrow direction :cry:

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts