L = labelmatrix(CC)
| Parameter | Description |
|---|---|
| CC | Connected-component structure returned by bwconncomp. |
| Parameter | Description |
|---|---|
| L | Label matrix with one positive label per component. |
Create label matrix from connected components.
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');
| Version | Description |
|---|---|
| 2.0.0 | initial version |