How do I extract the left and right lung regions from a CT Scan image

6 views (last 30 days)
Hello, I've been trying to extract the left and right lung regions from this image using region labeling and various edge detection methods. The touble is that I am completely new to matlab and programming and have been completely unnsucessful. Any help would be greatly appreciated.
Thank you

Accepted Answer

Sumit Tandon
Sumit Tandon on 10 Aug 2012
Edited: Sumit Tandon on 10 Aug 2012
There can be several approaches. How about something like this. You can try different values for thresholding, etc and look at the documentation of the functions to see what exactly they are doing.
%%Read image
img = imread('11w3uds.jpg');
%%Crop out unnecessary parts
cropped = img(90:400,40:460);
%%Threshold to isolate lung tissue
thresholded = cropped < 86;
%%Remove artifacts attached to border
clearThresh = imclearborder(thresholded);
%%Remove objects less than 40 pixels in size
imgBigTissue = bwareaopen(clearThresh,100);
imshow(imgBigTissue)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!