OCRExtractRelative capturing data from the wrong field

Hi admin,

Hope you all are doing well.

I ran into an OCR problem today and I can’t find the cause nor a solution for it.
Basically, I do OCRExtractRelative commands to capture name, admission date, department name,etc for employees in a roll. The vertical size of the information for an employee varies.

Most of the time there is only one employee on the screen, but sometimes there are two.
The data capture has been working well for a while, even with two employees’ data on the screen. However, there is a special case where![OCRExtractRelative problem with two names on a page the OCR captures other information (Adm:) of the employee located on the same line, but the employee name is captured from the other one 9 cm below. I tried to figure out what is happening by looking at the last screenshot, the relative image and original image (pdf). But the only thing I notice is that GISELE’s name is one or two millimeters more apart from Colab (the anchor in green) than GREGORY’s name.

Please find attached the files with the screenshot of the pdf, relative image and last screenshot by UI.Vision.
Please note that after Colab there is a different number for each employee and the green box cannot be wider because of this.

Thanks in advance.

Best regards,

Last_screenshot Folha_apice_colaborador_relative

I think the “last screenshot” attachment is missing, or?

My guess: Because the green box is rather small, UI Vision sometimes matches the area “Adm” as second “Colab” match. And the true 2nd “colab” is then third match (as it counts left to right, top to bottom… like reading).

Solution: You are correct that the green box must not contain changing parts like the employee number. But you can still make the green area bigger/more unique by adding a few more lines to it. That should make the matching more stable. Here is what I would try:

Hi Ulrich,

Thanks for your suggestion, it works fine now.
I appreciate your attention.

I am facing another problem with OCR now and will open another topic. Names are truncated when captured, although the pink box is great enough for them suit within.
Best regards