I want to detect and determine the spheres' diameter and also the sphere inside.

4 次查看(过去 30 天)

回答(1 个)

Shivam Lahoti
Shivam Lahoti 2023-11-3
Hi CHESSADAKORN,
As per my understanding, you wish to detect the spheres and measure their diameter; you also want to determine the spheres inside the big sphere.
MATLAB has its own Image Processing Toolbox. Various workarounds are in place to detect circles in an image.
As in the above documentation, you shall understand the way to use imfindcircles function and set a sensitivity according to your needs to detect the circles. Below is a code snippet for your reference.
[centers,radii] = imfindcircles(rgb,[20 25],"ObjectPolarity","dark", ...
"Sensitivity",0.9)
Running this will fetch you the centers and radii of the detected spheres.
You shall refer to this documentation to learn in detail about the function.
I hope this helps.
Regards,
Shivam Lahoti.

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by