MATLAB: How to segment Lung tissue from CT Image

Image Processing Toolboximage segmentationlung

Hello,
I've been looking for a good algorithm to segment lungs from CT images. I have a serie of CT images (DICOM) from a phantom and I only want to segment the lung tissue. So far I've tried the "activecontour" function with the Chan-Vese algorithm (which is the default of the function), but it doesn't work really well: this function segments structures that aren't related to the lungs. When I've applied the function to a JPEG image, though, it worked. I don't know what to do; I'm new on MatLab and it's supposed to be a simple problem because I don't want to segment any structure, only the contour of the lungs.
Please, contact me if you can help me. I've tried many different algorithms and could not find a good one.

Best Answer

I'd try thresholding. Then call imclearborder() to get rid of any light stuff that touches the border. Then take the largest blob with bwareafilt(). If the area is not big enough, then take the biggest two blobs.
Related Question