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!