Install
openclaw skills install image-ocr-readerExtract text from images using OCR with support for Chinese and English in common formats like jpg, png, and jpeg.
openclaw skills install image-ocr-reader从图片中提取文字内容的技能,支持中文和英文识别。
# Ubuntu/Debian
sudo apt-get install tesseract-ocr
# macOS
brew install tesseract
# CentOS/RHEL
sudo yum install tesseract
pip install pytesseract Pillow
python3 image_ocr_reader.py --file /path/to/image.jpg
from image_ocr_reader import extract_text
text = extract_text("/path/to/image.jpg")
print(text)
输入一张包含文字的图片,输出提取的文字内容。