Tool Connected Component Labeling
The tool allows one to label subsets of connected components with a unique identifier. Connected component labeling (CCL) is an operator which turns a binary image into a symbolic image in which the label assigned to each pixel is an integer uniquely identifiying the connected component to which that pixel belongs (Shapiro 1996).
The tool takes a grid as input and treats it as a binary image. The foreground is defined by all cell values greater than zero, the background by NoData cells and all cell values less than one. Connectivity can be determined by analysing either a 4-connected or a 8-connected neighborhood.
References
- Shapiro, L.G. (1996): Connected Component Labeling and Adjacency Graph Construction. Machine Intelligence and Pattern Recognition, Vol. 19, p.1-30. Link.
- Author: V. Wichmann (c) 2021
- Menu: Imagery|Segmentation
Parameters
| Name | Type | Identifier | Description | Constraints |
Input | Input | Grid, input | INPUT | Grid to analyse. | - |
Output | Output | Grid, output | OUTPUT | Output grid with labeled components. | - |
Options | Grid System | Grid system | PARAMETERS_GRID_SYSTEM | - | - |
Neighbourhood | Choice | NEIGHBOUR | - | Available Choices: [0] 4 (von Neumann) [1] 8 (Moore) Default: 1 |
Command-line
Usage: saga_cmd imagery_segmentation 5 [-INPUT <str>] [-OUTPUT <str>] [-NEIGHBOUR <str>]
-INPUT:<str> Input
Grid, input
-OUTPUT:<str> Output
Grid, output
-NEIGHBOUR:<str> Neighbourhood
Choice
Available Choices:
[0] 4 (von Neumann)
[1] 8 (Moore)
Default: 1