pip install pytesseract python pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" python tessdata_dir_config = r'--tessdata-dir "<path_to_tessdata>"' python import pytesseract from PIL import Image image = Image.open('image.jpg') image = image.convert('L') text = pytesseract.image_to_string(image, lang='chi_sim') print(text)


上一篇:
下一篇:
切换中文