Segmenting lung nodules from Chest X-ray images

12 visualizaciones (últimos 30 días)
Rida Memon
Rida Memon el 30 de Mzo. de 2020
Respondida: Image Analyst el 4 de En. de 2022
This is my code. It is almost accurately segmenting out the lung regions from chest x-ray images. But i need to write a logic that also segments out those blobs only that are candidate nodules. I also have ground truth for the nodule's size and location in the image.
clear; clc; close all;
%% Loading images
Threshold = 36;
raw_x_ray='JPCLN014.png';
I=imread(raw_x_ray);
figure(101);
imshow(I);
colormap(gray);
title('Grayscale X-Ray');
I=wiener2(I, [5 5]);
figure(102);
subplot(2,1,1);
imshow(I);
subplot(2,1,2);
imhist(I, 256);
a_thresh = I >= Threshold; % set this threshold
[labelImage, numberOfBlobs] = bwlabel(a_thresh);
props = regionprops(a_thresh,'all');
sortedSolidity = sort([props.Solidity], 'descend');
SB = sortedSolidity(1);
if SB == 1
binaryImage = a_thresh; figure(103);
imshow(binaryImage); colormap(gray);
The image needs to be flipped first. Nodule's size is 20mm for this image, (569,717) are the coordinates, the nodule is in the right upper lobe (S3) and is malignant (lung cancer diagnosed).

Respuestas (1)

Image Analyst
Image Analyst el 4 de En. de 2022

Categorías

Más información sobre Biomedical Imaging en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by