Thanks to visit codestin.com
Credit goes to github.com

Skip to content

putcn/lane-detection-raspberry-pi

 
 

Repository files navigation

Lane Watcher

screenshot This tool is an integration of original lane detection from uvbakutan/lane-detection-raspberry-pi and a LCD screen, so that this little gadget can be mounted in my wife's car and let her know how bad or bad ass she's driving.

Before you start

Make sure you have the following:

  1. Raspberry Pi, mine is RP3
  2. A picamera
  3. A 16*2 LCD screen, try this
  4. a breadboard and some wires
  5. 10k Ohm Potentiometer

I don't have screen's i2c board, so the wiring part is a little messy.

Wiring

  1. follow this article to have the screen wired to your RP
  2. mount the picamera to RP

Software

  1. build and install opencv3

    make sure you follow this guide's python3 part, and it is going to take about 2h

  2. pip install picamera numpy RPi.GPIO Adafruit_CharLCD

  3. git clone https://github.com/putcn/lane-detection-raspberry-pi

  4. python lane_watcher.py

Now you are supposed to see the offset and direction in the LCD, or "Not Detected" message if the cam can't see any lane.

You can use sample_video.mp4 in this repo to test the program without truly driving on an open street.

What next

cam stand

make sure you have a stand for you cam in the car, since the tape connecting the cam and RP is very weak.

autostart

Since we are not going to have keyboard or mouse in a car, this tool need to start along with the system.

There are several ways of doing so, just search it and we will not cover this part in this repo.

ventilate for RP

vision related processing is very computation intensive, especially the real time ones like in our case, so RP's chips can get very hot running the lane detecting program. And the fact putting it in the car will just make the case worse. Make sure your RP has heat sink and/or good ventilation and don't fry your Pi :)

Disclaimer

�This tool is only for demonstration purpose. Don't use it in real world driving situation. Your eyes should be focusing on the road all the time when driving.

About

Lane detection using Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%