How do I detect lines in 3D Volume?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (1)
Joaquin Quintana
am 18 Jun. 2021
Bearbeitet: Joaquin Quintana
am 18 Jun. 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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu 3-D Volumetric Image Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!