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

lti::watershedSegmentation Class Reference

Watershed segmentation of a channel8. More...

#include <ltiWatershedSegmentation.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class watershedSegmentation More...

Public Member Functions

 watershedSegmentation ()
 watershedSegmentation (const parameters &par)
 watershedSegmentation (const watershedSegmentation &other)
virtual ~watershedSegmentation ()
virtual const char * getTypeName () const
bool apply (channel8 &srcdest)
bool apply (const channel8 &src, channel8 &dest)
bool apply (const channel8 &src, matrix< int > &result)
watershedSegmentationcopy (const watershedSegmentation &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

Watershed segmentation of a channel8.

Algorithms:

Luc Vincent and Pierre Soille. "Watersheds in Digital Spaces: An Efficient Algorithm Based on Immersion Simulations". IEEE transactions on pattern analysis and machine intelligence, vol. 13, No. 6, June 1991, pp. 583-598

and

Patrick De Smet and Rui Luis V.P.M. Pires "Implementation and analysis of an optimized rainfalling watershed algorithm". IS&T\/SPIE's 12th Annual Symposium Electronic Imaging 2000, January 2000, pp. 759-766

Watershed segmentation is a morphological operator used to segment gray valued images, based on viewing the gray image as a topographical map. Valleys will be flooded with water until the water surpasses the sheds separating them. At the contact lines the "watershed lines" are created and constitute the limits between the image regions.

The topological map is usually a gradient map (the magnitude of the gradient) that can be obtained with the lti::orientationMap functor or with the lti::colorContrastGradient, or directly using the lti::gradientKernelX and lti::gradientKernelY and the lti::convolution operator.

Two kinds of apply() methods are provided:


Constructor & Destructor Documentation

lti::watershedSegmentation::watershedSegmentation (  ) 

default constructor

lti::watershedSegmentation::watershedSegmentation ( const parameters par  ) 

constructor with parameters

lti::watershedSegmentation::watershedSegmentation ( const watershedSegmentation other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::watershedSegmentation::apply ( const channel8 src,
matrix< int > &  result 
)

creates a region mask on the given matrix only exact watersheds are marked 0, regions are numbered 1,2,.

..

Parameters:
src channel8 with the source data. This is usually the gradient of an intensity image or a color contrast gradient.
result matrix<int> with the resulting region information, with a label per basin.
bool lti::watershedSegmentation::apply ( const channel8 src,
channel8 dest 
)

saves a watershed mask of src in dest

Parameters:
src channel8 with the source data. This is usually the gradient of an intensity image or a color contrast gradient.
dest channel8 where the watershed lines will be written.
bool lti::watershedSegmentation::apply ( channel8 srcdest  ) 

creates a watershed mask on the given channel8

Parameters:
srcdest channel8 with the source data. This is usually the gradient of an intensity image or a color contrast gradient. The resulting watershed lines will be left here too.
Returns:
true if successful, false otherwise
virtual functor* lti::watershedSegmentation::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::segmentation.

watershedSegmentation& lti::watershedSegmentation::copy ( const watershedSegmentation 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::watershedSegmentation::getParameters (  )  const

returns used parameters

Reimplemented from lti::functor.

virtual const char* lti::watershedSegmentation::getTypeName (  )  const [virtual]

returns the name of this type ("watershedSegmentation")

Reimplemented from lti::segmentation.


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

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