The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "IMAGESEARCH"
Line 16: | Line 16: | ||
*CONFIDENCE | *CONFIDENCE | ||
*:The confidence level, i.e. level of similarity between the input and the remote picture. Must between 1 and 100. Typically values between 40...100 give good and reliable results. Below a confidence level of 95 the image recognition switches automatically to '''grey scale mode''', so color changes are ignored. | *:The confidence level, i.e. level of similarity between the input and the remote picture. Must between 1 and 100. Typically values between 40...100 give good and reliable results. Below a confidence level of 95 the image recognition switches automatically to '''grey scale mode''', so color changes are ignored. | ||
− | + | *ALGORITHM (default if unspecified = B) | |
+ | *:Optional parameter to select the image recognition algorithm: | ||
+ | *::"A" stands for a new, general purpose algorithm optimized for web pages. | ||
+ | *::"B" uses a classic machine vision algorithm based on edge detection. | ||
+ | *:For typical websites we recommend algorithm A. Algorithm A is also more tolerant of other formats (e.g. gif). | ||
+ | *:Method B will be useful if your website or image changes color, as method B is color-blind (it looks at shapes and shades of grey). | ||
The image recognition algorithm is a modern, general purpose computer vision algorithm optimized for web pages. | The image recognition algorithm is a modern, general purpose computer vision algorithm optimized for web pages. |
Revision as of 16:36, 9 November 2012
Searches for the input image specified via the IMAGE attribute. The input image is searched on the currently displayed website using Image Recognition algorithms. CONFIDENCE specifies how closely the found image must match the input image. A value of 100 means exact match. If the input image is not found at the given confidence level an error occurs.
If the image is found then !IMAGEX and !IMAGEY hold the coordinates of where it was found.
Syntax
IMAGESEARCH IMAGE=image_file CONFIDENCE=n [ALGORITHM=A/B]
Parameters
- POS
- Find the n-th image. Same as the POS attribute in TAG
- IMAGE
- The path to the image to be searched. Supported file formats are BMP and PNG. The smaller the input image, the faster the search.
- CONFIDENCE
- The confidence level, i.e. level of similarity between the input and the remote picture. Must between 1 and 100. Typically values between 40...100 give good and reliable results. Below a confidence level of 95 the image recognition switches automatically to grey scale mode, so color changes are ignored.
- ALGORITHM (default if unspecified = B)
- Optional parameter to select the image recognition algorithm:
- "A" stands for a new, general purpose algorithm optimized for web pages.
- "B" uses a classic machine vision algorithm based on edge detection.
- For typical websites we recommend algorithm A. Algorithm A is also more tolerant of other formats (e.g. gif).
- Method B will be useful if your website or image changes color, as method B is color-blind (it looks at shapes and shades of grey).
- Optional parameter to select the image recognition algorithm:
The image recognition algorithm is a modern, general purpose computer vision algorithm optimized for web pages.
Notes
FAQ:
Q: Is it possible to set the folder that the IMAGESEARCH command uses to load images from? It seems to default to: C:\Users\Public\Documents\iMacros\datasources\
A: There are two options
- Change the default datasource folder
- Or, use the specific path directly in the command, e. g. IMAGESEARCH IMAGE=d:\testimages\image1.png CONFIDENCE=100
Q: I would like to know how to change the number of retries for the image recognition feature.
A: You can do this with SET !TIMEOUT_STEP <x>
x = number of retries, default = 6 (one retry each second)
Examples
Example macro: Demo-ImageRecognition
See Also
Image Recognition, IMAGECLICK, DS, Which technologies are supported in tray/silent mode