Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- import pytesseract
- import os
- s = ''
- for i in range(31722):
- pjg = len(str(i))
- count = '0'*(8-pjg)+str(i)
- pth = 'output/jpg/{}.jpg'.format(count)
- if os.path.exists(pth):
- im = Image.open(pth)
- text = pytesseract.image_to_string(im, lang='eng')
- s+=text
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement