Road Sign Recognition Project

advertisement
Signals, Instruments and Systems – Project
Road sign recognition
with the e-puck
Kim Ehrensperger & Alain Fuglister - SIE - BA VI
06-10-2011
SIS Project: Road sign recognition with the e-puck
Road Signs
Positive signs
Negative signs
SIS Project: Road sign recognition with the e-puck
Recognition Algorithm
Picture [1600]
Vectors operations
Mean rows [40]
Mean columns [40]
Boolean conditions
Mean Picture [1]
Low ambient light
Case 1
Recognition
Normalized
mean rows [40]
Normalized
mean columns [40]
Sensibility parameter
s
Reaction behaviour
Boolean
Conditions
Horizontal or
Vertical
Case 2
Swiss cross
Case 3
Fail
Case 4
This flowchart represents the
different steps implemented
SIS Project: Road sign recognition with the e-puck
Vectors operations
Mean rows [40]
Mean columns [40]
k=0;
for (i=0; i<40; i++) {
mean_rows[k] = 0;
for (j=0; j<1600; j=j+40) {
h=i+j;
buf = (unsigned int)(unsigned char) pic[h];
mean_rows[k] = mean_rows[k] + buf;
}
mean_rows[k] = mean_rows[k]/40;
k=k+1;
}
k=0;
for (i=0; i<1600; i=i+40) {
mean_cols[k] = 0;
for (j=0; j<40; j++) {
h=i+j;
buf = (unsigned int)(unsigned char) pic[h];
mean_cols[k] = mean_cols[k] + buf;
}
mean_cols[k] = mean_cols[k]/40;
k=k+1;
}
Mean Picture [1]
Normalized
mean rows [40]
for (i=0; i<1600; i++) {
mean_pic = mean_pic + (unsigned int)(unsigned char)pic[i];
}
mean_pic = mean_pic/1600;
Normalized
mean columns [40]
for (i=0; i<40; i++) {
norm_rows[i] = mean_rows[i] / mean_pic;
norm_cols[i] = mean_cols[i] / mean_pic;
}
SIS Project: Road sign recognition with the e-puck
Boolean conditions, Recognition and
Sensibility parameter
Boolean
Conditions
sensi=0.25;
if (mean_pic<40)
sensi=0.1;
for (i=0; i<40; i++) {
if (norm_rows[i]<(1-sensi) || norm_rows[i]>(1+sensi))
hori = 1;
else if (norm_cols[i]<(1-sensi) || norm_cols[i]>(1+sensi))
vert = 1;
}
Low ambient light
Horizontal or
Vertical
cross = hori+vert == 2;
Swiss cross
crash = hori+vert ==0;
Fail
s
SIS Project: Road sign recognition with the e-puck
Reaction behaviours examples
Wait function used to make the
LEDs blink
Horizontal or vertical
void wait(unsigned long long int num) {
unsigned long long int i;
for(i=0; i<num; i++)
__asm__ volatile("nop");
}
Conditions of too low luminosity
if (mean_pic<30) {
while(f<5) {
e_set_led(0,1);
wait(100000);
e_set_led(0,0);
e_set_led(1,1);
wait(100000);
…
Case 1
….
e_set_led(7,1);
wait(100000);
e_set_led(7,0);
f=f+1;
}
while(1) { };
}
while(b<10){
If (hori==1 && vert==0) {
e_set_led(5,1);
e_set_led(6,1);
e_set_led(7,1);
wait(200000);
e_set_led(5,0);
e_set_led(6,0);
e_set_led(7,0);
wait(200000);
}
else if (vert==1 && hori==0) {
e_set_led(1,1);
e_set_led(2,1);
e_set_led(3,1);
wait(200000);
e_set_led(1,0);
e_set_led(2,0);
e_set_led(3,0);
wait(200000);
} …
Case 2
SIS Project: Road sign recognition with the e-puck
Demonstration
Warning
Now, pay attention to the setup please.
It’s this cardboard thing which is placed on
the table...
SIS Project: Road sign recognition with the e-puck
Exemple of pictures taken by the e-puck
Angle: 45°
Angle: 27°
Angle: 0°
Distance: 25 [cm]
Distance: 50 [cm]
Distance: 80 [cm]
SIS Project: Road sign recognition with the e-puck
Exemple of pictures taken by the e-puck
Angle max: 70°
Distance: 35 [cm]
Minimum of luminosity
( ~10% of the grey scale)
SIS Project: Road sign recognition with the e-puck
Results
Very few errors because we have defined limits to our
recognition process.
High succes rate due to a well calibrated setup:
• Luminosity : lower threshold
• Distance : max 80 [cm]
• Angle : max 70 [°]
• Framing : position of the e-puck and size of the signs
Quantitative results are not so interesting because the
errors don’t come from the recognition algoritm.
The detection of the sign is the main source of error but is
not in the scope of this project.
SIS Project: Road sign recognition with the e-puck
Conclusion
Good recognition depends on:
•
•
•
•
Luminosity
Distance
Angle
Resolution of the picture
Our high success rate is due to:
• The use of simplified road signs
• A non-moving system
• An accurate setup calibration
SIS Project: Road sign recognition with the e-puck
Download