ocrad(1)

ocrad1

Optical text recognition tool

Usage

ocrad [options] [files]

Overview

GNU Ocrad is an OCR (Optical Character Recognition) program based on a feature extraction method. It reads images in png or pnm formats and produces text in byte (8-bit) or UTF-8 formats. The formats pbm (bitmap), pgm (greyscale), and ppm (color) are collectively known as pnm.

Ocrad includes a layout analyser able to separate the columns or blocks of text normally found on printed pages.

For best results the characters should be at least 20 pixels high. If they are smaller, try the option --scale. Scanning the image at 300 dpi usually produces a character size good enough for ocrad. Merged, very bold, or very light (broken) characters are normally not recognized correctly. Try to avoid them.

Options

-h, --help

display this help and exit

-V, --version

output version information and exit

-a, --append

append text to output file

-c, --charset=<name>

try '--charset=help' for a list of names

-e, --filter=<name>

try '--filter=help' for a list of names

-E, --user-filter=<file>

user-defined filter, see manual for format

-f, --force

force overwrite of output file

-F, --format=<fmt>

output format (byte, utf8)

-i, --invert

invert image levels (white on black)

-l, --layout

perform layout analysis

-o, --output=<file>

place the output into <file>

-q, --quiet

suppress all messages

-s, --scale=[-]<n>

scale input image by [1/]<n>

-t, --transform=<name>

try '--transform=help' for a list of names

-T, --threshold=<n>

threshold for binarization (0.0-1.0)

-u, --cut=<l,t,w,h>

cut the input image by the rectangle given

-v, --verbose

be verbose

-x, --export=<file>

export results in ORF format to <file>

If no files are specified, or if a file is '-', ocrad reads the image from standard input. If the option -o is not specified, ocrad sends text to standard output.

Exit status: 0 for a normal exit, 1 for environmental problems (file not found, invalid command-line options, I/O errors, etc), 2 to indicate a corrupt or invalid input file, 3 for an internal consistency error (e.g., bug) which caused ocrad to panic.

Releases

11 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0
  2. 5.0–6.0
  3. 7
  4. 8
  5. 9
  6. 10–11
  7. 12
  8. 13–Arch

--cut since Debian 7 (Wheezy); --export since Debian 7 (Wheezy); --output since Debian 7 (Wheezy); --quiet since Debian 7 (Wheezy); --user-filter since Debian 9 (Stretch); -E since Debian 9 (Stretch); -q since Debian 7 (Wheezy); -u since Debian 7 (Wheezy).

--block until Debian 6.0 (Squeeze); --crop until Debian 6.0 (Squeeze); -b until Debian 6.0 (Squeeze); -p until Debian 6.0 (Squeeze).

Reporting bugs

Report bugs to [email protected]
Ocrad home page: http://www.gnu.org/software/ocrad/ocrad.html
General help using GNU software: http://www.gnu.org/gethelp

From ocrad 0.29-3 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.