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

조회 수: 2 (최근 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