SAGA-GIS Tool Library Documentation (v8.5.1)

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


Parameters

 NameTypeIdentifierDescriptionConstraints
InputInputGrid, inputINPUTGrid to analyse.-
OutputOutputGrid, outputOUTPUTOutput grid with labeled components.-
OptionsGrid SystemGrid systemPARAMETERS_GRID_SYSTEM--
NeighbourhoodChoiceNEIGHBOUR-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