Reputation: 718
I want to know if my display (or some window) contains a picture. I think to do the following:
How can I scan a picture in an Objective-C Cocoa app?
Upvotes: 1
Views: 253
Reputation: 20333
I suggest to scan your picture first with some rudamentary feature detection. You can blur it and find big opaque regions. Then you can do the same with the captured screen. This way you can find the "center of gravity" of your picture on the screen. Then you can do bit-by-bit comparasm with a small trashold to finetune the position.
When you have the exact position you can do a last step, a bit-by-bit comparsion for the whole picture area to be sure that your picture is fully displayed (no parts are blocked out by other windows) if this is interesting for you.
Upvotes: 1