Robot reading signs
The objective: a robot car detecting a blue marker, move towards the marker, read the sign that’s on the marker and follow its direction until a stop sign is found.
The video shows an overview of the approach and performance.
Software used:PythonopenCV and NumpyMini-driver, Arduino, Tornado and Websockets
Here you'll find the complete script
The coding is rather straight forward and well commented. It's considered to be self-explanatory.
There are several ways to track an object in a live video stream. The most simple and fast methods are size detection and color tracking. Using size detection the objects are preferably squared. For the objective is to read the signs on the markers, color detection is used in this case. The signs are placed on a blue A4 background. This makes them easy to detect and simplifies filtering out the sign.Color detection however is rather dependent of the light conditions (darkness, lamp lights, shadows). When using color tracking at night, the RGB values used for masking will have to be adjusted according to the overall situation. Such can be easily done with a calibrating script, which can also be found at the same repository in the Handy stuff folder.