Connected-component labeling

Connected-component labeling with 8-connectivity.

You are now following this Submission

This function is partly based on the two-pass algorithm, described here:

http://en.wikipedia.org/wiki/Connected-component_labeling

I did not make use of the disjoint data set structure (at least that I am aware of) to connect the linked labels.

The same functionality is available in the image processing toolbox as the function bwlabel, but this function can be useful for those who want to study the implementation of the algorithm, or those who do not have access to the toolbox.

Cite As

André Ødegårdstuen (2026). Connected-component labeling (https://in.mathworks.com/matlabcentral/fileexchange/45480-connected-component-labeling), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0