OS Manuals

/usr/bin/text2image

Tesseract Open Source OCR Engine

From tesseract 5.5.2-r8 (os), captured 2026-11-05 by running text2image --help (exit 0). permalink

Usage:
  /usr/bin/text2image [OPTION ...]

  --debug_level  Level of Trainer debugging  (type:int default:0)
  --load_images  Load images with tr files  (type:int default:0)
  --tlog_level  Minimum logging level for tlog() output  (type:int default:0)
  --exposure  Exposure level in photocopier  (type:int default:0)
  --resolution  Pixels per inch  (type:int default:300)
  --xsize  Width of output image  (type:int default:3600)
  --ysize  Height of output image  (type:int default:4800)
  --max_pages  Maximum number of pages to output (0=unlimited)  (type:int default:0)
  --margin  Margin round edges of image  (type:int default:100)
  --ptsize  Size of printed text  (type:int default:12)
  --leading  Inter-line space (in pixels)  (type:int default:12)
  --box_padding  Padding around produced bounding boxes  (type:int default:0)
  --glyph_resized_size  Each glyph is square with this side length in pixels  (type:int default:0)
  --glyph_num_border_pixels_to_pad  Final_size=glyph_resized_size+2*glyph_num_border_pixels_to_pad  (type:int default:0)
  --clusterconfig_min_samples_fraction  Min number of samples per proto as % of total  (type:double default:0.625)
  --clusterconfig_max_illegal  Max percentage of samples in a cluster which have more than 1 feature in that cluster  (type:double default:0.05)
  --clusterconfig_independence  Desired independence between dimensions  (type:double default:1)
  --clusterconfig_confidence  Desired confidence in prototypes created  (type:double default:1e-06)
  --char_spacing  Inter-character space in ems  (type:double default:0)
  --underline_start_prob  Fraction of words to underline (value in [0,1])  (type:double default:0)
  --underline_continuation_prob  Fraction of words to underline (value in [0,1])  (type:double default:0)
  --min_coverage  If find_fonts==true, the minimum coverage the font has of the characters in the text file to include it, between 0 and 1.  (type:double default:1)
  --degrade_image  Degrade rendered image with speckle noise, dilation/erosion and rotation  (type:bool default:true)
  --rotate_image  Rotate the image in a random way.  (type:bool default:true)
  --distort_image  Degrade rendered image with noise, blur, invert.  (type:bool default:false)
  --invert  Invert the image  (type:bool default:true)
  --white_noise  Add  Gaussian Noise  (type:bool default:true)
  --smooth_noise  Smoothen Noise  (type:bool default:true)
  --blur  Blur the image  (type:bool default:true)
  --strip_unrenderable_words  Remove unrenderable words from source text  (type:bool default:true)
  --ligatures  Rebuild and render ligatures  (type:bool default:false)
  --find_fonts  Search for all fonts that can render the text  (type:bool default:false)
  --render_per_font  If find_fonts==true, render each font to its own image. Image filenames are of the form output_name.font_name.tif  (type:bool default:true)
  --list_available_fonts  List available fonts and quit.  (type:bool default:false)
  --render_ngrams  Put each space-separated entity from the input file into one bounding box. The ngrams in the input file will be randomly permuted before rendering (so that there is sufficient variety of characters on each line).  (type:bool default:false)
  --output_word_boxes  Output word bounding boxes instead of character boxes. This is used for Cube training, and implied by --render_ngrams.  (type:bool default:false)
  --bidirectional_rotation  Rotate the generated characters both ways.  (type:bool default:false)
  --only_extract_font_properties  Assumes that the input file contains a list of ngrams. Renders each ngram, extracts spacing properties and records them in output_base/[font_name].fontinfo file.  (type:bool default:false)
  --output_individual_glyph_images  If true also outputs individual character images  (type:bool default:false)
  --configfile  File to load more configs from  (type:string default:)
  --D  Directory to write output files to  (type:string default:)
  --F  File listing font properties  (type:string default:font_properties)
  --X  File listing font xheights  (type:string default:)
  --U  File to load unicharset from  (type:string default:unicharset)
  --O  File to write unicharset to  (type:string default:)
  --output_trainer  File to write trainer to  (type:string default:)
  --test_ch  UTF8 test character string  (type:string default:)
  --fonts_dir    (type:string default:)
  --fontconfig_tmpdir    (type:string default:)
  --text  File name of text input to process  (type:string default:)
  --outputbase  Basename for output image/box file  (type:string default:)
  --writing_mode  Specify one of the following writing modes.
'horizontal' : Render regular horizontal text. (default)
'vertical' : Render vertical text. Glyph orientation is selected by Pango.
'vertical-upright' : Render vertical text. Glyph  orientation is set to be upright.  (type:string default:horizontal)
  --font  Font description name to use  (type:string default:Arial)
  --unicharset_file  File with characters in the unicharset. If --render_ngrams is true and --unicharset_file is specified, ngrams with characters that are not in unicharset will be omitted  (type:string default:)
Options (54)
OptionDescriptionSource
--debug_levelLevel of Trainer debugging (type:int default:0)help
--load_imagesLoad images with tr files (type:int default:0)help
--tlog_levelMinimum logging level for tlog() output (type:int default:0)help
--exposureExposure level in photocopier (type:int default:0)help
--resolutionPixels per inch (type:int default:300)help
--xsizeWidth of output image (type:int default:3600)help
--ysizeHeight of output image (type:int default:4800)help
--max_pagesMaximum number of pages to output (0=unlimited) (type:int default:0)help
--marginMargin round edges of image (type:int default:100)help
--ptsizeSize of printed text (type:int default:12)help
--leadingInter-line space (in pixels) (type:int default:12)help
--box_paddingPadding around produced bounding boxes (type:int default:0)help
--glyph_resized_sizeEach glyph is square with this side length in pixels (type:int default:0)help
--glyph_num_border_pixels_to_padFinal_size=glyph_resized_size+2*glyph_num_border_pixels_to_pad (type:int default:0)help
--clusterconfig_min_samples_fractionMin number of samples per proto as % of total (type:double default:0.625)help
--clusterconfig_max_illegalMax percentage of samples in a cluster which have more than 1 feature in that cluster (type:double default:0.05)help
--clusterconfig_independenceDesired independence between dimensions (type:double default:1)help
--clusterconfig_confidenceDesired confidence in prototypes created (type:double default:1e-06)help
--char_spacingInter-character space in ems (type:double default:0)help
--underline_start_probFraction of words to underline (value in [0,1]) (type:double default:0)help
--underline_continuation_probFraction of words to underline (value in [0,1]) (type:double default:0)help
--min_coverageIf find_fonts==true, the minimum coverage the font has of the characters in the text file to include it, between 0 and 1.help
--degrade_imageDegrade rendered image with speckle noise, dilation/erosion and rotation (type:bool default:true)help
--rotate_imageRotate the image in a random way.help
--distort_imageDegrade rendered image with noise, blur, invert.help
--invertInvert the image (type:bool default:true)help
--white_noiseAdd Gaussian Noise (type:bool default:true)help
--smooth_noiseSmoothen Noise (type:bool default:true)help
--blurBlur the image (type:bool default:true)help
--strip_unrenderable_wordsRemove unrenderable words from source text (type:bool default:true)help
--ligaturesRebuild and render ligatures (type:bool default:false)help
--find_fontsSearch for all fonts that can render the text (type:bool default:false)help
--render_per_fontIf find_fonts==true, render each font to its own image.help
--list_available_fontsList available fonts and quit.help
--render_ngramsPut each space-separated entity from the input file into one bounding box.help
--output_word_boxesOutput word bounding boxes instead of character boxes.help
--bidirectional_rotationRotate the generated characters both ways.help
--only_extract_font_propertiesAssumes that the input file contains a list of ngrams.help
--output_individual_glyph_imagesIf true also outputs individual character images (type:bool default:false)help
--configfileFile to load more configs from (type:string default:)help
--DDirectory to write output files to (type:string default:)help
--FFile listing font properties (type:string default:font_properties)help
--XFile listing font xheights (type:string default:)help
--UFile to load unicharset from (type:string default:unicharset)help
--OFile to write unicharset to (type:string default:)help
--output_trainerFile to write trainer to (type:string default:)help
--test_chUTF8 test character string (type:string default:)help
--fonts_dir(type:string default:)help
--fontconfig_tmpdir(type:string default:)help
--textFile name of text input to process (type:string default:)help
--outputbaseBasename for output image/box file (type:string default:)help
--writing_modeSpecify one of the following writing modes.help
--fontFont description name to use (type:string default:Arial)help
--unicharset_fileFile with characters in the unicharset.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.