python版本
- 3.7.7
安装 pytesseract
- pip install pytesseract
import pytesseract
from PIL import Image
def run():
image = Image.open("code.jpeg")
code = pytesseract.image_to_string(image)
# text = pytesseract.image_to_string(image, lang='chi_sim')
print(code)
if __name__ == '__main__':
run()
网友评论