How to calculate number of circle detected
3 ビュー (過去 30 日間)
古いコメントを表示
i want to know how to calculate the number of detected circle(Red circle)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149790/image.jpeg)
thank you :)
10 件のコメント
Hitesh Kurapati
2015 年 12 月 4 日
how can i get number of circles in a image using viscircles() command? Help me. Thanks in advance.
回答 (1 件)
Walter Roberson
2015 年 10 月 7 日
.... you have a loop going on ...
.... you find some circles, and their coordinates are in X and Y and size in R)
%draw the circles
centers = [X(:), Y(:)];
viscircles(centers, R);
.... end of loop
would become
number_of_circles = 0;
.... you have a loop going on ...
.... you find some circles, and their coordinates are in X and Y and size in R)
%draw the circles
centers = [X(:), Y(:)];
viscircles(centers, R)
number_of_circles = number_of_circles + length(centers);
.... end of loop
That is, every time you draw a series of circles on the plot, add the number of circles just drawn to the running total.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!