labelmatrix
Create label matrix from connected components.
📝Syntax
L = labelmatrix(CC)
📥Input Arguments
Parameter Description
CC Connected-component structure returned by bwconncomp.
📤Output Arguments
Parameter Description
L Label matrix with one positive label per component.
📄Description

Create label matrix from connected components.

💡Examples
Display connected component labels
BW=false(64,64); BW(8:20,8:20)=true; BW(36:52,32:48)=true;
CC=bwconncomp(BW);
L=labelmatrix(CC);
figure; imagesc(L); title('Label matrix');
Example illustration
🔗See Also
bwconncompbwlabelregionprops
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub