Linux command
gocr 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
OCR an image
gocr [image.pbm]
Set recognition mode
gocr -m [mode] [image.pbm]
Output to file
gocr -o [output.txt] [image.pbm]
Set character filter
gocr -C "[a-zA-Z0-9]" [image.pbm]
说明
gocr is an optical character recognition (OCR) program that reads images and outputs recognized text. It supports various image formats including PBM, PGM, PPM, and can be tuned for specific character sets. The tool processes scanned documents and images to extract text, integrating into document processing pipelines via standard input and output.
参数
- -o _FILE_
- Output file.
- -m _MODE_
- Recognition mode.
- -C _CHARS_
- Expected characters.
- -i _FORMAT_
- Input format.
- --help
- Display help information.
FAQ
What is the gocr command used for?
gocr is an optical character recognition (OCR) program that reads images and outputs recognized text. It supports various image formats including PBM, PGM, PPM, and can be tuned for specific character sets. The tool processes scanned documents and images to extract text, integrating into document processing pipelines via standard input and output.
How do I run a basic gocr example?
Run `gocr [image.pbm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o _FILE_ do in gocr?
Output file.