0
$\begingroup$

I'm a beginner in image processing and I have to create a segmentation algorithm to detect lungs from an image . Image given :

enter image description here

And after removing the noise from the image and applying a threshold the image should look like this : enter image description here

I would like to know if there is a specific approach that is used for lung detection and segmentation .

I subtract the background from the image , then apply the gamma function and then the median filter . Afterwards I perform thresholding

This is my algorithm so far in java with imagej and I need a cleaner result :

            IJ.run(imp2, "Remove Outliers...", "radius=100 threshold=50 which=Dark"); //remove dark noise square
                    IJ.run(imp2, "Gamma...", "value=0.76"); //appply gamma function 
                   IJ.run(imp2, "Subtract Background...", "rolling=2000 light"); //subtract bg 
                   IJ.run(imp2, "Median...", "radius=20"); //Apply median filter 
                   IJ.run(imp2, "Auto Threshold", "method=Li white"); //Li method for thresholding 
                   IJ.run(imp2, "Invert", "");
                 imp2.show(); 

Image after algorithm :

enter image description here

. I would appreciate your help .

$\endgroup$
2
  • $\begingroup$ also remarking it here: the ground truth mask shows signs of being a polygon of few vertices, likely some human defined these points. don't expect to come close to this with simple methods. $\endgroup$ Commented Jan 5, 2022 at 14:29
  • $\begingroup$ For lung detection I see if the object is breathing—- if it is breathing I know there is a lung in it. (Sorry bad joke- couldn’t resist!) $\endgroup$ Commented Jan 6, 2022 at 3:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.