how to change the color of lung portion only from binary image?

1 回表示 (過去 30 日間)
fatima
fatima 2019 年 2 月 18 日
回答済み: Image Analyst 2019 年 2 月 18 日

回答 (1 件)

Image Analyst
Image Analyst 2019 年 2 月 18 日
Invert the lousy image you have (that is if you don't want to improve the segmentation), call imerode(), call imclearborder, call bwareafilt() to take the two largest remaining blobs. Here's a start
se = strel('disk', 0, 50); % Adjust 50 as necessary
mask = imerode(~mask, se);
mask = imclearborder(mask);
mask = bwareafilt(mask, 2);
mask = imdilate(mask, se);
imoverlay(.........
See if you can finish it.

Community Treasure Hunt

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

Start Hunting!

Translated by