[Leptonica Home Page]

Source Code and Information


Updated: Oct 16, 2024


    The road to wisdom? -- Well, it's plain
    and simple to express:
        Err
        and err
        and err again
        but less
        and less
        and less.

            --Piet Hein (Grooks)

Contents

This site contains well-tested C code for some basic image processing operations, along with a description of the functions and some design methods. A full set of affine transformations (translation, shear, rotation, scaling) on images of all depths is included, with the exception that some of the scaling methods do not work at all depths. There are also implementations of binary morphology, grayscale morphology, convolution and rank order filters, and applications such as jbig2 image processing and color quantization.

You will also find basic utilities for the safe and efficient handling of arrays (of strings, numbers, number pairs and image-related geometrical objects), generic and byte queues, stacks, lists, heaps, sets, ordered maps and hashmaps, as well as endian-independent indexing into 32-bit arrays.

There is a very high-level summary of the functions in the library. You can use this to quickly get an idea of where you may find a needed function.

Documentation external to the source code is provided for the following operations and applications:

  1. Rasterops

  2. Binary morphology

  3. Grayscale morphology

  4. Convolution

  5. Scaling

  6. Rotation

  7. Affine transformations

  8. Seed filling and connected components

  9. Applications:
  10. Grayscale and color image enhancement

  11. Grayscale mapping and binarization

  12. Connectivity-preserving thinning

  13. Playing around


Download

Click here to download a source release. [ update: Oct 16, 2024 ]

Be sure to download the README as well.

If you are building the library and applications on Windows, the sw package is available on the github repository. There you can obtain the latest release and build the library using cmake.

You may also find these pages useful:


Related Publications

Here are some references to selected papers on image processing and image analysis that you might find interesting.

Luc Vincent and I wrote a chapter on Document image analysis, in Mathematical morphology: theory and applications, published by ISTE-Wiley in June 2010. The book is is a compendium on topics in morphology, edited by Laurent Najman and Hugues Talbot. Here is a page that provides information, including the location of source code for running the applications and generating the figures for this chapter.


[Leptonica Home Page]

Creative Commons License
This documentation is licensed by Dan Bloomberg under a Creative Commons Attribution 3.0 United States License.


© Copyright 2001-2024, Leptonica