how to label circles found by "imfindcircles".

i found many circles on a image using imfindcircles. therefore, i have the coordinates of the centres of all circles i a two-column vector. they are sorted by their circle strenghts (found in another vector called metric).
now i would like to label every circle on my image. the labelling should state the circle strenght.
can anyone help?

 Accepted Answer

viscircles(centersBright1, radiiBright1,'LineStyle','--', 'LineWidth',1.5);
%Label metric
for k = 1:length(metricBright1)
metricB1_string = sprintf('%2.2f',metricBright1(k));
text(centersBright1(k,1),centersBright1(k,2),metricB1_string,'color','y','HorizontalAlignment', 'center','VerticalAlignment', 'middle');
end

More Answers (0)

Community Treasure Hunt

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

Start Hunting!