Thank you I'll give that a go and see if it works any better. Is it worth
trying to increase the contrast as well?
On Tuesday, May 7, 2019 at 9:52:21 AM UTC-4, zdenop wrote:
>
> modify last part of your code to this:
>
> # invert image and convert to grayscale
> inverted = PIL.ImageOps.invert(newim2).convert('LA')
> loopTest = (pytesseract.image_to_string(
> inverted, config=tessdata_dir_config + '--psm 8 --oem 3'))
> print(loopTest)
> loopTest = int(loopTest)
>
> Do not forget to import PIL and set up tessdata_dir_config as stated in
> pytesseract docs[1].
>
> [1] https://pypi.org/project/pytesseract/
>
> Zdenko
>
>
>
> ut 7. 5. 2019 o 15:09 Sean Connell <[email protected] <javascript:>>
> napĂsal(a):
>
>> Thanks a bunch for the response. How would I go about inverting the image
>> and increasing the contrast though. Sorry I'm still learning how all this
>> works.
>>
>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/tesseract-ocr.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tesseract-ocr/3f937317-fe4b-4d92-af5e-96e169bb4df9%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/85079d34-8003-4f7a-a9ba-39d75a9bb388%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.