Fill a gap on an image surface
이전 댓글 표시
Hello,
I have an image as follows:

I am using activecontour to detect the edges of the bone.
function [bw] = segmentBone(imageFile)
%Function for segmenting the bone from the background
imageFile = imageFile(:,:,1);
mask_width = 1;
border_width = 2;
imageFile = padarray(imageFile, [border_width, border_width], 0);
mask = zeros(size(imageFile));
mask(mask_width:end-mask_width,mask_width:end-mask_width) = 1;
small_image_itter = 651;
bw = activecontour(imageFile, mask, small_image_itter, 'Chan-Vese', 'SmoothFactor', 0.95);
end
This is the result I get:

The issue is that crack in the middle of the bone. I want to flatten it, so that the lower surface looks smooth. This is an example of what I want to achieve:

It is really important that the boundaries of the bone stay the same and do not get thicker!
Any ideas on how to solve this task?
Thanks in advance!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
