imfindcircles in MATLAB Function Block

조회 수: 3 (최근 30일)
Ayush Sinha
Ayush Sinha 2021년 6월 11일
편집: Ayush Sinha 2021년 6월 11일
Im trying to implement a MATLAB function in Simulink which takes a RGB image (120*160*3) and outputs a logical '1' if a circle is detected.
CODE
function y = fcn(I)
img = I ;
cDetect = false ;
img = rgb2gray(img);
img = edge(img);
radii = [] ;
centers = [] ;
[centers, radii] = imfindcircles(img,[10 60],'Sensitivity', 0.8,'EdgeThreshold',0.5);
if(~isempty(radii))
cDetect = true ;
end
y = cDetect ;
But I keep getting an error in the imfindcircles part, But when I implement the same code purely in MATLAB, It works.
Here is the diagnostic part.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by