フィルターのクリア

imfindcircles doesn't work

7 ビュー (過去 30 日間)
Michael
Michael 2012 年 11 月 6 日
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

回答 (3 件)

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

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

Michael
Michael 2012 年 11 月 7 日
編集済み: Image Analyst 2012 年 11 月 7 日
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 件のコメント
Image Analyst
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!

Translated by