imfindcircles doesn't work
5 views (last 30 days)
Show older comments
I'm trying to activate this function but i'm getting the same error over and over:
??? Undefined function or method 'imfindcircles' for input arguments of type 'double'.
This is what I wrote:
clear;
clc;
%Read the Image file
%-------------------------------------
[Fname,Fdir]=uigetfile('*.png','');%Open standard dialog box for retrieving files.
FullPath = strcat(Fdir, Fname);%Connect between the two sdtrings.
im = imread(FullPath);%Read the image.
figure;imshow(im);title('Original Image');
Rmin = 30;
Rmax = 65;
im = double(im);
gray_im =rgb2gray(im);
[centersBright, radiiBright] = imfindcircles(gray_im,[Rmin Rmax],'ObjectPolarity','bright');
[centersDark, radiiDark] = imfindcircles(im,[Rmin Rmax],'ObjectPolarity','dark');
viscircles(centersBright, radiiBright,'EdgeColor','b');
viscircles(centersDark, radiiDark,'LineStyle','--');
Thanks, Michael
0 Comments
Answers (3)
Sven
on 6 Nov 2012
imfindcircles is part of the image processing toolbox, I think it came into that toolbox in MATLAB version 2012a.
Do you have the toolbox and is your version later than 2012a?
0 Comments
Image Analyst
on 6 Nov 2012
Type
>> ver
and
>> which -all imfindcircles
and tell us what it says. Chances are you haven't upgraded your MATLAB since 2011.
0 Comments
Michael
on 7 Nov 2012
Edited: Image Analyst
on 7 Nov 2012
1 Comment
Image Analyst
on 7 Nov 2012
Edited: Image Analyst
on 7 Nov 2012
Not only don't you have R2012a or later, but you don't even have the Image Processing Toolbox or any toolboxes for that matter. You need the Image Processing Toolbox to get imfindcircles(). So, are you going to upgrade? You should, assuming you're current on your maintenance contract.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!