Ocr

From trpc-group/trpc-agent-go · View interactive version

Ocr is an AI agent skill from the GitHub repository trpc-group/trpc-agent-go. Extract text from images using Tesseract OCR

How to use this skill

Skill file

OCR Image Text Extraction Skill

Extract text from images using Tesseract OCR engine.

Capabilities

Usage

Basic OCR

python3 scripts/ocr.py <image_file> <output_file>

With Options

# Specify language (default: eng)
python3 scripts/ocr.py image.png text.txt --lang eng

# Chinese text
python3 scripts/ocr.py image.png text.txt --lang chi_sim

# Multiple languages
python3 scripts/ocr.py image.png text.txt --lang eng+chi_sim

# With image preprocessing (improves accuracy)
python3 scripts/ocr.py image.png text.txt --preprocess

# JSON output with confidence scores
python3 scripts/ocr.py image.png output.json --format json

Download and OCR from URL

# OCR from remote image
python3 scripts/ocr_url.py <image_url> <output_file>

# With options
python3 scripts/ocr_url.py https://example.com/image.jpg text.txt --lang eng --preprocess

Parameters

Common Languages

| Language | Code |

|----------|------|

| English | eng |

| Chinese (Simplified) | chi_sim |

| Chinese (Traditional) | chi_tra |

| Japanese | jpn |

| Korean | kor |

| French | fra |

| German | deu |

| Spanish | spa |

| Russian | rus |

| Arabic | ara |

Supported Image Formats

PNG, JPG, JPEG, GIF, BMP, TIFF, WEBP

Dependencies

Installation

# Python packages
pip install "pytesseract==0.3.13" "Pillow==13.0.0"

# Tesseract OCR engine
sudo apt-get install tesseract-ocr  # Ubuntu/Debian
sudo yum install tesseract           # CentOS/RHEL
brew install tesseract               # macOS
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.