Simulilnk, raspberry pi and codegeneration with Image Processing Tools
1 次查看(过去 30 天)
显示 更早的评论
I am doing my master thesis on Simulink with a raspberry pi and its camera. My topic is to determinate the speed limit on streets.
In the matalb function I am using 'imfindcircles' and 'imcrop' to recognize round traffic signs and to crop the image to the ROI.
Does anyone knows a possibility to use the Image Processing Tools with code generation on Simulink?
function [zeile_u,spalte_u,frame] = fcn(PIimage)
frame = PIimage;
pixelL = size(frame,2);
if pixelL>641
rmin=11;
rmax=50;
else
rmin=10;
rmax=20;
end
[centers, radii] = imfindcircles(frame,[rmin rmax]);
if size(centers)~=0
detect = true;
x1 = round(centers(1,1));
y1 = round(centers(1,2));
ra1= round(radii(1,1));
if size(centers)~=1
ra1= round(radii(2,1));
end
else
detect = false;
x1 = centers;
y1 = centers;
ra1= radii;
end
width1=ra1+ra1-1;
height1=ra1+ra1-1;
xmin1=x1-ra1;
ymin1=y1-ra1;
if detect==false
ausl1 = 0;
else
s1 = imcrop(frame, [xmin1 ymin1 width1 height1]);
ausl1 = 1;
end
0 个评论
回答(1 个)
Naman Bhaia
2019-2-25
Hey Mortiz,
Certain Image Processing Toolbox features have been enabled for code generation. Please see the link below for more details.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!