image-ocr-new
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "image-ocr-new" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-dc397bde1a1761479b7d9f4cea44b10b68220f9e11333da84a429d5bcdc8a95d. Verify the upstream source and version against https://skillhub.cn/skills/user_f80dbe1a/image-ocr-new before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Image text extraction (OCR): extract text from images using Tesseract OCR, supporting Chinese, English, and other languages.
Introduction source: third_party · user_f80dbe1a · 1.0.1 Reference
SkillPi interpretation
- Tasks
- Extract text from images using Tesseract OCR (supports Chinese, English, and other languages).
- Software, accounts and paid services
- **Tesseract OCR** (v5.0+) **Python packages**: `pytesseract`, `Pillow` **Language packs**: Chinese (`chi_sim`) and English (`eng`) recommended
- Testing
- Not tested
Browse files
Frontmatter
name: image-ocr
description: "Extract text from images using Tesseract OCR (supports Chinese, English, and other languages)."
version: 1.1.0
author: Hermes Agent
license: MIT
platforms: [windows, macos, linux]
metadata:
hermes:
tags: [OCR, Image, Text-Extraction, Chinese, English, Cross-Platform]Image OCR (Tesseract)
Extract text from images using Tesseract OCR engine with Python wrapper. Cross-platform support for Windows, macOS, and Linux.
Prerequisites
- Tesseract OCR (v5.0+)
- Python packages:
pytesseract,Pillow - Language packs: Chinese (
chi_sim) and English (eng) recommended
Install Tesseract
| Platform | Command |
|---|---|
| Windows | Download from UB-Mannheim/tesseract |
| macOS | brew install tesseract |
| Linux | sudo apt install tesseract-ocr (Debian/Ubuntu) |
Install Python Dependencies
pip install pytesseract Pillow
Usage
Basic OCR
python scripts/ocr.py <image_path> [-l LANGUAGE] [--psm PSM]
Examples:
# Auto-detect Tesseract, use default language (chi_sim+eng)
python scripts/ocr.py screenshot.png
# Specify language
python scripts/ocr.py document.jpg -l chi_sim+eng
# Specify page segmentation mode
python scripts/ocr.py photo.jpg -l eng --psm 6
# Specify Tesseract path manually
python scripts/ocr.py image.png --tesseract-path "C:\Program Files\Tesseract-OCR"
# List installed language packs
python scripts/ocr.py --list-langs
Tesseract Discovery (auto-detection order)
The script finds Tesseract automatically in this order:
--tesseract-pathCLI argumentTESSERACT_PATHenvironment variable- Config file (
~/.config/image-ocr/config.jsonor%APPDATA%/image-ocr/config.json) - Common install locations:
- Windows:
C:\Program Files\Tesseract-OCR,C:\Program Files (x86)\Tesseract-OCR - macOS:
/usr/local/bin/tesseract,/opt/homebrew/bin/tesseract - Linux:
/usr/bin/tesseract,/usr/local/bin/tesseract
- Windows:
- System
PATH
Persistent Configuration
Create a JSON config file to set a persistent Tesseract path:
Windows: %APPDATA%\image-ocr\config.json
macOS/Linux: ~/.config/image-ocr/config.json
{
"tesseract_path": "/path/to/tesseract"
}
Supported Languages
| Language | Code | Description |
|---|---|---|
| Chinese Simplified | chi_sim |
简体中文 |
| Chinese Traditional | chi_tra |
繁體中文 |
| English | eng |
English |
| Japanese | jpn |
日本語 |
| Korean | kor |
한국어 |
Combine multiple languages: chi_sim+eng
Script Location
scripts/ocr.py - Main OCR script
Notes
- For best results, ensure images are clear and well-lit
- Chinese recognition requires
chi_simlanguage pack - Output is plain text; use
--psmflag for specific page segmentation modes - Verbose diagnostic info (Tesseract version, path, language) is printed to stderr
Current listing version
1.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- OCR 文本提取是高频刚需场景,直接解决用户从图像中提取文本的核心痛点
- 支持中英文及多语言,具备跨平台能力,实用价值高
Highlights
- 触发词精准完整,明确描述功能为从图像中提取文本,边界清晰
Highlights
- 文档结构清晰完整,包含前置条件、安装步骤、使用示例、配置说明等
- frontmatter 完整,示例丰富,便于用户理解和执行
Highlights
- 工具来源明确,参数说明完整,支持多种语言包和 PSM 模式
- 提供自动发现 Tesseract 路径的机制及持久化配置方案,容错能力强
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 28, 29, 34 -
Administrator or elevated privileges
Elevate only when necessary. Keep protection and certificate validation enabled and avoid broad system access.
Mentioned in main document · lines 29
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
**Tesseract OCR** (v5.0+) **Python packages**: `pytesseract`, `Pillow` **Language packs**: Chinese (`chi_sim`) and English (`eng`) recommended
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.