I want to detect and determine the spheres' diameter and also the sphere inside.
6 views (last 30 days)
Show older comments

0 Comments
Answers (1)
Shivam Lahoti
on 3 Nov 2023
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.
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!