How can I detect the number of circles on the picture on MATLAB?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
dots.png
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168951/image.png)
While executing the following code, there are several errors, and I hope to hear advice to fix it.
A = imread('dots.png');
imshow(A)
Rmin = 0;
Rmax = 600;
[centersDark, radiiDark] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','dark');
viscircles(centersDark, radiiDark ,'Color','w');
errors
Error using imfindcircles>parseInputs (line 240)
The value of 'RadiusRange' is invalid. Expected input number 2, RADIUS_RANGE, to be positive.
Error in imfindcircles (line 142)
parsedInputs = parseInputs(varargin{:});
Error in trial1_16 (line 8)
[centersDark, radiiDark] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','dark');
0 Kommentare
Akzeptierte Antwort
michio
am 16 Jan. 2018
As the error message states that "The value of 'RadiusRange' is invalid. Expected input number 2, RADIUS_RANGE, to be positive.", the range have to be a set of positive integers.
Could you try
Rmin = 1;
instead of 0?
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu オブジェクト解析 finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!