Navigation
next
previous
|
Leptonica Home
»
Unofficial v1.68 Documentation
»
The Leptonica Image Processing Library
¶
README
Building
Leptonica
Overview
Building on Linux/Unix/MacOS
Building on Windows
I/O libraries
Leptonica
is dependent on
Developing with
Leptonica
Simplicity
leptprotos.h
GNU runtime functions for stream redirection to memory
Typedefs
Compile-time control over
stderr
output
In-memory raster format (Pix)
Conversion between Pix and other in-memory raster formats
Custom memory management
What’s in
Leptonica
?
Rasterops
Binary morphology
Grayscale morphology and rank order filters
Image scaling
Image shear and rotation (and affine, projective, ...)
Sequential algorithms
Image enhancement
Convolution and cousins
Image I/O
Colormap removal and color quantization
Programmatic image display
Document image analysis
Data structures
Examples of programs that are easily built using the library
JBig2 encoder
Versions
Reporting Bugs
Version Notes for Leptonica
1.68 – 14 Mar 11
1.67 – 9 Nov 10
1.66 – 3 Aug 10
1.65 – 5 Apr 10
1.64 – 3 Jan 10
1.63 – 8 Nov 09
1.62 – 26 Jul 09
1.61 – 26 Apr 09
1.60 – 19 Jan 09
1.59 – 11 Jan 09
Earlier Versions
Source Code and Information
Download
Related Publications
Source Downloads
Leptonica
Microsoft Visual Studio 2008
Xtractlib
Plotlib
Overview of the Leptonica Library
Introduction
Reading and writing images
Affine transforms
Rasterops
Supplemental Notes on Using the Library
I/O: File read/write
The Pix data structure
Rasterops
Scaling
Rotation
Shear
Affine, projective and bilinear transforms
Binary morphology
Grayscale morphology
Block convolution
Connected components
Leptonica
API
Function Summary by Category
Functions
/src
Directory Contents (API Implementation)
File Summary by Category
File Descriptions
/prog
Directory Contents (Examples)
File Summary by Category
File Summary by Type
File Descriptions
Image Processing Operations
Rasterop (a.k.a. Bitblt)
What is rasterop?
What else can you do with rasterop?
How is rasterop implemented efficiently?
What special cases have been implemented?
What is the calling sequence for rasterops?
Binary Morphology
Introduction
References and meta-references
What is binary morphology?
And there is more to morphology than translationally-invariant, increasing primitives
What about boundary conditions?
The rasterop implementation of binary morphology
The destination word accumulation implementation of binary morphology
Auto-generated dwa code interfaces
Separable atomic operations with block Sels, Sel decomposition, sequence interpreters and simplicity of use
Atomic separable functions
Interpreters for sequences of atomic operations
Summary of available implementations
Full image rasterops
Destination word accumulation
Sequence interpreters
Performance comparisons
Binary morphology and cellular automata
Grayscale Morphology
What is grayscale morphology?
Implementation using the van Herk/Gil-Werman algorithm
The Tophat and H-dome transforms
Generalization: rank order filters
Definition
How is a brick rank order filter implemented efficiently?
Points of interest in the implementation
Fast Convolution
What is a convolution?
Grayscale convolution using an accumulator
Binary rank-order and median filter using an accumulator
Image Scaling
Overview of image scaling
What types of image scaling are useful?
Grayscale Image Scaling
How do you scale a grayscale image?
Sampling
Area mapping (or area averaging) and lowpass filtering
Mip-mapping
Min-max
Linear interpolation
Implementation of linear interpolation scaling
Considerations of efficiency for linear interpolation scaling
Binary Image Scaling
Arbitrary binary rescaling
Special case: power-of-2 binary expansion
Special case: 2x binary reduction
Binary to Gray Downscaling (“scale-to-gray”)
Gray to binary upscaling (“scale-to-binary”)
Fast scaling with depth change
Summary of scaling functions in leptonica
Image Rotation
How do you rotate an image by an arbitrary angle?
Rotation by Shear
Rotation by Area Mapping
Fast rotation by Area Mapping
Special rotations by 90, 180 or 270 degrees
180 degree rotation
90 degree rotation
Affine Transformations (and cousins)
What is an affine transformation?
How are affine transformations implemented?
Sequential affine transform
Some related transforms
Conformal affine transform
Projective transform
Bilinear transform
Shearing an image
Seed Filling and Connected Components
What is the seed fill operation?
Seed filling to identify connected components
Seed filling using binary morphology
Seed filling using iterative raster-ordered filling
Seed filling extended to grayscale images (
grayscale reconstruction
)
Generation of a distance function within connected components
Labelling pixels using distance function and grayscale reconstruction
Watershed transform on seeded grayscale images
Grayscale and Color Image Enhancement
What do we mean by grayscale and color image enhancement?
What other types of enhancement operations exist?
Gamma correction
Contrast enhancement
Unsharp masking (edge enhancement)
Image smoothing
Grayscale Mapping and Binarization
Locally adapted grayscale mapping
Locally adapted binarization
Sauvola binarization
Local background normalization
Local background normalization with Otsu
Local background normalization with two thresholds
Global binarization
Connectivity-preserving Thinning
Image Processing Applications
Removing dark lines from a light pencil drawing
Dewarping Text Pages
What distortions do you expect with camera images?
How do you dewarp a camera image based on text lines?
Example showing images and disparity fields
Measuring the Skew of Document Images
For further reading . . .
Color Quantization
How did the need for color quantization arise?
What are the basic problems in color quantization?
Why is error diffusion dithering important?
What methods have been proposed for color quantization?
Modified median cut implementation
Octree implementation
What is the octree data structure used in
Leptonica
?
How is the octree formed?
What color is associated with each octcube in the color table?
How are color indices assigned to the image pixels?
How is the error diffusion dithering applied?
How fast is the implementation?
For further reading on color quantization . . .
Color Segmentation
What is color segmentation and why do it?
How does color segmentation differ from color quantization?
How do we generate the color segmented images?
How does a color segmented image look?
Border Representations of Connected Components
Overview of connected component borders
Generating chain codes for connected components
Serializing the data for a compressed file format
Forming a single border for each connected component
Rendering the outline as a filled raster
Putting it together
Document Image Analysis
Jbig2 Classifier
What is the origin of the Jbig2 application?
What is jbig2?
What is provided in Leptonica?
What is the definition of the hausdorff distance, and how is it implemented efficiently?
How are the images aligned for comparison?
What’s special about the Leptonica implementation?
Open source implementation of jbig2
What is Mixed Raster format?
Byte Addressing for Efficiency and Portability
What is “Well-Tested” C Code?
Some Issues in Software Design
Software design principles
What happens when things go wrong?
Extremism in programming languages
Some practical issues in programming
Some issues with memory management
A low-level gotcha: operator precedence in C
Anecdotes on managing complexity in programming
Fred Hoyle’s N
2
law of complexity
Complexity at the interface
Getting managed by complexity
Managing the complexity
Selected Papers on Image Processing and Image Analysis
Low-level image processing
Basic methods of image segmentation
Document Image Decoding
Image Compression
Simple Document Image Applications
Complex Document Applications using Segmentation
Papers by Luc Vincent
Comprehensive bibliography
About the Copyright License
What is the Significance of the Name “leptonica”?
Glossary
“Unofficial” Leptonica Documentation Release Notes
The Leptonica Image Processing Library
README
Version Notes for Leptonica
Source Code and Information
Source Downloads
Overview of the Leptonica Library
Supplemental Notes on Using the Library
Leptonica
API
/src
Directory Contents (API Implementation)
/prog
Directory Contents (Examples)
Image Processing Operations
Image Processing Applications
Byte Addressing for Efficiency and Portability
What is “Well-Tested” C Code?
Some Issues in Software Design
Selected Papers on Image Processing and Image Analysis
About the Copyright License
What is the Significance of the Name “leptonica”?
Glossary
Leptonica & Visual Studio 2008
Other Topics
Quick search
Enter search terms or a module, class or function name.
Navigation
next
previous
|
Leptonica Home
»
Unofficial v1.68 Documentation
»