OpenCV-Python Real-time template matching on screen (simple)

644 Views Asked by At

So here is the scenario: In my browser I have a small red rectangle floating around at a relatively slow speed, after a random amount of time it disappears and later reappears.

I want OpenCV to search for the rectangle until it is found and then track it. I then want OpenCV to wait until it disappears, and when the rectangle disappears for a second or longer I want notepad.txt to open from my desktop. I have the rectangle saved as a .png and there are some tutorials on youtube but they are not in real time.

How easy would it be to create something like that? I'm new to writing code and anything like that. Please direct me in the right direction.

Here is the picture.

enter image description here

0

There are 0 best solutions below