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

1 次查看(过去 30 天)
I have small white pixel areas in my binary image, how can I extract only those white connected pixel areas and display them individually.

采纳的回答

Image Analyst
Image Analyst 2018-12-14
编辑:Image Analyst 2018-12-14
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Image Processing Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by