Label circles from imfindcircles

Hello,
I have an image which I use to find circles using imfindcircles. This works fine however I need the index of the centers to be sorted from the bottom left to top right, column wise in the image. The grid is not uniform so I can't just sort the Y coordinates of centers matrix. How should I go about doing this? Thank you in advance.

2 Commenti

KSSV
KSSV il 4 Mag 2021
Attach your code and image..... or the data of center of circles.
The image and the centers are attached. I just use
[centers, radii, metric] = imfindcircles(I,[5 20],'Sensitivity', 0.95);
to find the circles

Accedi per commentare.

Risposte (1)

KSSV
KSSV il 4 Mag 2021
load centers.mat ;
x = centers(:,1) ;
y = centers(:,2) ;
plot(x,y,'.r');
[x1,ii]= sort(x);
y1 = y(ii);
hold on
plot(x1,y1)

Categorie

Scopri di più su Images in Centro assistenza e File Exchange

Richiesto:

il 4 Mag 2021

Risposto:

il 4 Mag 2021

Community Treasure Hunt

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

Start Hunting!

Translated by