Updated: April 26, 2015
Leptonica is a pedagogically-oriented open source site
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
- Tom Powers has built the
Unofficial Leptonica Documentation.
It covers all the information in these pages and is more easily
navigated. You are encouraged to use it instead.
- 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.
- 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: April 26, 2015 ]
- See here for further
information about the source code.
Contents
Contact: Dan Bloomberg (bloomberg "at" ieee "dot" org) for
questions and suggestions

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