I want to extract the skeleton of the image I attached so that I can use it as a mask on that image. A simple threshold does not do it because I need every part of bone region to be filled. This is what I've done so far. With this code there are some parts of the skeleton that are not filled (and should be) and some parts that do not belong to the skeleton that are included in the mask (and should be). Any suggestions?
Thanks in advance.
imgGray = readdicom(imgPath); %a function I made to read the image
imgAdjust = imadjust(imgGray); %, [0 0.2]
BW = imgAdjust > 0.17; %threhold
BW2 = medfilt2(BW, [5 5]);
se = strel('disk',3);
close = imclose(BW2,se);
closeFill = imfill(close,'holes');
src = imgAdjust;
mask=closeFill;
masked = bsxfun(@times, src, cast(mask,class(src)));
imshow(masked)
subplot(131), imshow(src), title('Original');
subplot(132), imshow(mask), title('Mask');
subplot(133), imshow(masked), title('Masked');

 채택된 답변

Image Analyst
Image Analyst 2020년 11월 1일

0 개 추천

If there is no signal there, then of course it won't be found so there's nothing you can do unless you want to "invent" data by doing edge linking or interpolation or something. You could try adapthisteq() or adaptthresh() but for that image, I think a low global threshold should be best. Again, if the signal is zero, there is no signal there and it shouldn't find anything.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

제품

릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by