Try to use better config parameters. e.g:

$ tesseract download.png - --psm 6 --oem 0
will produce:
$ 250,941.00
$ -75,282.00
$ 175,659.00
$ -15,072 00
$ 2,860.00
$ 0.00
$ 163,447.00

legacy engine could be better for numbers

Zdenko


st 21. 4. 2021 o 14:10 Kumar Rajwani <[email protected]>
napĂ­sal(a):

> Hey,
> I am using tesseract to identify amounts in my forms. You can look below
> image for sample. i am getting perfect amount with decimal in psm 6.
> but when i use psm 11 i am getting follwing output. I have to use psm 11
> as it identify more text with compare to psm 6 in my images.
> 250,941
> 00
> 00
> -75,282
> 175,659
> 00
> -15,072
> 00
> 2,860
> 00
> 00
> 163,447
> 00
> The code i am using.
> print(pytesseract.image_to_string(image.crop((2000,1570,2500,2000)),
>                                   lang="eng",
>
>                                   config = '-c tessedit_do_invert=0 --psm 
> 11').replace("\n\n","\n"))
>
> I want to ask if there is any changes i can do to get decimal point with
> psm 11.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tesseract-ocr/4d793afb-b554-4322-83ef-4ff94accc85en%40googlegroups.com
> <https://groups.google.com/d/msgid/tesseract-ocr/4d793afb-b554-4322-83ef-4ff94accc85en%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8xQ%2BUwBUo2A_t6XWrbhZyM1Jvtw9%3Dp_nbuMi%2BBr%2BVG_%2BA%40mail.gmail.com.

Reply via email to