Using the Advanced Picture Object
The Advanced Picture object in Advanced Process Automation enables you to capture text from images using the Optical Recognition Method (OCR). The Advanced Picture object uses an Advanced OCR engine.
You can capture text from images (JPG, BMP, TIFF, GIF), or user interfaces of remote applications that are running (for example, Citrix sessions).
To capture text, images must have a resolution of at least 200 dpi, with a contrast of 50% brightness or more.
Each picture being loaded cannot be larger than 2GB.
OCR functionality is included in the Advanced Picture object, which can be found in the Direct.Vsd.Library.
The following languages are supported: Arabic, Armenian, Azeri, Bashkir, Bulgarian, Catalan, Chinese (Simplified and Traditional), Croatian, Czech, Danish, Dutch, Estonian, English, Farsi, Finnish, Dutch, French, German, Greek, Hebrew, Hungarian, Indonesian, Italian, Japanese, Korean, Latin, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Tatar, Thai, Turkish, Ukrainian, Vietnamese.
Advanced Picture Object Functionality
You can review the available functions of the Advanced Picture object from the Direct.Vsd.Library in the Real-Time Designer.
To view Direct.Vsd.Library functionality:
1. | In Real-Time Designer, open the Project tab. |
2. | Under the References section, expand the Library References node, and select Direct.Vsd.Library. |
3. | Open the Functionality tab, and from the Type drop-down list, select Advanced Picture. |
The following properties are available:
Property |
Description |
---|---|
Block Count |
Gets the number of OCR Text Blocks in the Advanced Picture Object. |
Handwriting Identification Mode |
Indicates the name of the handwriting style when OCR Mode is set to Handwriting. Otherwise the value of this property is empty. |
Height |
Gets the height of an Advanced Picture picture object (in pixels). |
Languages |
Gets the selected language. |
OCR Mode |
Gets the OCR mode. |
Tables Count |
The number of the recognized tables in an Advanced Picture object. This property gets the number of tables only after the table's data recognition (first run of function to get text from the table, using the known index of the table in advance). |
Width |
Gets the width of an Advanced Picture object (in pixels). |
The following functions are available:
Function |
Description |
---|---|
Get Word Locations |
Gets a list of coordinates of the rectangles that enclose the given word. This is new from version 7.2. |
Save |
Saves an Advanced Picture as an image file according to specified full path. |
Create from File |
Creates an Advanced Picture from the specified image file. Requires the full path to the file, for example: C:\Data\myImage.jpg |
Create from Clipboard |
Creates an Advanced Picture from the clipboard. |
Copy to Clipboard |
Clears the clipboard and then adds an Advanced Picture in the Bitmap (BMP) format to clipboard. |
Compare |
Compares two Advanced Picture objects. Returns true if both images are the same, and false if not. |
Create from Window |
Brings the specified window into the foreground, captures screenshot from this window and creates an Advanced Picture object. |
Rotate |
Rotates the image clockwise by one of the following angles: 90, 180, 270. |
Set Languages |
Defines languages for text recognition. See Using the Advanced Picture Object for a list of supported languages. |
Set OCR Mode |
Sets the OCR mode used by the OCR engine. If the Default option does not work, you can try one of the following options: Text (Speed): Use this option for a text document where speed is important. Faster than Text(Accuracy), but potentially less exact. Text (Accuracy): Use this option for a text document where accuracy is important. Slower than Text(Speed), but potentially more exact. Document (Speed): Use this option for a text document with objects such as tables where speed is important. Faster than Document(Accuracy), but potentially less exact. Document (Accuracy): Use this option for a text document with objects such as tables where accuracy is important. Slower than Document(Speed), but potentially more exact. Barcode (Speed): Use this option for a barcode where accuracy is important. Slower than Barcode(Speed), but potentially more exact. Barcode (Accuracy): Use this option for a barcode where accuracy is important. Slower than Barcode(Speed), but potentially more exact. Business Cards: Use this option for business cards. Engineering Drawings: Use this option for drawings and charts. One Block: Also called Field Level Recognition. Use this to OCR a single block on the screen. Use this option together controls or with crop functions to demarcate the block. Handwriting:Use this option for handwritten content. For the Handwriting option, you can choose between different handwriting styles. Select Handwriting, and then the style. Hover over a style to see a tooltip with a description.
Note: As Fine Reader 12 only offers limited handwriting capabilities. Use one of the third-party integrations for handwriting identification. |
Get Image Text |
Returns recognized text in an Advanced Picture object. |
Get Text Color |
Returns the text color. |
Get OCR Text Block |
Returns recognized text from a specified OCR Text Block by its index. |
Get Suspicious Data |
Returns the list of OCR Suspicious Data Object, which includes OCR paragraphs with its coordinates and text, where one or more words are suspicious. Suspicious words can then be identified from the returned paragraph’s text by the user. |
Get Words |
Recognizes text and returns VSD Word Data Object with words and rectangles collection. |
Get Word Locations |
Gets a list of coordinates of the rectangles that enclose the given word. This is new from version 7.2. See Using the OCR Get Word Location Function. |
Get Block Words |
Recognizes text and returns the VSD Word Data Object with a word and rectangle collection for specific OCR Text Block. |
Recognize Text from Control |
Captures image from VSD Control or Screen Element as Advanced Picture object and retrieves text. During the capture, it brings control into the foreground. |
Get Control Image |
Captures image from VSD Control or Screen Element and retrieves a new Advanced Picture object. |
Crop Image |
Crops the image from the Advanced Picture object and retrieves a new Advanced Picture object. |
Get Difference From Template |
Returns a value indicating the difference in brightness between two Advanced Picture images. A value of 100 indicates no difference. Anything lower than 100 indicates a difference, the lower the value, the greater the difference in brightness. This function is used to determine whether pictures are the same. Typical use case is to determine whether a checkbox or radio button is selected by comparing a pre-prepared image of the selected checkbox/radio button to the actual one. |
Determine Brightness |
Determines a brightness value in percentages of a given area of Advanced Picture object by coordinates (100 is white). |
Get Checkmark State |
Returns the state of the checkmark inside a given rectangle and checkbox type (Square or Circle). Possible return values are Checked, NotChecked, Corrected or Not Recognized. If OCR is not installed, NotDetected is returned. This function is new to version 7.2. See Using the OCR Get Checkmark State Function. |
Determine Control Brightness |
Determines a brightness value in percentages of a given Screen Element or VSD Control (value 100 is white). |
Get Table Cells Text |
Gets the list of text per cell from a specified table. |
Get Table Cells Rectangle |
Gets the list of coordinates of the rectangle that encloses the cells of the specified table. |
Get Table |
Gets the text from the specified table. The result is returned as list of list of text (per each cell in the rows). |
The following Scene Composer functions are available:
Control |
Function |
Description |
---|---|---|
PictureBox |
Get Advanced Picture |
Returns an Advanced Picture object from a scene with PictureBox of Windows control. |
DataCapture |
Capture Advanced Images |
Returns Advanced Picture objects collection from a scene with DataCapture of General control. The IncludeImages property must be true. |