필터 지우기
필터 지우기

How to calculate number of circle detected

조회 수: 3 (최근 30일)
raja gopal
raja gopal 2015년 10월 6일
댓글: Hitesh Kurapati 2015년 12월 4일
i want to know how to calculate the number of detected circle(Red circle)
thank you :)
  댓글 수: 10
raja gopal
raja gopal 2015년 10월 7일
im sorry,still blank here :( i stil new in matlab. can you show example please
Hitesh Kurapati
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
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.

Community Treasure Hunt

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

Start Hunting!

Translated by