w2img::Segmenter Class Reference

Inheritance diagram for w2img::Segmenter:

w2img::ContourSegmenter w2img::ExtendedWatershedSegmenter w2img::HysteresisSegmenter w2kmeans::MultiscaleSegmenter w2img::AdaptiveHysteresisSegmenter w2kmeans::KMeansSegmenter< T > List of all members.

Detailed Description

Base class of image segmentation algorithms.

Author:
Lakshman
Version:
Id
w2img_Segmenter.h,v 1.11 2011/01/27 20:44:58 lakshman Exp


Public Types

typedef Cluster< SingleFeatureRegionProperty
 The simplest region property is a cluster of a single feature.
typedef std::vector< int > Replacement
 Given a region with label i, Replacement[i] provides the new label, usually at a particular scale.

Public Member Functions

virtual SegmenterResult segment (const code::Image< int > &orig)=0
virtual ~Segmenter ()
 Segmenter (bool wrapRadials=false)

Static Public Member Functions

static void computeRegionProperty (const code::Image< int > &orig, const SegmenterResult &label, std::vector< RegionProperty > *fillme)
 Fills in the passed in vector with a vector of computed region properties.
static void computeRegionProperty (const SegmenterResult &label, std::vector< RegionProperty > *fillme)
 Fills in the passed in vector with a vector of computed region properties.
static void normalize (Segmenter::Replacement &replacement)
 completes the cycle
static SegmenterResult relabel (const SegmenterResult &label_img)
 Will relabel the image, removing unused labels.

Protected Member Functions

void expand_segment (int x, int y, const code::Image< int > &orig, code::Image< int > &segimg, int label) const
 Set the segimg at x,y to be label and then call this function.

Static Protected Attributes

static const int Unset = -1000
static const int Invalid = -2000

Classes

class  RegionPruner
 Prunes regions after segmentation controls the criteria on which the pruning is done. More...


Member Typedef Documentation

typedef Cluster< SingleFeature > w2img::Segmenter::RegionProperty

The simplest region property is a cluster of a single feature.

typedef std::vector<int> w2img::Segmenter::Replacement

Given a region with label i, Replacement[i] provides the new label, usually at a particular scale.

The Replacement structure is such that replacement[i] provides the replacement label for the current label i. This replacement may be 0 or negative, which means that no replacement exists.


Constructor & Destructor Documentation

virtual w2img::Segmenter::~Segmenter (  )  [inline, virtual]

w2img::Segmenter::Segmenter ( bool  wrapRadials = false  )  [inline]


Member Function Documentation

static void w2img::Segmenter::computeRegionProperty ( const SegmenterResult label,
std::vector< RegionProperty > *  fillme 
) [static]

Fills in the passed in vector with a vector of computed region properties.

The input label image should be a labeled image such as that returned by the segmenter. WARNING: The resulting properties will not have any of the value elements set because the original image was not passed in.

static void w2img::Segmenter::computeRegionProperty ( const code::Image< int > &  orig,
const SegmenterResult label,
std::vector< RegionProperty > *  fillme 
) [static]

Fills in the passed in vector with a vector of computed region properties.

The input label image should be a labeled image such as that returned by the segmenter.

void w2img::Segmenter::expand_segment ( int  x,
int  y,
const code::Image< int > &  orig,
code::Image< int > &  segimg,
int  label 
) const [protected]

Set the segimg at x,y to be label and then call this function.

It will expand out segimg to all contiguous values that match

static void w2img::Segmenter::normalize ( Segmenter::Replacement replacement  )  [static]

completes the cycle

static SegmenterResult w2img::Segmenter::relabel ( const SegmenterResult label_img  )  [static]

Will relabel the image, removing unused labels.

virtual SegmenterResult w2img::Segmenter::segment ( const code::Image< int > &  orig  )  [pure virtual]

Implemented in w2img::ContourSegmenter, w2img::ExtendedWatershedSegmenter, w2img::HysteresisSegmenter, w2kmeans::KMeansSegmenter< T >, and w2kmeans::MultiscaleSegmenter.


Member Data Documentation

const int w2img::Segmenter::Invalid = -2000 [static, protected]

const int w2img::Segmenter::Unset = -1000 [static, protected]


Generated on Fri May 4 13:40:23 2012 for WDSS-IIw2algs by  doxygen 1.4.7