Examples
The following example programs, shipped with GIL, demonstrate various features of the library.
-
x_gradient.cpp: Writing an algorithm that operates on generic images
-
dynamic_image.cpp: Using images whose properties (color space, channel type) are specified at run time
-
histogram.cpp: Creating a histogram
-
interleaved_ptr.cpp, interleaved_ptr.hpp, interleaved_ref.hpp: Creating your own pixel reference and pixel iterator
-
mandelbrot.cpp: Creating a synthetic image defined by a function
-
packed_pixel.cpp: Defining bitmasks and images whose channels or pixels are not byte-aligned
-
resize.cpp: Rescaling an image using bilinear sampling (requires the optional Numeric extension)
-
affine.cpp: Applying an affine transformation to an image (requires the optional Numeric extension)
-
convolution.cpp: Blurring images (requires the optional Numeric extension)
-
sharpening.cpp: Sharpening an image using unsharp masking
-
euclidean_distance_transform.cpp: Computing the distance transform of a binary image
-
morphology.cpp: Applying morphological operations (dilation, erosion, opening, closing, …)
-
threshold.cpp: Thresholding an image
-
adaptive_threshold.cpp: Thresholding an image adaptively, based on local pixel neighborhoods
-
convolve2d.cpp: Convolving an image with a 2D kernel