필터 지우기
필터 지우기

I have been working on 3D imaging in the form of pixels with spheres in a box and need help in finding out the contact points in between the spheres in the produced pixel data

조회 수: 1 (최근 30일)
I have tried finding the exact point by 1st extracting the 2 object from data set of 161*161*105 unit8 in volumesegmenter and then used edge command to observe onle the boundary.I want to know how can I exactract exact contact point between 2 spheres by searching in 105 slices and without using the voxel command to get the co-ordinates.
Here is my code:
%% joining bd1,bd2,bd3,bd4
A=cat(3,Bd1, Bd2,Bd3,Bd4);
B=cat(3,L1,L2,L3,L4);
%% for extracting 2 spheres
T=table(A,B);
P=(T.B=="sphere8");
Q=(T.B=="sphere7");
R=P+Q;
%% visualization of 2 joined spheres
volumeSegmenter(R)
%% making the only edge visible for inspection
SS=edge3(R,"approxcanny",0.5);
SS1=im2double(SS);
volumeSegmenter(SS1)

답변 (1개)

Matt J
Matt J 2024년 7월 7일
This assumes SS contains the edge map of the two spheres and nothing else.
L=bwlabel( imfill(SS~=0,'holes') );
se=ones(3);
result = imdilate(L==1,se)&imdilate(L==2,se); %The contact points as a logical map

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by