LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::quadTreeSegmentation Class Reference

Quad-Tree based color image segmentation method. More...

#include <ltiQuadTreeSegmentation.h>

Inheritance diagram for lti::quadTreeSegmentation:
Inheritance graph
[legend]
Collaboration diagram for lti::quadTreeSegmentation:
Collaboration graph
[legend]

List of all members.

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
quadTreeSegmentationcopy (const quadTreeSegmentation &other)
quadTreeSegmentationoperator= (const quadTreeSegmentation &other)
virtual functorclone () const
const parametersgetParameters () 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

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
other the object to be copied
virtual lti::quadTreeSegmentation::~quadTreeSegmentation (  )  [virtual]

Destructor.


Member Function Documentation

bool lti::quadTreeSegmentation::apply ( const image src,
imatrix mask,
palette pal 
) const

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.

Parameters:
src image with the source data.
mask labeled mask with the segmented regions.
pal color palette for each region (the mean value)
Returns:
true if apply successful or false otherwise.
bool lti::quadTreeSegmentation::apply ( const image src,
image dest 
) const

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.

Parameters:
src image with the source data.
dest image where the result will be left.
Returns:
true if apply successful or false otherwise.
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.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

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  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

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.

bool lti::quadTreeSegmentation::split ( const image img,
imatrix mask 
) const

Split the given image using a quad-tree strategy.

Each detected region will have its own label in the resulting mask.

Parameters:
img input color image
mask labeled mask with one integer ID per detected region.
Returns:
true if successful or false otherwise.
bool lti::quadTreeSegmentation::stats ( const image img,
const point from,
const point to,
trgbPixel< float > &  stats 
) const [protected]

Compute the std.

deviations in the given region of the image


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:45 2010 for LTI-Lib by Doxygen 1.6.1