Python提取图片中的文字

2020-10-20  本文已影响0人  ZoranLee

python版本

安装 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()

上一篇 下一篇

猜你喜欢

热点阅读