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 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1729186/image.png)
0 Commenti
Risposte (1)
Matt J
il 7 Lug 2024
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
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!