Simulilnk, raspberry pi and codegeneration with Image Processing Tools
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Naman Bhaia
el 25 de Feb. de 2019
Hey Mortiz,
Certain Image Processing Toolbox features have been enabled for code generation. Please see the link below for more details.
0 comentarios
Ver también
Categorías
Más información sobre Modeling en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!