Inheritance diagram for w2img::ExtendedWatershedSegmenter:
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 | |
ExtendedWatershedSegmenter (float min, float max, float incr, bool useSmallestValidCluster, int deltaForCluster, int sizeThresholdInPixels, bool is_polar) | |
min,max,incr: data range. | |
virtual SegmenterResult | segment (const code::Image< int > &orig) |
The resulting image has pixels marked with the region number, starting at 1. | |
SegmenterResult | segment (const code::Image< int > &orig) const |
The resulting image has pixels marked with the region number, starting at 1. | |
template<class T> | |
code::Image< int > | findLocalMaxima (const T &data, int numx, int numy) const |
The resulting image goes from 0 to N where N is (max-min)/incr with each pixel receiving the bin of the local maxima whose influence it falls under. | |
Static Public Member Functions | |
static void | setPolar (bool is_polar) |
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. | |
Static Public Attributes | |
static const int | UNMARKED = -1 |
static const int | GLOBBED = -3 |
static const int | TOOSMALL = -4 |
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 |
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.
w2img::ExtendedWatershedSegmenter::ExtendedWatershedSegmenter | ( | float | min, | |
float | max, | |||
float | incr, | |||
bool | useSmallestValidCluster, | |||
int | deltaForCluster, | |||
int | sizeThresholdInPixels, | |||
bool | is_polar | |||
) |
min,max,incr: data range.
The values are used to quantize the field before finding localmaxima. Note that you can convert this algorithm to find local minima by simply specifying the range as 60 20 -10.
useSmallestValidCluster: The smallest valid cluster is used, increasing the depth until the saliency criterion is met. Note that if you use this, deltaForCluster has no impact
deltaForCluster: Specify how many data-increments a cluster is allowed to range over. For example, if you specify 0, then a cluster will contain only values that fall in the same interval as the maximum. Use 1 for fields such as reflectivity or VIL; use the total number of intervals for fields such as shear. Larger values of D also yield clusters at larger scales, so this can be a cheap alternative to the KMeans algorithm used by w2segmotion.
sizeThresholdInPixels: Blobs smaller than the specified size will get ignored.
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
code::Image<int> w2img::ExtendedWatershedSegmenter::findLocalMaxima | ( | const T & | data, | |
int | numx, | |||
int | numy | |||
) | const |
The resulting image goes from 0 to N where N is (max-min)/incr with each pixel receiving the bin of the local maxima whose influence it falls under.
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.
SegmenterResult w2img::ExtendedWatershedSegmenter::segment | ( | const code::Image< int > & | orig | ) | const [inline] |
The resulting image has pixels marked with the region number, starting at 1.
Zero values do not belong to any region.
virtual SegmenterResult w2img::ExtendedWatershedSegmenter::segment | ( | const code::Image< int > & | orig | ) | [inline, virtual] |
The resulting image has pixels marked with the region number, starting at 1.
Zero values do not belong to any region.
Implements w2img::Segmenter.
static void w2img::ExtendedWatershedSegmenter::setPolar | ( | bool | is_polar | ) | [static] |
const int w2img::ExtendedWatershedSegmenter::GLOBBED = -3 [static] |
const int w2img::Segmenter::Invalid = -2000 [static, protected, inherited] |
const int w2img::ExtendedWatershedSegmenter::TOOSMALL = -4 [static] |
const int w2img::ExtendedWatershedSegmenter::UNMARKED = -1 [static] |
const int w2img::Segmenter::Unset = -1000 [static, protected, inherited] |