How to discover intersecting circles
Afficher commentaires plus anciens
I have two types of intersecting circles in images, created by the Matlab imfindcircles function, which returns a matrix of centroid (x, y) and a vector with the radii of the circles (r):
1- Concentric circles;
2 - Circles intersecting.
I need to identify all of these cases and apply two functions to treat these intersections, one for case 1 (function1) and one for case 2 (function2). These functions will have as parameters a matrix containing the centroides and the radii of the circles in each case. I just need a program that reports the parameters of the two functions and when to call one or the other.

Réponse acceptée
Plus de réponses (1)
KSSV
le 19 Août 2020
- You have center C and Radius R of circles. You can form the coordinates i.e (x,y) points of circle using:
m = 500 ;
th = linspace(0,2*pi,m) ;
x = C(1)+R*cos(th) ;
y = C(2)+R*sin(th) ;
2. You can get the point of intersections using Interx: https://www.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections
3. You can find whether a circle is lying inside other circle using inpolygon.
4. You can get the nearest points to a given point using knnsearch.
Catégories
En savoir plus sur Neighborhood and Block Processing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
