List of my modules...
Script Module: Watershed_Segmentation
Description:
Binarises the image using the watershed on the image gradient. The idea is to perform a separation at the inflection points between the two phases.
The process first defines points of the two regions to separate, through a rough segmentation and possible erosions (called back-off in this module), leaving undefined points to define the subregion in which the separation will be determined. Secondly it defines a topography for the watershed process by performing a gradient on the image, either with a Gaussian blurring through the use of the Deriche filter, or without it, by computing the Euclidean norm of the spline gradient with the Gradient module.
Illustration of the process. Top row, left: image to segment, center: rough segmentation for the dark region, right: rough segmentation for the light outer region. This initial marker for the outer region is not acceptable, most importantly because a few pixels inside the dark region are segmented. For this reason, there is a back-off option which simply erodes this set of points by a given radius to back off from the separation region. At the same time it removes these spurious points. The result of this process, overlapped with the original image and the marker for the dark region is shown on the left on the bottom row. Next to it is the topography for the watershed, generated with a Deriche filter, and finally the bottom right is the result.
Connections:
data
[required]
The input image, of type HxUniformScalarField3.
Ports:
Thr_low

Threshold below which pixels are set to the background.
Thr_high

Threshold above which pixels are set to the object.
Back_Off_low

An erosion with a structuring element in the shape of a ball of this given radius in pixels is applied to the preselected background pixels.
Back_Off_high

Same thing for the object pixels.
Options

The first option defines whether or not a Gaussian filter is applied before deriving the image, i.e. whether a Deriche filter will be used.
The second options is used in case the result is unexpected. It does not remove, at the end of the process, the priority map and seeds image used as inputs to the Watershed module, at the core of this script module. In that way, the user can understand why it gave the result it did.
Sigma

Halfwidth of the Gaussian.
Compute

Push this button to start the computation.
Commands: