How can i separate all the connected regions in a binary image and display them individually.
조회 수: 2 (최근 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
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!