sudo apt-get update sudo apt-get install tesseract-ocr pip install pytesseract python import pytesseract from PIL import Image python pytesseract.pytesseract.tesseract_cmd = '/usr/bin/tesseract' python image = Image.open('image.jpg') python text = pytesseract.image_to_string(image, lang='chi_sim') python print(text) python import pytesseract from PIL import Image pytesseract.pytesseract.tesseract_cmd = '/usr/bin/tesseract' image = Image.open('image.jpg') text = pytesseract.image_to_string(image, lang='chi_sim') print(text)


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