Removing a portion from a single volume

조회 수: 7 (최근 30일)
Hege
Hege 2020년 12월 8일
댓글: Tim 2020년 12월 10일
I have a 3D skeletonized Image(skel2) and it is a single volume. it is a fibrous structure and I want to remove the portion in the red coloured area. Just only that blob.But it is a single volume because that blob is the same material of other material and it is a part of the volume.regionprops3() also says that it is a single volume.This skel2 is a 3d array(522x366x490 logical array).I know bwareaopen() can be used to remove separeated volumes.But It does not work this as I want to remove the blob which is already connected to the single volume.Appreciate your advices/comments.

답변 (1개)

Tim
Tim 2020년 12월 9일
편집: Tim 2020년 12월 9일
The fiberous portions would probably disappear, leaving the blob as a residual if you use an erosion operator, becauses they are much narrower (it looks from the figure, anyway). Try using something like:
% example volume
data = zeros(522, 366, 490);
% Add some fibers that are interconnected
data(100, 100, :) = 1;
data(:, 100, 50) = 1;
data(100, :, 30) = 1;
% Now add a blob
data(100-10:100+10, 100-10:100+10, 30-10:30+10) = 1;
% Get rid of fibers using errosion
w = 3; % set erosion width here
edata = imerode(data, ones(w, w, w)); % Erode to get rid of fibers
volshow(data); % Original
figure;
volshow(edata); % Blob is left over
You can play with erosion width w to figure out the appropriate size to get rid of the fibers but leave enough of the blob behind to determine its location
  댓글 수: 6
Hege
Hege 2020년 12월 10일
@Tim, Thank you very much for the reply. I really appreciate it. I thought and checked it. But I wonder how we can threshold a binary image and how the locations(x,y,z) dimensions of fibres are changed.(Locations of the x,y,z dimensions are important to me.It is fine if there is a slight change but not a considerable change).
However, your other idea was really nice. but I wonder how I detect the high density volume in the binray image. if I can detect the high density volume and convalute by a mask, that would be great.
Another idea which was in my mind is to detect the joint points of the fibres and break it from the joint points. then we can remove the short fibres(bwareaopen()) as the blob contains short fibers. But I am thinking how to idenfy the joint points(joints points-where the fibres meet each others).
Appreciate your comments and really thankful for your valuable time!
Tim
Tim 2020년 12월 10일
The processes above are meant to generate binary masks to encapsulate the region of interest (the blob) in the original image. Neither of them should change xyz feature locations if they are being applied as intended. Regarding convolution: I suggest making some 3D kernel, convolving, then empirically determining the threshold value you need by making a binary mask using the > operation and a threshold and visualizing the result using volshow.There's a bunch of ways to tackle your problem, you may not find these approaches effective but there are plenty of other ways and you may have to be creative

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

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by