Several years ago, when the "Diamond Dash" game was popular, I found a python script whose method to hit the diamonds blocks was something like this:
I have one automatic process which, after posting something on Facebook, takes a screenshot and sends this image via Telegram in order to notify the post in real time.
Every time you successfully post something, the image has a yellow strip with a legend with something like: "Your picture was successfully uploaded" or a different text, depending on the kind of post you made.
I need to check if the screenshot has that yellow strip. It has never changed in the past 5 years, so it will be useful in determining if the post was successful or not. If I know that, I can choose what to do next: send the confirmation via telegram if successful, or simply send a text informing that the post was unsuccessful.
I just need a way to find an image inside another image (the yellow strip in the full screenshot). It can be done in any language like php, python, or by using bash, or a tool like imagemagick or something else. The rest of the process I will do it on my own.
Your help is appreciated.
There are most likely better ways to simply detect a yellow stripe and that facebook stuff can probably be solved using the facebook API.
But as you also asked for a general solution.
Finding a small image within a bigger images is called template matching. Google will overwhelm you with resources.
https://en.wikipedia.org/wiki/Template_matching might give start.
This should be comprised in any image processing tool-kit out there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With