Forrest logo
back to the tesseract tool

tesseract:tldr:dc8d9

tesseract: List page segmentation modes and their descriptions.
$ tesseract --help-psm
try on your machine

The command "tesseract --help-psm" is used to get help and information about the Page Segmentation Modes (PSM) of the Tesseract OCR (Optical Character Recognition) engine.

Tesseract is an open-source OCR engine that can recognize text from images or scanned documents. The PSM in Tesseract refers to the different methods or modes it uses to segment the input image or document into individual characters or words.

By running the command "tesseract --help-psm", you can obtain a list and brief description of the various PSM options available in Tesseract.

Here's an example of the output you might get when running the command:

Page segmentation modes:
  0    Orientation and script detection (OSD) only.
  1    Automatic page segmentation with OSD.
  2    Automatic page segmentation, but no OSD, or OCR.
  3    Fully automatic page segmentation, but no OSD. (Default)
  4    Assume a single column of text of variable sizes.
  5    Assume a single uniform block of vertically aligned text.
  6    Assume a single uniform block of text.
  7    Treat the image as a single text line.
  8    Treat the image as a single word.
  9    Treat the image as a single word in a circle.
  10   Treat the image as a single character.

Each number represents a specific PSM that you can use as an option with the Tesseract command. By specifying a particular PSM, you can control how Tesseract interprets and segments the input image or document. This is helpful in improving the OCR accuracy based on the structure and layout of the text you're trying to extract.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tesseract tool