Find seals and signatures Version 1 (Python)
Action group: Robin OCR, subgroup Robin
Description
The action searches the image for objects of three types: round stamps, rectangular stamps and signatures. Then it records information only about the selected types of objects in the table
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
File path | Path to the file in which you want to find seals and signatures. Supported formats: jpg, jpeg, bmp, png, pdf. | Robin.Image | C:\doc\img.png | Yes |
Page number | The page number of the file from which you want to extract data. The numbering starts from 1. If the field is not filled in, the data will be extracted from all pages of the file. | Robin.Numeric | No | |
Look for a round seal | If «true», the action will look for round seals. If «false», all round seals will be skipped. | Robin.Boolean | true | No |
Look for a rectangular seal | If «true», the action will look for rectangular seals. If «false», all rectangular seals will be skipped. | Robin.Boolean | true | No |
Look for signature | If «true», the action will look for signatures or decryptions of the signature. If «false», all signatures will be skipped. | Robin.Boolean | true | No |
Minimum recognition accuracy | Recognition accuracy sufficient to save the search results to a table. The allowed value is any number from 0 to 1. Default value: 0.2. | Robin.Numeric | No | |
Folder path | Path to the folder where images of file pages with highlighted stamps and signatures will be saved. To save the file, you also need to fill in the «File name» field. | Robin.FolderPath | C:\doc\img | No |
File name | Title for images with highlighted stamps and signatures (no extension). If the source file is a multi-page file, the corresponding page number will be added to the name of the saved files. By default, images with .png extension are created. To save images you should also fill in the «Folder path» field. | Robin.String | No | |
Overwrite | If «true» and an image with the same name and extension exists in the specified folder, the new image will overwrite it. If «false», the image will not be overwritten and the action will return an error. | Robin.Boolean | true | No |
Results | ||||
Images with blocks | A collection of paths to images with highlighted seals and signatures. | Robin.Collection | ||
Table | A table summarizing the complete information about the retrieved objects. | Robin.DataTable |
Special conditions of use
The action works with multi-page PDF files. You can process all pages of the document if the page number is not specified.
It is recommended to use the action with TOR-12, TRN, TTN, and UPD documents.
If the file contains the sought object (stamps and signatures), but the search parameter is set to false, then the data about it will not be displayed in the results.
If the action does not find or recognize stamps and signatures, the robot will complete without error but will return empty results.
If "Minimum recognition accuracy" = 0, all found objects will be written to the result. If "Minimum recognition accuracy" =1, all 100% of recognized objects will be written to the result.
If several objects matching the search conditions are found on a page, only one image of this page with the selected objects will be created.
If you have chosen to search all pages, and stamps were found only on a few pages, all pages of the source document will be saved, if the "Folder path" and "File name" parameters are set correctly.
If the "File name" and "File path" parameters are filled in, the image with blocks is saved in the specified folder with the specified name in .png format.
If a multi-page file is saved, a page number will be automatically added to the name of each block image.
Example of use
Task
Need to find stamps and signatures in the file.
Solution
Use the "Find stamps and signatures" action.
Implementation
- Assemble robot scheme consisting of actions "Find stamps and signatures", "Table to CSV" - add if you need to see the table with the received data:
- Set the parameters of the "Find stamps and signatures" action.
- Set the parameters of the "Table to CSV" action.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully.
An image with blocks:
Table: