Segmenting lung nodules from Chest X-ray images
12 次查看(过去 30 天)
显示 更早的评论
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).
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biomedical Imaging 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!