w2kmeans::MultiscaleSegmenter Class Reference

Inheritance diagram for w2kmeans::MultiscaleSegmenter:

w2img::Segmenter w2kmeans::KMeansSegmenter< T > List of all members.

Detailed Description

Abstract base class that defines the interface of multiscale segmenters.

Author:
Lakshman
Version:
Id
w2kmeans_MultiscaleSegmenter.h,v 1.5 2009/06/02 20:17:58 lakshman Exp


Public Types

typedef Cluster< SingleFeature > RegionProperty
 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 ~MultiscaleSegmenter ()
virtual w2img::SegmenterResult getScale (size_t scale, bool rawlabels=false) const =0
 The different scales.
virtual w2img::SegmenterResult segment (const code::Image< int > &orig)=0
 The resulting image has pixels marked with the region number, starting at 1.
virtual size_t getNumScales () const =0
 Returns the total number of scales in the segmentation.

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


Member Typedef Documentation

typedef Cluster< SingleFeature > w2img::Segmenter::RegionProperty [inherited]

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

typedef std::vector<int> w2img::Segmenter::Replacement [inherited]

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 w2kmeans::MultiscaleSegmenter::~MultiscaleSegmenter (  )  [virtual]


Member Function Documentation

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

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, inherited]

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, inherited]

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

virtual size_t w2kmeans::MultiscaleSegmenter::getNumScales (  )  const [pure virtual]

Returns the total number of scales in the segmentation.

The returned values correspond to the previous call to segment()

Implemented in w2kmeans::KMeansSegmenter< T >.

virtual w2img::SegmenterResult w2kmeans::MultiscaleSegmenter::getScale ( size_t  scale,
bool  rawlabels = false 
) const [pure virtual]

The different scales.

The returned values correspond to the previous call to segment()

Parameters:
scale The scale to return. 0 is the most detail, 1 is less ...
rawlabels If true, then no relabeling of the original image is done. If false, the labeling corresponds to that of raw_segimg.
Returns:
image at scale. If the scale passed in exceeeds the number of scales in the segmentation, an invalid image (dim_x()*dim_y() <= 0) is returned.
The returned values correspond to the previous call to segment()

Implemented in w2kmeans::KMeansSegmenter< T >.

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

completes the cycle

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

Will relabel the image, removing unused labels.

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

The resulting image has pixels marked with the region number, starting at 1.

Zero values do not belong to any region.

What gets returned is the segmentation with the most detail. To obtain the segmentation at coarser levels of detail, use the getScale() function.

Implements w2img::Segmenter.

Implemented in w2kmeans::KMeansSegmenter< T >.


Member Data Documentation

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

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


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