Help files

Computer Vision

Image recognition and Computer Vision enable the Users to build complex automations in environments, where no other way of access is feasible. This section examines the WinAutomation Image recognition Actions. These allow the Users to take action when images appear, or cease to appear, on their monitor. It allows them to wait for an image to be present on the screen, move the mouse to it and send different types of clicks with offsets in order to select the correct image sub-region.

Image Recognition

There are three actions based on Image Recognition: "Wait for Image", "If Image" and Move Mouse to Image. Both of these Actions require the computer to recognize an image on the screen.

How does Image Recognition work?

Image Recognition works by checking one pixel (in your image) to another (starting in the top left corner and working across then down the screen). If that pixel matches, it checks the second. If the first seven match, but the eighth doesn't, it checks the next pixel against the first in its image.

To use Image Recognition, first you take a screenshot of the part of the screen that you want. Once that image is stored, when the Process gets to that Action, it will start working on finding the stored image. Move Mouse to Image is useful if an image (like a button you need to click) could move.Since Image Recognition works by comparing one pixel to another, if your saved image and most of the screen has a certain color in the upper left corner, it can take some time to find the right image. To make this more efficient, start with a less-common color in the upper left corner. For example, with a white background for most of the screen, this image

imagerecognition - right.png

will take less time to find than this image.

imagerecognition - wrong.png

Both will find the image, but the first will be quicker. The less of a color above and to the left of your image's first pixel color, the faster the Action will work.

NOTE: Image recognition actions is unfortunately not applicable across different screen resolutions. This is why its use, is suggested as a last resort, while at the same time taking under consideration that the script will run on a certain screen analysis. For, example should you wish to compile a Process to a stand alone executable, it is suggested that you refrain from using Image recognition actions, unless you are 100% sure that the resolution will be the same across the target machine that will run the application.