How do I detect lines in 3D Volume?
조회 수: 10 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Joaquin Quintana
2021년 6월 18일
편집: Joaquin Quintana
2021년 6월 18일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!