[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| WatershedOptions Class Reference Superpixel Creation |

Options object for watershed algorithms. More...

`#include <vigra/watersheds.hxx>`

## Public Member Functions
WatershedOptions & | biasLabel (unsigned int label, double factor)
| Bias the cost of the specified region by the given factor. More...
WatershedOptions & | completeGrow ()
| Perform complete grow. More...
WatershedOptions & | keepContours ()
| Keep one-pixel wide contour between regions. More...
WatershedOptions & | regionGrowing ()
| Use region-growing watershed. More...
WatershedOptions & | seedOptions (SeedOptions const &s)
| Specify seed options. More...
WatershedOptions & | srgType (SRGType type)
| Set SRGType explicitly. More...
WatershedOptions & | stopAtThreshold (double threshold)
| Stop region growing when the boundaryness exceeds the threshold. More...
WatershedOptions & | turboAlgorithm (unsigned int bucket_count=256)
| Use a simpler, but faster region growing algorithm. More...
WatershedOptions & | unionFind ()
| Use union-find watershed. More...
WatershedOptions & | useMethod (Method method)
| Specify the algorithm to be used. More...
| WatershedOptions ()
| Create options object with default settings. More...

## Detailed Description

Options object for watershed algorithms.

Usage:

see watershedsMultiArray() and watershedsRegionGrowing() for detailed examples.

Examples:
  graph_agglomerative_clustering.cxx, and watershed.cxx.

## Constructor & Destructor Documentation

WatershedOptions | ( |  | ) |

Create options object with default settings.

Defaults are: perform complete grow (all pixels are assigned to regions), use standard algorithm, assume that the destination image already contains region seeds.

## Member Function Documentation

WatershedOptions& completeGrow | ( |  | ) |

Perform complete grow.

That is, all pixels are assigned to regions, without explicit contours in between.

Default: true

WatershedOptions& keepContours | ( |  | ) |

Keep one-pixel wide contour between regions.

Note that this option is unsupported by the turbo algorithm.

Default: false

WatershedOptions& srgType | ( | SRGType | type | ) |

Set SRGType explicitly.

Default: CompleteGrow

WatershedOptions& stopAtThreshold | ( | double | threshold | ) |

Stop region growing when the boundaryness exceeds the threshold.

This option may be combined with completeGrow() and keepContours().

Default: no early stopping

WatershedOptions& turboAlgorithm | ( | unsigned int | bucket_count = `256` | ) |

Use a simpler, but faster region growing algorithm.

The algorithm internally uses a BucketQueue to determine the processing order of the pixels. This is only useful, when the input boundary indicator image contains integers in the range `[0, ..., bucket_count-1]`. Since these boundary indicators are typically represented as UInt8 images, the default `bucket_count` is 256.

Default: don't use the turbo algorithm

WatershedOptions& seedOptions | ( | SeedOptions const & | s | ) |

Specify seed options.

In this case, watershedsRegionGrowing() assumes that the destination image does not yet contain seeds. It will therefore call generateWatershedSeeds() and pass on the seed options.

Default: don't compute seeds (i.e. assume that destination image already contains seeds).

WatershedOptions& biasLabel | ( | unsigned int | label,
|  | double | factor
| ) |  |

Bias the cost of the specified region by the given factor.

In certain applications, one region (typically the background) should be preferred in region growing. This is most easily achieved by adjusting the assignment cost for that region as `factor*cost`, with a factor slightly below 1. (Accordingly, factors above 1 would correspond to a discouragement of the bias label.)

Default: don't bias any region.

WatershedOptions& useMethod | ( | Method | method | ) |

Specify the algorithm to be used.

Possible values are `WatershedOptions::RegionGrowing` and `WatershedOptions::UnionFind`. The latter algorithm is fastest but doesn't support seeds and any of the other options.

Default: RegionGrowing.

WatershedOptions& regionGrowing | ( |  | ) |

Use region-growing watershed.

Use this method when you want to specify seeds explicitly (seeded watersheds) or use any of the other options.

Default: true.

WatershedOptions& unionFind | ( |  | ) |

Use union-find watershed.

This is the fasted method, but it doesn't support seeds and any of the other options (they will be silently ignored).

Default: false.

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

- vigra/watersheds.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.1 (Fri May 19 2017)