Segmentation shoulder X-ray image

I have humeral of shoulder x-ray image. I have segmented the original image to image segmentation as shown below by image segmenter matlab app.But I want segment like it automatically.
is there anyone can help me to segment the humeral only without background automatically?
00701447 NORCI.jpg to Picture1.jpg

댓글 수: 1

Rik
Rik 2019년 11월 25일
What steps did you use in the segmenter app? That is probably a strategy that would work if you can automate the user interaction.

댓글을 달려면 로그인하십시오.

답변 (3개)

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2019년 11월 29일

1 개 추천

Ok, here is the solution, following the ideas I had previously described. I downloaded your edges so it may not be exaclty the same as yours, I called that boneSegments:
boneSegments.jpg
Then I followed these steps
% label so that each segment can be identified
boneSegments_Lab = bwlabel(boneSegments);
% obtain the size of each segment
boneSegments_props = regionprops(boneSegments_Lab,'area');
% discard all those segments that are smaller than 200
contourBones = ismember(boneSegments_Lab,find([boneSegments_props.Area]>200));
% As the area is open in the bottom, add one line to create a closed region
contourBones(end,:) =1;
% clean by a) morphological closing to connect regions, b) thinning to keep a skeleton,
% c) removing spurious edges (the top)
contourBones_clean = bwmorph(bwmorph(imclose(contourBones,ones(3)),'thin','inf'),'spur',15);
% this can then be filled
fillBones = imfill(contourBones_clean,'holes');
% Display
imagesc(fillBones)
fillBones.jpg
Problem solved. Hope that helps.
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2019년 11월 25일

0 개 추천

Not trivial as the intensity is high on the top and right side of the image. Otherwise a thresholding after low pass filtering could be applied. Have you tried detecting edges with canny?
https://uk.mathworks.com/help/images/ref/edge.html?searchHighlight=edge&s_tid=doc_srchtitle

댓글 수: 6

Nurul Maulidiyah
Nurul Maulidiyah 2019년 11월 26일
Yes, I have tried detecting edges with canny. but, I get many edges, the result as shown below.
untitled.jpg
actually I just need the edge of this image automatically
Picture1.jpg
Image Analyst
Image Analyst 2019년 11월 26일
How did you get that Canny image? The edge function does not produce an image like that. Can't you just take the largest blobs (assuming that the contour is closed) and call imfill()?
Nurul Maulidiyah
Nurul Maulidiyah 2019년 11월 28일
How to take he largest blobs (assuming that the contour is closed) and call imfill()?
If the contour is closed, then it is rather easy, but in this case, the contour is not closed. The sequence below would work without the contour being closed.
Image Analyst
Image Analyst 2019년 11월 28일
That edge detection is actually not bad. You can use bwareafilt() to keep only the longer segments, then close it with an edge-linking algorithm. There aren't any in MATLAB yet, but I'm working on one (it's not finished yet). Then call imfill(mask, 'holes').
Image Analyst
Image Analyst 2020년 1월 23일
OK, I think it's finished now. It's attached. edge_linking_points lets you click points on graph and then connects them, while edge_linking_image does it with an edge filtered image (as shown in the figure below). There are several options, like how close the endpoints need to be, and if you want to connect only one other point to an endpoint, or ALL others that are closer than some specified distance.
00_Screenshot.png

댓글을 달려면 로그인하십시오.

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2019년 11월 26일

0 개 추천

Ok, this is a good start, try the following, assuming that your image is a
b = edge(a,'Canny',[],3);
So what you showed was b. Then do
c = bwlabel(b);
d = regionprops(c,'area');
That should label all the edges and then get their length. Then you should be able to discard all the small edges by using ismember based on the regionprops.
Once you have only one or two, which are the boundary of the bone, then you can use cumsum along the horizontal dimension so that each line will be something like this
0 0 0 0 0 ... 1 1 1 1 1 1 ... 2 2 2 2
where 0 is the left side before the first edge, the 1 is the central region and the 2 is the right side after the second edge. Then select the region == 1 and you should have the bone region.

질문:

2019년 11월 25일

댓글:

2020년 1월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by