Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. from tesserocr import PyTessBaseAPI
  2.  
  3. images = ['samplel.jpg', 'sample2.jpg', 'sample3.jpg', 'sample4.jpg', 'sample5.jpg',
  4.  
  5. 'sample6.jpg', 'sample7.jpg']
  6. images2 = ['examplel.png', 'example2.png', 'example3.png', 'example4.png']
  7.  
  8. with PyTessBaseAPI(path='C:/Users/wfng/test/tesserocr-master/tessdata/.', lang='eng+chi_sim') as api:
  9. for img in images:
  10. api.SetImageFile(img)
  11. print(api.GetUTF8Text())
  12. print(api.AllWordConfidences())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement