init
This commit is contained in:
commit
97982cceaf
56
README.md
Normal file
56
README.md
Normal file
@ -0,0 +1,56 @@
|
||||
# 图片OCR监控工具
|
||||
|
||||
这是一个用于监控指定文件夹中的图片文件,并自动进行OCR文字识别的工具。
|
||||
|
||||
## 功能特点
|
||||
|
||||
- 自动监控指定文件夹中的图片文件
|
||||
- 支持多种图片格式(PNG、JPG、JPEG、BMP、TIFF)
|
||||
- 每两分钟检查一次新文件
|
||||
- 支持中英文识别
|
||||
- 可配置的输出目录和关键词映射
|
||||
- 详细的日志记录
|
||||
|
||||
## 安装要求
|
||||
|
||||
1. Python 3.7+
|
||||
2. Tesseract-OCR
|
||||
3. 相关Python包(见requirements.txt)
|
||||
|
||||
## 安装步骤
|
||||
|
||||
1. 安装Tesseract-OCR:
|
||||
- Windows: 下载并安装 [Tesseract-OCR](https://github.com/UB-Mannheim/tesseract/wiki)
|
||||
- 确保将Tesseract添加到系统环境变量中
|
||||
|
||||
2. 安装Python依赖:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## 配置文件
|
||||
|
||||
配置文件支持YAML或JSON格式,示例配置如下:
|
||||
|
||||
```yaml
|
||||
"文件夹路径":
|
||||
output_dir: "输出目录"
|
||||
language: "chi_sim+eng"
|
||||
key_mapping:
|
||||
"关键词1": "映射值1"
|
||||
"关键词2": "映射值2"
|
||||
```
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. 创建配置文件(config.yaml或config.json)
|
||||
2. 运行程序:
|
||||
```bash
|
||||
python image_ocr_monitor.py
|
||||
```
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 确保Tesseract-OCR正确安装并配置
|
||||
- 确保有足够的磁盘空间存储识别结果
|
||||
- 程序会在当前目录下创建ocr_monitor.log日志文件
|
Loading…
Reference in New Issue
Block a user