how to label each object in an image using 8 conncetivity
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
john karli
el 3 de Mzo. de 2019
Comentada: john karli
el 3 de Mzo. de 2019
Image is atteched
0 comentarios
Respuesta aceptada
Image Analyst
el 3 de Mzo. de 2019
Use bwlabel
labeledImage = bwlabel(binaryImage);
3 comentarios
Image Analyst
el 3 de Mzo. de 2019
Try this:
% Let's assign each blob a different color to visually show the user the distinct blobs.
coloredLabels = label2rgb (labeledImage, 'hsv', 'k', 'shuffle'); % pseudo random color labels
% coloredLabels is an RGB image. We could have applied a colormap instead (but only with R2014b and later)
imshow(coloredLabels);
axis image; % Make sure image is not artificially stretched because of screen's aspect ratio.
caption = sprintf('Pseudo colored labels, from label2rgb().\nBlobs are numbered from top to bottom, then from left to right.');
title(caption, 'FontSize', 12);
Más respuestas (0)
Ver también
Categorías
Más información sobre Image and Video Ground Truth Labeling en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!