'computation of a pixel coordinates of a photographed monitor

Does anyone know how one might go about calculating the x,y coordinates of, say, a button or an image on a monitor by analysis of a picture of that monitor?

My laptop's webcam faces the work computer's monitors, so that a photograph through the webcam will capture the database entry as well as the phone system. I need to compute the coordinates of the elements on those monitors from the picture of the monitors so that I can send the coordinates to a microprocessor, which in turn would programmatically control keyboard and mouse.

Anyone know how to do this in python?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source