DEV Community

Cover image for SmartRCCar
Jamshid M
Jamshid M

Posted on


Self Driving car with Computer Vision using OpenCV library

alt text

Step 1

Taking frame as input from RaspiCam

alt text

Step 2

Denoising frame with


OpenCV fucntion

alt text

Step 3

Finding edges with


edge detection, OpenCV function

alt text

Step 4

Finding yellow colors in the frame with


OpenCV function


Step 5

After applying step 3 and step 4 we use


for two frames, this function returns intersection points of two frames.

Also applying dilate function will help you with finding lines by increasing pixels near our line pixels.

alt text

Step 6

Finally we have to mask our frame for avoiding unnecessary lines and pixels in our frame

alt text

After this step we just apply


function and find right and left lines appropriately.

With the help of right and left lines we will predict turn in predictTurn function

In this project I've made also traffic light recognition with color filtering and traffic sign recognition with Cascade classifier (xml)

Top comments (0)