Holds and builds a pyramid of images: starting with an image at full resolution (octave=1), it builds a number of half-resolution images: octave=2 at 1/2 , octave=3 at 1/2^2, octave=N at 1/2^(N-1).
Color (RGB) or grayscale pyramids can be built from color input images; only grayscale pyramids can be built from grayscale images.
The algorithm to halve the images can be either a 1:2 decimation or a smooth filter (arithmetic mean of every 4 pixels).
Pyramids are built by invoking the method buildPyramid() or buildPyramidFast()
Example of usage:
- Both converting to grayscale and building the octave images have SSE2-optimized implementations (if available).
- See also
Definition at line 57 of file CImagePyramid.h.
| ||CImagePyramid ()|
| ||Default constructor, does nothing. More...|
| ||~CImagePyramid ()|
| ||Destructor, frees the stored images. More...|
|void ||buildPyramid (const mrpt::img::CImage &img, const size_t nOctaves, const bool smooth_halves=true, const bool convert_grayscale=false)|
| ||Fills the vector images with the different octaves built from the input image. More...|
|void ||buildPyramidFast (mrpt::img::CImage &img, const size_t nOctaves, const bool smooth_halves=true, const bool convert_grayscale=false)|
| ||Exactly like buildPyramid(), but if the input image has not to be converted from RGB to grayscale, the image data buffer is reutilized for the 1st octave in images, emptying the input image. More...|