viscircles and imfindcircles problem

1 次查看(过去 30 天)
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?

回答(1 个)

Shruti Sapre
Shruti Sapre 2016-2-10
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