Segmenting Lungs and nodules in CT images
9 views (last 30 days)
Show older comments
I am new with Image processing in Matlab, I am trying to segment LUNG and nodules from CT image. I have done initial image enhancement.
I try:
d1 = dicomread('000000.dcm');
d1ca = imadjust(d1);
d1nF = wiener2(d1ca);
d1Level = graythresh(d1nF);
d1sBW = im2bw(d1nF,d1Level);
sed = strel('diamon',1);
BWfinal = imerode(d1sBW,sed);
BWfinal = imerode(BWfinal,sed);
BWoutline = bwperim(BWfinal);
Segout = d1nF;
Segout(BWoutline) = 0;
edgePrewitt = edge(d1nF,'prewitt');
But it's not what I am looking for.
Want to segment Lung, Then detect nodules.
Reference question:
Want this part:
Segmented lung region from full CT slice using region growing method
Please help me, Try to answer as simple as possible- I am totally new
3 Comments
Image Analyst
on 18 Jul 2015
Jack, if you look in the help for graythresh(), which generates the value the passes into im2bw(), you'll see that graythresh() uses the Otsu method. It might work okay for this image though for most images Otsu is pretty bad. It works best for images with high contrast and bimodal histograms. Anyway, this post is almost 2 years old and I've posted lung segmentation code here before so I won't bother answering since I'm sure it's not a problem for sunil anymore.
Arslan Hassaan
on 16 Jan 2019
Hi,i am facing the same problem can u give me the code or further guideline?
Answers (0)
See Also
Categories
Find more on Import, Export, and Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!