Mathematics: Image Processing

The source code provides basic template support for n-dimensional images whose pixel type is trivially copyable.
The base class Image that implements n-dimensional images. Derived classes are provided for 1D, 2D, and 3D images.
Image processing functions for 2D binary images and for pixel visitation of any type image. Binary image functions include connected component labeling, dilations and erosions, openings and closings, boundary extraction, flood fill, L1 and L2 distance transforms, and skeletonization. Pixel-visitation functions with std::function-based callbacks include drawing thick pixels, lines, circles, rectangles, and flood fill.
Image processing functions for 3D binary images and for pixel visitation of any type image. Binary image functions include connected component labeling and dilations. The only pixel-visitation function involves traversing a 3D rasterized line segment.
Basic histogram construction, including extracting tails of the distribution. The histograms can be saved to disk as text or as a binary image.
Support for curve extraction (as polylines) from pixel data using a squares-based algorithm, a triangle-based algorithm, or an adaptive skeleton climbing algorithm.
Support for surface extraction (as triangle meshes) from voxel data using a cubes-based algorithm and ear clipping, a tetrahedron-based algorithm, a Marching-Cubes-like algorithm, or an adaptive skeleton climbing algorithm.
2D and 3D Image processing using differential geometric algorithms associated with solving linear or nonlinear parabolic partial differential equations.
Level set methods and fast marching methods. These are algorithms that are useful for sophisticated segmentation. They involve breadth-first searching of image data.