Consider extracting the fields first, then submitting them to tesseract separately. There is no guarantee tesseract will return the fields in order, also lines confuse it.
Try enlarging the image 100%, that's about the ideal letter size for Tesseract. On Sat, Dec 21, 2024 at 6:56 AM Riccardo <riccardo.degioan...@gmail.com> wrote: > Hello, > I am trying to use Tesseract to create a small Windows application that > allows the user to: > > - Take a screenshot of the monitor and cut a smaller portion > containing a table (the table always has the same format, and the labels > are consistent. The numerical data are different each time). > - Provide the screenshot to Tesseract to extract the data. My strategy > is to remove the vertical and horizontal lines in the table, extract the > entire text, and collect the numerical values corresponding to the labels I > want to capture. > - Finally, generate a text output based on the extracted data. > > The app works fine, but there are still many errors in data extraction. > Sometimes, some values are not extracted at all because the label is not > correctly recognized. Other times, even if the labels are recognized > correctly and the data are extracted, the numbers are incorrect. Also I > noticed that the error quote is higher on my work PC, probably because the > screen resolution is lower than my home PC. > > I am wondering if there is a more reliable way to accomplish my goal. > > Below I attached some images of the App to give you an idea, an example of > the table and the python script I am using for OCR. > > Thank you very much for your help!!! > > tesseract v5.4.0.20240606 > > Python 3.13.1 > > -- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tesseract-ocr+unsubscr...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/tesseract-ocr/191d869f-9ff0-4297-b539-aad42fc3c1e3n%40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/191d869f-9ff0-4297-b539-aad42fc3c1e3n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/tesseract-ocr/CAJDV7CJG58aN-Y4P4_mhbpZrL8VKah9A_fokun0NX-aXCyw5dA%40mail.gmail.com.