Effacer les filtres
Effacer les filtres

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

9 vues (au cours des 30 derniers jours)
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)

Réponses (1)

Matt J
Matt J le 7 Juil 2024 à 19:51
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

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by