ocr_directory
Scan a directory and OCR all images in one step, eliminating the need to manually list files. Configure extensions, recursion, and confidence threshold for tailored extraction.
Instructions
批量 OCR 目录下所有图片。
节省 token 场景:无需先列出目录再构建文件列表,一步完成 目录扫描 + 批量 OCR。适合整本扫描版教辅的批量提取。
参数: directory_path: 目录绝对路径 extensions: 逗号分隔的扩展名(不含点),默认 png,jpg,jpeg,bmp,webp recursive: 是否递归子目录,默认 False is_handwritten: 是否手写笔记,默认 False confidence_threshold: 置信度阈值,默认 0.85
返回: 按文件名排序的识别结果,紧凑格式(总数 + 文件名 + 文本)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recursive | No | ||
| extensions | No | png,jpg,jpeg,bmp,webp | |
| directory_path | Yes | ||
| is_handwritten | No | ||
| confidence_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |