gocr
Optical character recognition program
TLDR
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]
SYNOPSIS
gocr [options] image
DESCRIPTION
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.
PARAMETERS
IMAGE
Image file to process.-o FILE
Output file.-m MODE
Recognition mode.-C CHARS
Expected characters.-i FORMAT
Input format.--help
Display help information.
INSTALL
sudo apt install gocr
sudo dnf install gocr
sudo pacman -S gocr
sudo zypper install gocr
brew install gocr
nix profile install nixpkgs#gocr
CAVEATS
Accuracy varies by image quality. Works best with clean scans. Consider tesseract for better accuracy.
HISTORY
gocr (also known as JOCR, since the name GOCR was already taken on SourceForge) was created by Jörg Schulenburg in the late 1990s as a free OCR program under the GPL.