This change was sufficient. BTW: I use data from best repository[1] [1] https://github.com/tesseract-ocr/tessdata_best
Zdenko ut 7. 5. 2019 o 18:01 Sean Connell <nightfire120sla...@gmail.com> napísal(a): > 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 <nightfire...@gmail.com> 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 tesser...@googlegroups.com. >>> To post to this group, send email to tesser...@googlegroups.com. >>> 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 tesseract-ocr+unsubscr...@googlegroups.com. > To post to this group, send email to tesseract-ocr@googlegroups.com. > 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 > <https://groups.google.com/d/msgid/tesseract-ocr/85079d34-8003-4f7a-a9ba-39d75a9bb388%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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 tesseract-ocr+unsubscr...@googlegroups.com. To post to this group, send email to tesseract-ocr@googlegroups.com. 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/CAJbzG8wY8v%2BaCF2y0W5CM_pqgpxgLNbMKU2JctKu%3Dk5LebGvDw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.