Borrar filtros
Borrar filtros

How can i separate all the connected regions in a binary image and display them individually.

3 visualizaciones (últimos 30 días)
I have small white pixel areas in my binary image, how can I extract only those white connected pixel areas and display them individually.

Respuesta aceptada

Image Analyst
Image Analyst el 14 de Dic. de 2018
Editada: Image Analyst el 14 de Dic. de 2018
Use bwlabel() and ismember
[labeledImage, numRegions] = bwlabel(binaryImage);
props = regionprops(labeledImage, 'Area')
% Compute all the areas.
allAreas = [props.Area]
% Display each blob in its own figure.
for k = 1 : numRegions
thisRegion = ismember(labeledImage, k);
figure;
imshow(thisRegion);
drawnow;
end

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by