viscircles function generates an error message
조회 수: 6 (최근 30일)
이전 댓글 표시
When I run the following code, the circles are detected but viscircles generates an error.
clear;
close all;
myImage = imread("washers.png");
G = im2gray(myImage);
fig1 = figure(1);
imshow(myImage);
[centers, radii] = imfindcircles(myImage, [10 150], 'ObjectPolarity', 'bright');
h = viscircles(centers, radii, Color='b');
Error Message -
Error using line
Too many input arguments.
Error in viscircles (line 43)
line(x,y,'Parent',h, ...
Error in ImageCircle (line 11)
h=viscircles(centers, radii,Color='b');
댓글 수: 0
답변 (1개)
Steven Lord
2024년 7월 3일
I'm guessing you've created your own line.m that's taking precedence over the line function that is part of MATLAB. To check this, show what this command displays:
which -all line
If you see your own line.m, rename it.
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
