General Visual Analysis parameters
The different Visual Analysis functions support the following set of parameters that define the parameters of the screen area to compare the input "needle" to for visual recognition.
On this page:
Generic parameters
The following parameters are supported by all Visual Analysis functions, regardless of image or text identification.
Name |
Type |
Possible Values |
Description |
---|---|---|---|
backlight |
String |
|
The key sequence to perform the backlight operation. Example: VOL_UP For best practice, use a key that will not change the screen. |
grid |
String |
|
The column name to be used for grid view in the report. Selecting this parameter creates the grid report. |
interval |
Integer |
0 |
The minimum time interval, in seconds, for a single analysis. If the analysis operation takes less than the interval, wait the remaining time before the next analysis operation. |
label.direction |
String |
none | above | below | left | right | leftmost | rightmost |
The label position relative to the button. Used alongside the offset parameter. Rightmost and Leftmost label position values represent the distance from the screen edge. none: The label is part of the button above: The label is above the button below: The label is below the button left: The label is to the left of the button right: The label is to the right of the button leftmost: The Button is aligned to the right, and its label is to the left rightmost: The Button is aligned to the left, and its label is to the right |
label.offset |
String |
X and Y values separated by comma |
The value can be in pixels or in percentage of screen height (0-100). For percentage, use the % sign. Example: 20% Used alongside the Label position parameter. If label position is "none", then label offset is "0". Otherwise, the label offset default is 10%. |
match |
String |
Same size (identical) | Any size (similar) | Bounded size (bounded) |
The needle comparison method. Same size: Needle and haystack are from the same origin (device screen) and size. Matching is faster and simpler. Any size: Needle and haystack are either not from the same origin (needle is from another device or other source) or not in the same size (different ratio or size), matching is slower and more complex. Selecting any size increases the analysis time. The timeout values should respectively be increased. Bounded size: Same as any size, but with restrictions on possible needle sizes. |
maxscroll |
Integer |
0-100 |
The maximum number of scroll actions to perform before returning. Finding the label will stop the scrolling. Effective values are in the range of 0-100. Default: 5 |
next |
String |
SWIPE_UP | SWIPE_DOWN | SWIPE_RIGHT | SWIPE_LEFT | UP | DOWN | RIGHT | LEFT |
The key sequence to perform the scroll operation. For more information see the Create custom swipe gestures post. |
operation |
String |
Single tap (single) | Double tap (double) | Long tap (long) | Trackball roll (roll) | No touch (none) |
The touch operation to perform on the found label location. |
relation.direction |
String |
left | right | above | below | left-above | left-below | right-above | right-below | inside |
The direction of the related region, stored in memory from the last found needle, in relation to the searched needle. For more information, see Visual Relations. left: The related region is to the left of the searched needle right: The related region is to the right of the searched needle above: The related region is above the searched needle below: The related region is below the searched needle left-above: The related region is to the left and above the searched needle left-below: The related region is to the left and below the searched needle right-above: The related region is to the right and above the searched needle right-below: The related region is to the right and below to the searched needle inside: The searched needle is inside the related region boundaries of the related region |
relation.inline |
String |
horizontal | vertical |
The search area is in-line with the related region, stored in memory from the last found needle. For more information, see Visual Relations. horizontal: The needle is within the height (top to button) boundaries of the related region vertical: The needle is within the width (left to right) boundaries of the related region |
repeat |
Integer |
|
The number of times to repeat the operation. Relevant for tap and double tap actions only. Default: 1 |
report |
String |
Screenshot | Screenshot on error | None |
The value to display in the report. Screenshot (default): Display screenshot Screenshot on error: Display screenshots only for actions in error None: Display nothing It is recommended to reduce the report image resolution in very long scripts that result in large report files. |
report.resolution |
String |
high | medium | low |
The image resolution. It is recommended to reduce the resolution in very long scripts that result in large report files. |
screen.height |
String |
|
The height value of the screen area where to search for the label. Values can be in pixels or in percentage of screen height (0-100). For percentagem use the % sign. Example: 20% The default is to search the entire screen. It is recommended to use the percentage value because it does not rely on the screen resolution. |
screen.left |
String |
|
The left value of the screen area where to search for the label. Values can be in pixels or in percentage of screen width (0-100). For percentage, use the % sign. Example: 20% Default is to search the entire screen. It is recommended to use the percentage value because it does not rely on the screen resolution. |
screen.top |
String |
|
The top value of the screen area where to search for the label. The value can be in pixels or in percentage of screen height (0-100). For percentage, use the % sign. Example: 20% The default is to search the entire screen. It is recommended to use the percentage value because it does not rely on the screen resolution. |
screen.width |
String |
|
The width value of the screen area where to search for the label. Values can be in pixels or in percentage of screen width (0-100). For percentage, use the % sign. Example: 20% The default is to search the entire screen. It is recommended to use the percentage value because it does not rely on the screen resolution. |
scrolling |
String |
scroll | noscroll |
Scroll until the label is found. noscroll (default): Do not scroll scroll: Scroll Scroll cannot be used together with a positive timeout value because this would dictate a different behavior when the needle is not found. When scrolling is enabled, the timeout must be zero. Scroll results in a longer execution time. |
source |
String |
primary | native | camera | auto |
The source for retrieving the screen content. primary: Screenshot taken from the device (higher resolution but slower)
camera: Screenshot taken from the video stream (lower resolution but faster)
auto: (default) Native device controls, if available. If not available, a digital screen image is used, if available. If not availabe, an analog screen image is used. |
threshold |
Integer |
20-100 |
The acceptable match level percentage, between 20 and 100. Values that are too low can lead to a false positive results while values that are too high can lead to a false negative result. |
Common image parameters
The following parameters are supported by Visual Analysis functions for image identification.
Name |
|
Possible Values |
Description |
---|---|---|---|
image.height |
String |
|
The height value of the image area defining the label. The value is in pixels. Default is the entire image. |
image.left |
String |
|
The left value of the image area defining the label. The value is in pixels. Default is the entire image. |
image.top |
String
|
|
The top value of the image area defining the label. The value is in pixels. Default is the entire image. |
image.width |
String |
|
The width value of the image area defining the label. The value is in pixels. Default is the entire image. |
Common text parameters
The following parameters are supported by Visual Analysis functions for text (OCR) identification.
Name |
Type |
Possible Values |
Description |
---|---|---|---|
analysis |
String |
full | automatic | manual |
The image analysis mode. The device screen may contain text and images. automatic: OCR distinguishes between text and images, filtering out images. manual: OCR assumes text only. Use alongside the Inverted text parameter.
full: OCR tries both automatic and manual.
This parameter is irrelevant when using native screen source. |
exact |
String |
true | false |
The option to find the exact needle phrase with no errors. This parameter is irrelevant when using native screen source. |
ignorecase |
String |
case | nocase |
The search pattern case sensitivity.
nocase: Insensitive
case: Sensitive |
ignorepunct |
String |
punct | nopunct |
The option to ignore punctuation characters when matching text.
nopunct: Ignore
punct: Do not ignore |
ignorespace |
String |
space | nospace |
The option to ignore spaces within search pattern words.
nospace: Ignore
space: Do not ignore |
index |
Integer |
|
If the needle has multiple occurrences on the screen, enter the index of the required occurrence. |
inverse |
String |
any | yes | no |
The text is likely to appear in inverted colors (dark text on light background). Use only if 'analysis' is set to 'manual'. yes: Text is inverted
no: Text is normal, not inverted
any: Text might be inverted or not, checked automatically by the system
This parameter is irrelevant when using native screen source. |
language |
String |
English | ChinesePRC | Dutch | French | German | Italian | Japanese | Korean| PortugeseStandard | Russian| Spanish |
The OCR language to use. It is possible to select multiple languages. For languages that do not appear in the drop down menu, contact Perfecto Support. This parameter is irrelevant when using native screen source. |
ocr |
Property |
|
A generic OCR parameter. Use this to provide additional OCR specifications that are not exposed as function parameters. Example: "isolate=true" It is possible to provide multiple specifications. This parameter is irrelevant when using native screen source. |
policy |
String |
auto | accuracy | performance |
The text recognition accuracy policy. Selecting the Accuracy value will increase the operation time. auto: (default) Shifted toward recognition accuracy with a moderate impact on the recognition speed.
accuracy: Shifted toward maximum recognition accuracy.
performance: Shifted toward recognition speed. This parameter is irrelevant when using native screen source. |
profile |
String |
default | |
Use when text cannot be found on the device screen.
Try all profiles with the word accuracy. Per profile, try changing the DPI (96 or 300 or 120). |
target |
String |
as-is (As is) | any (Any) |
The target search in case the needle includes more than one word. As is: Search for the entire string content as is, as a complete phrase Any: Search for any word in the string. When selecting Any, the words in the Expected text parameter can be divided into phrases with quotation marks. Example: "new contact" "add contact" Tip: In Java, you need to precede the double quotation marks with an escape character.
|
words |
String |
substring | words |
The search option to match only whole words in the haystack, or also part of other words Example: Define whether 'person' in 'personal' is a good match or not.
words: Match whole needle words in the haystack
substring: Match whole or sub-string words in the haystack |
What are OCR profiles?
Each OCR profile sets optimal values for a large number of OCR parameters to match a particular scenario.
Due to profile complexity and the large number of parameters involved, it is highly recommended to use one of the predefined set of profiles. This also provides backward compatibility, since most OCR versions modify/remove some parameters from the profile definition, yet the profile name is preserved and achieves similar/better results.
The default OCR profile is TextExtraction_Accuracy; use other values only in rare cases, such as when speed is of importance.
Below is a table listing the various predefined OCR profiles and their purported usage and links for further information.
Profile name |
Usage |
---|---|
BarcodeRecognition |
Barcode recognition. |
BookArchiving_Accuracy |
Book-formatted text recognition, accuracy mode. |
BookArchiving_Speed |
Book-formatted text recognition, speed mode. |
DocumentArchiving_Accuracy |
Archived text recognition, accuracy mode. |
DocumentArchiving_Speed |
Archived text recognition, speed mode. |
DocumentConversion_Accuracy |
Text recognition, accuracy mode. |
DocumentConversion_Speed |
Text recognition, speed mode. |
FieldLevelRecognition |
Field text recognition (e.g. bank account balance). |
TextExtraction_Accuracy |
Text image recognition (such as pdf or scan), accuracy mode. |
TextExtraction_Speed |
Text image recognition (e.g. pdf or scan), speed mode. |