Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tesserocr import PyTessBaseAPI
- images = ['samplel.jpg', 'sample2.jpg', 'sample3.jpg', 'sample4.jpg', 'sample5.jpg',
- 'sample6.jpg', 'sample7.jpg']
- images2 = ['examplel.png', 'example2.png', 'example3.png', 'example4.png']
- with PyTessBaseAPI(path='C:/Users/wfng/test/tesserocr-master/tessdata/.', lang='eng+chi_sim') as api:
- for img in images:
- api.SetImageFile(img)
- print(api.GetUTF8Text())
- print(api.AllWordConfidences())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement