Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 559 Bytes

ocr.md

File metadata and controls

21 lines (15 loc) · 559 Bytes

使用tesseract进行图片文字识别

一段简单的识别代码:

from PIL import Image
import pytesseract

if __name__ == "__main__":
    image = Image.open(r"test004.png")
    result = pytesseract.image_to_string(image, "chi_sim")
    # 输出识别内容
    print(result)