latest version v1.9 - last update 10 Apr 2010 |
Quad-Tree based color image segmentation method. More...
#include <ltiQuadTreeSegmentation.h>
Classes | |
class | parameters |
The parameters for the class quadTreeSegmentation. More... | |
Public Member Functions | |
quadTreeSegmentation () | |
quadTreeSegmentation (const parameters &par) | |
quadTreeSegmentation (const quadTreeSegmentation &other) | |
virtual | ~quadTreeSegmentation () |
virtual const char * | getTypeName () const |
bool | apply (const image &src, image &dest) const |
bool | apply (const image &src, imatrix &mask, palette &pal) const |
bool | split (const image &img, imatrix &mask) const |
quadTreeSegmentation & | copy (const quadTreeSegmentation &other) |
quadTreeSegmentation & | operator= (const quadTreeSegmentation &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Member Functions | |
bool | stats (const image &img, const point &from, const point &to, trgbPixel< float > &stats) const |
bool | split (const image &img, const float &threshold, const point &minSize, tree< rectangle >::node &qtree) const |
Quad-Tree based color image segmentation method.
This is a very simple but inefficient method to segment color images. It is provided because it is one of the classical methods of split-and-merge segmentation techniques.
A quad-tree based partition of the image if first done, and after that neighbor regions are merged if they are similar enough.
lti::quadTreeSegmentation::quadTreeSegmentation | ( | ) |
Default constructor.
lti::quadTreeSegmentation::quadTreeSegmentation | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::quadTreeSegmentation::quadTreeSegmentation | ( | const quadTreeSegmentation & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::quadTreeSegmentation::~quadTreeSegmentation | ( | ) | [virtual] |
Destructor.
Generate a second color image, where each found region gets the mean color obtain from the original image.
This is not the real segmentation, but for visualization purposes some times this is the desired functionality.
src | image with the source data. | |
mask | labeled mask with the segmented regions. | |
pal | color palette for each region (the mean value) |
Generate a second color image, where each found region gets the mean color obtain from the original image.
This is not the real segmentation, but for visualization purposes some times this is the desired functionality.
virtual functor* lti::quadTreeSegmentation::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Reimplemented from lti::segmentation.
quadTreeSegmentation& lti::quadTreeSegmentation::copy | ( | const quadTreeSegmentation & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::segmentation.
const parameters& lti::quadTreeSegmentation::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::functor.
virtual const char* lti::quadTreeSegmentation::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("quadTreeSegmentation").
Reimplemented from lti::segmentation.
quadTreeSegmentation& lti::quadTreeSegmentation::operator= | ( | const quadTreeSegmentation & | other | ) |
bool lti::quadTreeSegmentation::split | ( | const image & | img, | |
const float & | threshold, | |||
const point & | minSize, | |||
tree< rectangle >::node & | qtree | |||
) | const [protected] |
Recursively compute the quad-tree for the image.