Image Analysis
The track was assumed to be always in line with the camera horizontally, which allowed some simple algorithms to scan lines for unbroken non-track areas when the camera image was thresholded to find the track area. To find the car, a check for the total number of frame differenced pixels were done through the image. The front of the car was found by putting some red on it, and allowing a similar thresholding to find only red. To navigate around the track, waypoints were used, added by a few measurements of track areas and locations to put them in the same location each time.
Navigation Rules
After all the information was made available, the rules needed to successfully navigate between waypoints were kept simple since the car had a poor turning circle and didn’t have much in the way of advanced driving techniques to use. These were able to navigate from most “crash positions” (where the car cannot continue towards it’s next waypoint without turning), and was able to complete 10 laps of the track successfully. A sample of the points taken is below:
Files
You can download my final report here:
The final code is available too, although it will need a certain web camera, and UserPort installed do much:
Finally, since the code is unlikely to run, there is a gallery of pictures (most which are in the report), and some videos available. These have some “commentary” but sometimes is of pretty poor quality and hard to hear. All of these are H264 MPEG-4 videos with AAC audio.



