kmeans::Segmenter Class Reference

Inheritance diagram for kmeans::Segmenter:

kmeans::ContourSegmenter kmeans::KMeansSegmenter< T > kmeans::MergingKMSegmenter< T > List of all members.

Detailed Description

Base class of image segmentation algorithms.

Author:
Lakshman
Version:
Id
Segmenter.h,v 1.5 2009/06/02 20:17:50 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 LImage< int > segment (const LImage< int > &orig)=0
virtual ~Segmenter ()

Static Public Member Functions

static void computeRegionProperty (const LImage< int > &orig, const LImage< int > &label, vector< RegionProperty > *fillme)
 Fills in the passed in vector with a vector of computed region properties.
static void computeRegionProperty (const LImage< int > &label, vector< RegionProperty > *fillme)
 Fills in the passed in vector with a vector of computed region properties.

Static Protected Member Functions

static void expand_segment (int x, int y, const LImage< int > &orig, LImage< int > &segimg, int label)
 Set the segimg at x,y to be label and then call this function.
static LImage< int > relabel (const LImage< int > &label_img)
 Will relabel the image, removing unused labels.
static LImage< int > pruneRegions (const LImage< int > &label, RegionPruner &)
 This method removes all regions that meet certain criteria.

Static Protected Attributes

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

Classes

class  RegionPruner
 The function object passed into Segmenter::pruneRegions that controls the criteria on which the pruning is done. More...


Member Typedef Documentation

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

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

typedef std::vector<int> kmeans::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.

Reimplemented in kmeans::MergingKMSegmenter< T >.


Constructor & Destructor Documentation

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


Member Function Documentation

static void kmeans::Segmenter::computeRegionProperty ( const LImage< int > &  label,
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 kmeans::Segmenter::computeRegionProperty ( const LImage< int > &  orig,
const LImage< int > &  label,
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.

static void kmeans::Segmenter::expand_segment ( int  x,
int  y,
const LImage< int > &  orig,
LImage< int > &  segimg,
int  label 
) [static, 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 LImage<int> kmeans::Segmenter::pruneRegions ( const LImage< int > &  label,
RegionPruner  
) [static, protected]

This method removes all regions that meet certain criteria.

The function object RegionPruner should be provided to target the appropriate regions.

Usually, you'd want to relabel the image that you get after pruning.

static LImage<int> kmeans::Segmenter::relabel ( const LImage< int > &  label_img  )  [static, protected]

Will relabel the image, removing unused labels.

virtual LImage<int> kmeans::Segmenter::segment ( const LImage< int > &  orig  )  [pure virtual]

Implemented in kmeans::KMeansSegmenter< T >, and kmeans::ContourSegmenter.


Member Data Documentation

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

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


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