Text=(pytesseract.image_to_data(image, lang='fra')) With open('boundingBoxes.test_ocr2','w') as fp: fp.write(text) Text=(pytesseract.image_to_boxes(image, lang='fra')) With open('text.test_ocr2','w') as fp: fp.write(text) Text=(pytesseract.image_to_string(image, lang='fra')) '\n\n\n\n' PIL.UnidentifiedImageError: cannot identify image file './radio_lomb_300.tiff' import pytesseract Image = Image.open(r'./radio_lomb_300.tiff')įile "/Library/Frameworks/amework/Versions/3.9/lib/python3.9/site-packages/PIL/Image.py", line 3023, in open But for some reasons it doesn't work with tiff images that contains only 1 page and pdf.įile "/Users/fatiatravaille/Downloads/ocr_json/test.py", line 8, in I have the code bellow, and it works for most of images type.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |