imfindcircles in MATLAB Function Block

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 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Support Package for USB Webcams についてさらに検索

製品

リリース

R2019a

質問済み:

2021 年 6 月 11 日

編集済み:

2021 年 6 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by