OCR (Optical Character Recognition)
OCR (Optical Character Recognition) is a technology that enables the conversion of document types such as scanned paper documents, PDF files or pictures taken with a digital camera into editable and searchable data. OCR creates words from letters and sentences from words by selecting and separating letters from images.
Working Logic of OCR
OCR software paper etc. the collection of black dots on it ie letters, numbers, symbols, etc. They are capable of perceiving and reading. Analyzes by keeping each word separate and dividing the page into lines. During the analysis, the structural characters, heights and widths of the letters are evaluated. The program's own repository is full of various parameters defined for each character. If the detected pixels comply with one of these parameters, it becomes possible for the letter to appear.
The quality of the image files and the scanner reduces the text scanning errors of OCR software to a very low level.
Using OCR on the Xpoda Platform
For its use, go to the Client screen and click the OCR Template button from the ready buttons.
Create OCR Template
Select File: The invoice to which the data will be transferred is selected. In these selections, the extension of your file should be one of the options .jpg, .png, .jpeg, .gif, .bmp, .tif.
Add Item: In order to match the values in the picture you have added with the fields on your form page, Item must be added as much as the field to be matched.
Delete Item: It is used to delete the Items you have added.
Template List: You can view the Templates you have saved to the system in this drop-down box. It will be sufficient to define once for the different invoice structures you have used.
Template Name: If you want to create a new template, you will need to name your Template from this field.
Save: It is used to save the operations performed.
Delete: It is used to delete the designed Template structure.
Preview: Shows the preview of the results of the design.
Remove Line: It is used to delete the selected lines.
Mapping: It is the place where the mappings are made for the value being worked on and the fields on your form page. The matching operations are performed to whichever value the incoming value will be sent to on the relevant form page.
Item Type: It is used to select the types of incoming values.
Static: If there is a field that will not change in your invoice structure, static should be selected from the type value. After the static selection, the Search value will appear on the Item. If the value you enter in this Search field contains a special expression for that invoice, such as Registry No, Invoice number, this expression must be written.
Field: If the selected values are to be filled into the fields on the relevant form page, the Field type should be selected from this field.
Row: If values that repeat line by line are passed in the invoice, the Item Type value should be selected as Row.
Replace Value: If a value in the invoice is to be replaced with a different value, the Replace Value field is used. For example, if the invoice date is kept as 19.04.2022, if you want to replace the point values between the numbers with a line, you can use the Replace Value field.
Add Replace Value: A new option must be added from the Add Replace Value field for each new feature.
Row Space: When Row is selected from the Item Type field, the distance between these rows is written.
Example Usage:
In this example, we will transfer some of the data in the billing information from Mikro Yazılım to the form page we designed.
For this, we first create a form page and form fields called OCR.
OCR Form Page
Invoice Date: The date information that will come from the micro invoice will be added to this field.
Invoice Number: The invoice number value in the micro invoice will be added to this field.
Grid: Finally, we add 4 fields to the grid in order to get the line records in the invoice.
Image of our OCR Form page
Now let's come to the OCR arrangements.
First of all, we go to the Client screen and click the OCR button on the ready buttons.
Since we want to add a new invoice, we click the Select File button from the Create OCR Template field that opens. Then we select the Micro invoice from the screen that opens.
Select File Button
After selecting the file, we add our fields with the Add Item button.
As you add items, you can see that blue areas come to your design area.
Now we place the blue areas on the desired areas with the drag and drop method. In order to carry out the move, first left click on the blue areas and then dragging.
In placing the first field, we will use the Registry Number as a unique value that distinguishes the Micro invoice from other invoices. That's why we take the field where the value is written into the Item.
If we change the Item Type field to Static, a Search Value expression will appear over our blue field. We write our Registry number in this field.
We create a new field by saying Add New Item and drag and drop this created field to the Invoice Date field. Since the Invoice Date information will go to the Invoice Date field on our form page, we bring the Invoice Date field from the Mapping field above, and select the Field value from the Item Type field.
If we do not want to use the line values in the Invoice Date, we can use the Replace Value value in the upper left corner to replace it with a different character.
Let's show it on an example. You can view the Replace values you have saved before from the drop-down box. You can use the plus button next to it for a new feature. We are using the plus button for this example.
In the window that opens, write “-“ in the searched value field and “.” in the field to be changed. We save it by putting your character.
After performing this operation, you can see the – statement in the pop-up box.
You can use this for any fields you want. For the fields you want to use, you will first need to click on the field and then choose from this drop-down box.
We perform the same transactions in the Invoice Number..
Now let's add the lines we want to add in the Grid.
First of all, we add Item as much as the Grid area we have used by saying Add Item.
We arrange the blue fields that we have added so that they completely cover the rows and columns.
Important: Even if there are blank lines in the document you have used, you must also select the blank lines. This is because one invoice can have 5 records, while another invoice can have 20 records. It is necessary to extend the selection process up to the maximum number of lines.
After the selections are made, the Mapping and Item Type fields must be selected for each Item.
First of all, the Item you want to edit is clicked, then the Mapping and Item fields are edited. Since row-based records are taken, the Type field should be changed to Row, and the relevant fields in the Grid should be selected from the values in the Mapping field.
After performing these operations for all columns, a name is entered in the Template Name field above, and the Template is saved by clicking the Save button next to it.
Your template is now ready to use after you see the successfully saved message.
If you want to view the final version, you can find the last Template you added from the Template List area, and click the preview button to open the preview screen.