Answers for "pytesseract.image_to_string save text file"

0

pytesseract.image_to_string save text file

try:
    from PIL import Image
except ImportError:
    import Image
import pytesseract
# Simple image to string
text=print(pytesseract.image_to_string(Image.open('test.jpg'),lang="eng"))
with open('out.txt', 'w') as f:
    print(text, file=f)
Posted by: Guest on April-07-2021

Browse Popular Code Answers by Language