17 CImagePyramid::CImagePyramid()
21 CImagePyramid::~CImagePyramid()
27 template <
bool FASTLOAD>
31 const size_t nOctaves,
32 const bool smooth_halves,
33 const bool convert_grayscale)
38 obj.images.resize(nOctaves);
41 if (convert_grayscale &&
img.isColor())
44 img.grayscale(
obj.images[0]);
50 obj.images[0].copyFastFrom(
img);
55 for (
size_t o=1;o<nOctaves;o++)
58 obj.images[o-1].scaleHalfSmooth(
obj.images[o]);
59 else obj.images[o-1].scaleHalf(
obj.images[o]);
63 void CImagePyramid::buildPyramid(
65 const size_t nOctaves,
66 const bool smooth_halves,
67 const bool convert_grayscale)
69 buildPyramid_templ<false>(*
this,*
const_cast<mrpt::utils::CImage*
>(&
img), nOctaves,smooth_halves,convert_grayscale);
72 void CImagePyramid::buildPyramidFast(
74 const size_t nOctaves,
75 const bool smooth_halves,
76 const bool convert_grayscale)
78 buildPyramid_templ<true>(*
this,
img,nOctaves,smooth_halves,convert_grayscale);
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define ASSERT_ABOVE_(__A, __B)
A class for storing images as grayscale or RGB bitmaps.
GLsizei GLsizei GLuint * obj
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).
void buildPyramid_templ(CImagePyramid &obj, mrpt::utils::CImage &img, const size_t nOctaves, const bool smooth_halves, const bool convert_grayscale)
Classes for computer vision, detectors, features, etc.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.