Image
生成和处理图像内容的基础功能模块
Core functionality module for generating and processing image content
clawhub install image使用 Vision Recognition 进行高精度的 OCR 文字识别
Perform high-precision OCR text recognition using Vision Recognition technology
# 安装 Skill(会下载 SKILL.md 到 .claude/skills/) clawhub install vision-recognition-ocr # 之后直接对 Claude 说"用 Vision Recognition Ocr 帮我…"即可
# 同样的安装命令,兼容所有支持 SKILL.md 的 AI 编程工具 clawhub install vision-recognition-ocr
此 Skill 兼容 OpenClaw 标准。 安装后自动生成 SKILL.md 文件,任何支持 OpenClaw 协议的 AI Agent(Claude Code、Cursor、Windsurf 等)均可直接调用。
推荐GPU加速识别(NVIDIA 6GB+),支持CPU模式但速度慢;可用云API提升精度
py -3.11; on Linux/macOS prefer python3; if plain python already points to Python 3, it also works.py -3.11 scripts/ocr_general_basic.py '{"url":"https://baidu-ai.bj.bcebos.com/ocr/general.png"}'
py -3.11 scripts/car_recognize.py '{"image_path":"/path/to/car.jpg"}'
image_path (string, optional): Local image pathimage_base64 (string, optional): Base64 image content (without data URL prefix)url (string, optional): Public image URLimage_path / image_base64 / url is required.top_num (int, optional): candidate count (1-20)baike_num (int, optional): include baike (0/1)output_brand (bool, optional, car only)general_basic)detect_direction (bool, default false)detect_language (bool, default false)paragraph (bool, default false)probability (bool, default false)accurate_basic)detect_direction (bool, default false)paragraph (bool, default false)probability (bool, default false)multidirectional_recognize (bool, default false)handwriting)eng_granularity (string, default word, optional letter)detect_direction (bool, default false)probability (bool, default false)detect_alteration (bool, default false)table)cell_contents (bool, default false)return_excel (bool, default false)BAIDU_BCE_BEARER_TOKEN / BAIDU_BCE_BEARER (or BAIDU_API_KEY when its value starts with bce-v3/)BAIDU_VISION_API_KEY + BAIDU_VISION_SECRET_KEYBAIDU_API_KEY + BAIDU_SECRET_KEYbce-v3/... 的 Bearer Token。BAIDU_BCE_BEARER_TOKEN(或写入 BAIDU_API_KEY)。API Key、Secret Key。BAIDU_VISION_API_KEY + BAIDU_VISION_SECRET_KEY(或 BAIDU_API_KEY + BAIDU_SECRET_KEY)。py -3.11 scripts/ocr_general_basic.py '{"url":"https://baidu-ai.bj.bcebos.com/ocr/general.png"}'
若能返回识别结果或标准错误码(非鉴权错误),即配置成功。py -3.11 scripts/ocr_general_basic.py '{
"url": "https://baidu-ai.bj.bcebos.com/ocr/general.png",
"detect_direction": false,
"detect_language": false,
"paragraph": false,
"probability": false
}'
py -3.11 scripts/ocr_accurate_basic.py '{
"url": "https://baidu-ai.bj.bcebos.com/ocr/general.png",
"detect_direction": false,
"paragraph": false,
"probability": false,
"multidirectional_recognize": false
}'
py -3.11 scripts/ocr_handwriting.py '{
"url": "https://baidu-ai.bj.bcebos.com/ocr/handwriting.jpeg",
"eng_granularity": "letter",
"detect_direction": false,
"probability": false,
"detect_alteration": false
}'
py -3.11 scripts/ocr_table.py '{
"url": "https://b0.bdstatic.com/ugc/CVzjffcaizcBDqTK_zwMEQbbd344224206285ae3b5015e2e17f62c.jpg",
"cell_contents": false,
"return_excel": false
}'
clawhub run vision-recognition-ocr --input scan.png --output result.json --language auto --preprocess enhance --confidence-threshold 0.8 --format structured图像托管:将图像上传到 img402.dev 获取公开链接,用于消息分享、文档嵌入或社交媒体发布。
Upload images to img402.dev and get a public URL. Free tier: 1MB max, 7-day retention, no auth. Use when the agent needs a hosted image URL — for sharing in messages, embedding in documents, posting to social platforms, or any context that requires a public link to an image file.
clawhub install image-hosting