DEV Community

Cover image for SmartRCCar
Jamshid M
Jamshid M

Posted on

SmartRCCar

Self Driving car with Computer Vision using OpenCV library

https://github.com/Jamshid-M/SmartRCCar

alt text

Step 1

Taking frame as input from RaspiCam

alt text

Step 2

Denoising frame with

GaussianBlur

OpenCV fucntion

alt text

Step 3

Finding edges with

Canny

edge detection, OpenCV function

alt text

Step 4

Finding yellow colors in the frame with

inRange

OpenCV function

image

Step 5

After applying step 3 and step 4 we use

bitwise_and

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

HoughLines

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)