MATLAB: How to label each object in an image using 8 conncetivity

connected componentsdigital image processingImage Processing Toolboxlabeling

Image is atteched

Best Answer

Use bwlabel
labeledImage = bwlabel(binaryImage);
Related Question