Effacer les filtres
Effacer les filtres

Simulilnk, raspberry pi and codegeneration with Image Processing Tools

1 vue (au cours des 30 derniers jours)
Moritz Köhler
Moritz Köhler le 12 Fév 2019
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
testbench.PNG

Réponses (1)

Naman Bhaia
Naman Bhaia le 25 Fév 2019
Hey Mortiz,
Certain Image Processing Toolbox features have been enabled for code generation. Please see the link below for more details.

Catégories

En savoir plus sur Raspberry Pi Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by