imfindcircles doesn't work

5 views (last 30 days)
Michael
Michael on 6 Nov 2012
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

Answers (3)

Sven
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?

Image Analyst
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.

Michael
Michael on 7 Nov 2012
Edited: Image Analyst on 7 Nov 2012
Hi,
Thanks for the response.
This is what it shows me:
MATLAB Version 7.12.0.635 (R2011a)
MATLAB License Number: ••••••
Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
Java VM Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
imfindcircles' not found.
Thanks.
  1 Comment
Image Analyst
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!