viscircles and imfindcircles problem

1 visualizzazione (ultimi 30 giorni)
elena rondina
elena rondina il 8 Feb 2016
Risposto: Shruti Sapre il 10 Feb 2016
hi i'm new in matlab...i have a problem with viscircles function...i have seen the viscircles documentation but if i do the example in the sites the output image is a white background with 5 circles. the cose is:
if A = imread('coins.png');
[centers, radii, metric] = imfindcircles(A,[15 30]);
centersStrong5 = centers(1:5,:);
radiiStrong5 = radii(1:5);
metricStrong5 = metric(1:5);
viscircles(centersStrong5, radiiStrong5,'EdgeColor','b');
why the background is white?where is the image?if there is a function that find the circle in the matlab doucumenation(imfindcircles) why i can use also hough transform to detect circles?

Risposte (1)

Shruti Sapre
Shruti Sapre il 10 Feb 2016
Hi Elena,
In order to see the image, you would need to add imshow(A) after "imread"
A = imread('coins.png');
imshow(A)
Could you elaborate a little more on your next question?
-Shruti

Community Treasure Hunt

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

Start Hunting!

Translated by