Image Recognition command
- Updated: 2022/04/21
Image Recognition command
Use this command to search for an image within a source image.
Overview
Use this command to quickly search for an image within a source image and to readily automate any application that uses visual elements. You can capture and process various images of different sizes using HiDPI display.
Another major benefit of using image recognition is to locate an image after the image might be moved, for example, from one location on a web page to another.
Also, in some cases when application UI elements might not be available for automation you can use Image based automation. For example, when application is exposed over Citrix or when application accessed from RDP, or when object detection is not as reliable such as legacy applications, you can use the Image Recognition command.
The Image Recognition command offers the following operations:
- Wait time
- Specify the time in milliseconds to wait for images that are to be captured from windows that might take some time to load.
- Select Image 1
- Capture the image from an open window or select it from a file.
- Select Image 2
- Capture the image from an open window or select it from a file.
- Image Occurrence
- Use this option when the target image can be found multiple times. Here, you can use a variable when you do not know the number of times the image might appear on the screen. While using variables ensure you assign variables that support numeric values
- Match Percentage
- Use this option to specify the acceptable percentage of matching pixels between the two images.
- Tolerance
- Use this option to specify the acceptable range of matching pixels.
- Comparison Mode
- Select one of the methods of comparison:
-
Advanced: This is the default selection. It is the
most accurate mode as compared to other modes and provides better results in
cases where screen resolution/zooming or application scaling is subject to
change. Note: If you have migrated bots created in Enterprise Client 10.x version to the current version, the comparison mode that you had selected will not change to Advanced automatically. Only the bots created in the current version will have Advanced as the default mode of comparison.
- Normal mode: Compares the RGB components of the pixels with the source. Use this when you are not bothered about the speed and want exact color match in complex scenarios.
- Gray-scaled mode: Converts pixels to an appropriate level of gray-scale prior to comparing. Use this when colors are of limited benefit in comparison and you want your test to run faster.
- Monochrome mode with Threshold: Converts pixels to either black or white prior to comparing. The threshold value is used while converting the RGB or Gray-Scaled pixels to either black or white (a pixel value less than the threshold value is black; greater is white). Use this when you want to recognize multi-colored text against multi-colored backgrounds.
-
Advanced: This is the default selection. It is the
most accurate mode as compared to other modes and provides better results in
cases where screen resolution/zooming or application scaling is subject to
change.
- Quick Test
-
Use the Quick Test button to quickly ascertain the output is as required. This eliminates the need to run the entire test.
- A Quick Test, similar to an actual test, includes the parameters provided for Match Percentage, Tolerance and Comparison Mode.
- If variables are used in the Task Bot / MetaBot Logic, Quick Test will not be applicable.
- For tasks created in earlier versions (prior to 7.5), Quick Test will work only after you recapture the image as this feature is available from version 7.5 onward.
- If you get the error Unable to load DLL 'Automation.ImageAlgorithm.dll when you click Quick Test, see Enterprise 11: Windows Server Essential Media Pack configuration.
- When Secure Recording Mode is enabled:
- Image1 is not saved and Image2 is not captured.