История страницы
Extract the car number from the image Version
...
4 (python)
Action group: Robin OCR
...
Description
The action allows you to extract the car number extracts license plates from the image
Action icon
Parameters and their settings
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Context | Action context for working with Robin OCR 2. | Robin.OCR2 | Yes | |
File path | The path to the file from which you want to extract the car number. The image must contain the machine number, otherwise the extracted data may be incorrect. Supported image formats: jpg, jpeg, bmp, dib, rle, jpe, jfif, tif, tiff, png. | Robin.FilePath | Yes | |
Page number | The page number of the file to extract data from. Numbering starts from 1. If the field is not filled in, the data will be extracted from the first page. | Robin.Numeric | No | |
Folder path | The path to the folder where the recognized image with the superimposed blocks into which the action divided the data 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 | The name of the image file with superimposed blocks (without extension). By default, a file with the extension *.png is created. To save the file, you also need to fill in the «Folder path» field. | Robin.String | No | |
Overwrite | If the value is «true» and an image file with the same name and extension exists in the specified folder, then the new file will overwrite it. If «false», the file will not be overwritten and the action will return an error. | Robin.Boolean | true | No |
Results | ||||
The car number | The car number extracted from the original image. | Robin.String | ||
Image path | The path to the image file with superimposed blocks. | Robin.FilePath | ||
Recognition confidence | Image recognition accuracy in the range from 0 to 1. | Robin.Numeric | ||
Status | Status of license plate number recognition.
Number fully recognized - when the license plate number has been fully recognized. Number partially recognized - when the number is not fully recognized: glare on the image, dirt on the number, part of the number is covered, digits are smudged, etc. Region not recognized - the action returned the license plate number itself, but failed to retrieve only the license plate number region. No license plate number found - the image has no text or the number contains invalid characters for a license plate number. e.g. any letters except A, B, E, K, M, N, O, R, S, T, U, X. Number recognized incorrectly because there are several numbers in the image - the action found several license numbers, merged the data, the result is incorrect. | Robin.String |
The decoding of the image recognition results by status is shown in the table below.
Results of image recognition by statuses
Status | Image quality | Recognition results | |
---|---|---|---|
1 | Number fully recognized | Изображение, на котором четко видно автомобильный номер, нет других номеров, бликов и т.д. |
|
2 | Number partially recognized | На изображении блики, на номере грязь, часть номера закрыта, замазаны цифры и т.д. |
|
3 | Region not recognized | Изображение, на котором у автомобильного номера нельзя распознать только регион: он закрыт, в грязи и т.д. |
|
4 | No license plate number found | На изображении нет текста или номер содержит недопустимые символы для автомобильного номера. например любые буквы, кроме А, В, Е, К, М, Н, О, Р, С, Т, У, Х. |
|
5 | Number recognized incorrectly because there are several numbers in the image | На изображении несколько объектов, у которых можно распознать номера и текст. Вывески, рекламы, другие автомобильные и телефонные номера |
|
Special conditions of use
- If an image without license plates or with several license plates is input, the text data from the image may be recognized incorrectly or not recognized at all. Therefore, it is recommended to use the action only for recognizing one license plate number;
- acceptable image formats: jpg, jpeg, bmp, dib, rle, jpe, jfif, gif, tif, tiff, png;
- if the action does not find or recognize the number, the robot will terminate without error;
- if an invalid file page number is specified, the robot will terminate with an error;
- if the "Folder path" field is filled in and the "File name" field is not filled in, the robot will terminate with an error;
- if the "File name" field is filled in and the "Folder path" field is not filled in, the robot will terminate with an error;
- if the "Folder path" parameter specifies a folder where there is already a file with the specified name and the "Overwrite" parameter = false, the robot will terminate with an error;
- if "Folder path" and "File name" parameters are not filled in, the file with superimposed blocks will not be saved;
- if parameters "File name" and "File path" are filled in, the image with blocks will be saved in the specified folder with the specified name in .png format.
Example of use
Task
You need to extract the license plate number from the image
Solution
Use the action "Create context with Robin OCR 2", "Extract the car number from the image".
Implementation
- Assemble a robot scheme consisting of actions:
- Fill in the "Create context with Robin OCR 2" parameters according to the customization standards for this action.
- Set the parameters for the "Extract the car number from the image" action. To fill the context, click on , then click on and select the context of the action "Create context with Robin OCR 2 1" from the dropdown list.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully.
Image with blocks:
Additional attachments
https://confluence.itbs.it.ru/x/9437Eg
Instructions for local connection
- Click "Start."
- Select "Settings".
- Select "System".
- Select "About".
- Select "Advanced system settings".
- In the window that opens, select "Environment variables".
- Click "Create".
Enter:
Name - ROBIN_PY_OCRENGINE_PATH
Value - http://10.68.10.31:8080/api/v1/ocr/gettext/abt
and click "ОК".
Restart the computer.
Connect to the vpn.
You can start the robot.