Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by python-forum.io #
 
PREVIOUS NEXT
Tagged: #save #text #file
ADD COMMENT
Topic
Name
2+9 =