How do I detect lines in 3D Volume?

10 visualizzazioni (ultimi 30 giorni)
Harry Andrews
Harry Andrews il 10 Giu 2021
Modificato: Joaquin Quintana il 18 Giu 2021
Hi,
I'm trying to find a method to detect these lines (lung fissures) within a 3D volume. This is an image mask created after a Hessian Matrix analysis (so i have eigen values and vectors, as well as the original CT volume). There's so much noise and I'm not sure what path to take!
Any ideas?
Thanks.

Risposte (1)

Joaquin Quintana
Joaquin Quintana il 18 Giu 2021
Modificato: Joaquin Quintana il 18 Giu 2021
Hello -I pulled the image you have here and used regionprops to find the lines you have pointed out. I was unsure if it was just the two highlighted lines or you wanted others as well so I just worked on the two explicitly pointed out.
I see you want to do this on volume data and this can be done using regionprops3and a similar method but it will be slightly different and may need some adjustments. If you are going to try and batch process volume data, I would use other parameters which are unique to the fissure lines to improve the segmentation (see regionprops3 properties). Here I simply used the area property but could have used the MajorAxisLength as well to make it more robust.
Identified lines
Identified lines overlaid original image
Code used:
%read image
img = imread('image.png');
%convert RGB image to grayscale then to binary and invert
BW_invert = ~imbinarize(rgb2gray(img));
%erode binary image
se = strel('line',2,90);
erodedBW = imerode(BW_invert,se);
imshow(erodedBW);
%find connected components
cc = bwconncomp(erodedBW);
%get stats from regionprops
stats = regionprops(cc,'Area');
%keep only indexes with areas which are related to lines of interest
idx = find( ([stats.Area] > 119) & ([stats.Area] < 150) );
%use ismember to keep the indexes which are related to the lines
lines = ismember(labelmatrix(cc),idx);
%dilate data back to orignal size
lines = imdilate(lines,se);
%show line alone
imshow(lines)
%show lines overlaid orginal image
imshowpair(lines,img)
Hope it helps.

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by