Need your help. Ok guys, let me explain. For example i hv game. It is 500x500 pixels. shows random pictures. When there is a exact image of smiling dog, you need to press space in 1 second.
So basicly i need a fastest, most reliable, most efficient (in terms of performance) way to:
Scan this 500x500 area in real time(one-ten times per second). If image inside this area is that exact image of a smiling dog - press spacebar. If image insade this area is something else - do nothing. So guys, how would you do it, to be as fast, as reliable and as efficient(in terms of performance) as possible?
Should i compare scan area to target image pixel by pixel? or should i for example compare percentage of particular colour? or maybe i should take screenshot of scanning area and shrink it down to 50x50 pixels before comparison, and compare it to shrinked down target image, so it would be faster? or maybe it is better to not shrink them down, but to compare every 10th or 5th pixel and do it gradualy(compare first pixel, if it is same as target image - then compare second pixel. if it is not, wait till next image, or next scanning event and scan 1st pixel again)? Would shrinking down drastically slow down whole process or no? If shrinking is good tool to use in my case, then what shrinking algorythm woudld be fastest? What do you think? Which pixel counting algorythm to use? One by one? But pls remember, it should work in real time!
Ty in advnace. If possible, pls add a semi detailed explanation in your answers, like which language you would use, which library, which function etc :)
EDIT:Found interesting idea, what do you think about it?
"I have an idea, which can work and it most likely to be very fast. You can sub-sample an image to say 80x60 resolution or comparable, and convert it to grey scale (after subsampling it will be faster). Process both images you want to compare. Then run normalised sum of squared differences between two images (the query image and each from the db), or even better Normalised Cross Correlation, which gives response closer to 1, if both images are similar."
Also i need this app to work on windows and mac os.
What I have tried:
-------------------------------------------------------