The contribution of this thesis is mainly to the field of active safety. More specifically, it demonstrates the steps needed to create a simple and efficient model for lane departure warning and obstacle warning. The model is implemented on a cheap single board computer, demonstrating that active safety does not need to be complex or use expensive hardware to be useful.