imfindcircles doesn't work
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(3 个)
Sven
2012-11-6
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 个评论
Image Analyst
2012-11-6
Type
>> ver
and
>> which -all imfindcircles
and tell us what it says. Chances are you haven't upgraded your MATLAB since 2011.
0 个评论
Michael
2012-11-7
编辑:Image Analyst
2012-11-7
1 个评论
Image Analyst
2012-11-7
编辑:Image Analyst
2012-11-7
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!