### Segmenter

The Segmenter is a component build as wizard interface and implements methods to segment a raster. Image segmentation covers techniques for splitting one image into its components as homogeneous regions.

Input:

- One Raster,
- A vector of bands indices used to perform segmentation.

Output:

- One Raster with a single band, where the pixel value stands for the index of the region to which it belongs.

The available methods in Terralib are:

- Region Growing: Creates regions by merging similar neighboring pixels. To reduce processing time, the raster is divided into pieces, and such pieces are segmented individually.

- Based on Baatz and Shape: Creates regions by merging similar neighboring pixels. The resultant regions must fit a predefined scale and compactness, provided by the user.

It is accessible through:
Layer Explorer > Right Click over a Layer-name > Raster Processing > Segmenter... (applies on selected layer)
Raster Processing > Segmenter... (list of all layers will be available)
This wizard consists of the following steps:

#### Wizard Page 1 - Selection of the layer with the desired raster (Layer Search).

NOTE: This page will only appear if the user has accessed the segmenter operation from the menu "Raster Processing".

#### Wizard Page 2 - The segmenter interface.

To execute this operation is required the following steps:

1. Select the type of segmenter to be used and set specific parameters (the parameters will vary depending on the selected contrast type).
2. Select the input bands to be used in segmenter operation.
3. Preview (through the Check button).

#### Wizard Page 3 - The segmenter advanced parameters interface.

- Block options:

- Enable block processing: If checked, the original raster will be splitted into small blocks, each one will be segmented independently and the result will be merged (if possible) at the end.
- Enable block merging: If checked, a block merging procedure will be performed

- Thread options:

- Maximum block size: The input image will be split into blocks with this width for processing, this parameter tells the maximum block lateral size (width or height). The default behavior, the size will be defined following the current system resources and physical processors number.
- Maximum threads number: The maximum number of concurrent threads. The default behavior is: automatically found.

#### Wizard Page 4 - Output information (Output Raster Information).

The result of this operation is shown in the figure below.