 
   
 
Updated: Sept 18, 2025
 Leptonica  is a pedagogically-oriented open source library
containing software that is broadly useful for image processing
and image analysis applications.
Featured operations are 
    -  Rasterop (a.k.a. bitblt)
    
-  Affine transformations (scaling, translation, rotation, shear)
         on images of arbitrary pixel depth
    
-  Binary and grayscale morphology, rank order, and convolution
    
-  Seedfill and connected components
    
-  Image transformations combining changes in scale and pixel depth
    
-  Pixelwise masking, blending, enhancement, arithmetic ops, etc.
Ancillary operations include
    -  I/O for standard image formats
    
-  Utilities to handle arrays of image-related data types
    
-  Utilities for generic stacks, queues, heaps and lists;
         and for byte queues and arrays of numbers and strings
Example applications include
    -  Octcube-based color quantization, with and without dithering
    
-  Modified median-cut color quantization, with and without dithering
    
-  Skew determination of text images
    
-  Segmentation of page images with mixed text and images
    
-  jbig2 unsupervised classifier
    
-  Border representations of 1 bit/pixel images and raster
         conversion for SVG
    
-  PostScript generation (levels 1, 2, 3) of images for
          device-independent output
    
-  PDF generation (levels 1, 2) of images for device-independent output
    
-  Dewarping images of text taken with a camera
    
-  Book-adaptive text recognition
    
-  Rendering text on an image
    
-  Connectivity-preserving thinning and thickening of 1 bit/pixel images
    
-  Line removal from a grayscale sketch
    
-  Search for least-cost paths on binary and grayscale images
Reference documentation for users
    -  The Leptonica image processing and analysis source code comes
	 with a very weakly restricted
         
	 copyright license.
    
-  The  README
         gives an overview of installation and usage, with a brief
	 description of the library contents.
    
-  A page of brief notes on version
         changes.
    
-  A high-level view of the source
         files in the library.
    
-  For a deeper look into specific components of the library,
         see the web pages linked from the
	 image processing page.
    
-  Over 10 years ago, Tom Powers built the 
          Unofficial Leptonica Documentation.
         This documentation contains anecdotes and information about
         algorithmic approaches in readable form.  However, the README
         and other information about the software is based on
         version 1.68, and is far out of date.  The ancient versions
         of leptonica referred to in those pages have not been supported
         for over a decade.
    
-  Uncompleted sets of  somewhat detailed
         usage notes  and a 
         lightweight overview have been attempted but are unlikely
         to be completed anytime in the current millenium.
    
-  The final arbiter is, of course, the source itself.
Source download
    -  Click here to download
         the source.
	 [ update: Sept 18, 2025 ]
    
-  See here for further
         information about the source code.
Fun stuff
Contact: Dan Bloomberg (bloomberg "at" ieee "dot" org) for
         questions and suggestions

  
  This documentation is licensed by Dan Bloomberg under a
  Creative Commons
  Attribution 3.0 United States License.
© Copyright 2001-2024, Leptonica