Crate contour_tracing
source · [−]Expand description
A 2D library to trace contours.
Features
Core features:
- Trace contours using the Theo Pavlidis’ algorithm (connectivity: 4-connected)
- Trace outlines in clockwise direction
- Trace holes in counterclockwise direction
- Input format: an image buffer or a 2D array of bits
- Output format: a string of SVG Path commands
Manual parameters:
- User can specify to close or not the paths (with the SVG Path Z command)
Examples
For examples, have a look at the different functions below.
Functions
A function that takes a 2D array of bits and an option as input and return a string of SVG Path commands as output.
single_l8_to_paths
image
A function that takes an image buffer, an 8-bit luminance value and an option as input and return a string of SVG Path commands as output.