0% found this document useful (0 votes)
21 views17 pages

Rajesh

Uploaded by

DR. RANU GUPTA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views17 pages

Rajesh

Uploaded by

DR. RANU GUPTA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

LANE DETECTION USING IMAGE PROCESSING

Major project report submitted in partial fulfillment of the requirements for the
Degree of

Bachelor of Technology in
Electronics and Communication Engineering by

Abhay Gaur (181A001)


Pranchal Samaiya (181A010)

Under the Guidance of


Dr. Ranu Gupta Mam

Department of Electronics & Communication Engineering


JAYPEE UNIVERSITY OF ENGINEERING & TECHNOLOGY,
A.B.ROAD, RAGHOGARH, GUNA-473 226, M.P. (INDIA)
December, 2021
CONTENTS
ABSTRACT
LIST OF FIGURES i

1 INTRODUCTION

2 LITERATURE SURVEY

3 PROPOSED METHOD

3.1 IMAGE PROCESSING


3.2 RASPBERRY PI
3.2.1 RASPBERRY PI BOARD
3.3 ARDUINO UNO
3.3.1 ARDUINO UNO BOARD
3.4 MOTOR DRIVER L293D

4 PROCESS INVOLVED IN IMAGE PROCESSING

4.1 CAPTURING IMAGE


4.2 BGR TO RGB COLOUR SPACE
4.3 REGION OF INTEREST
4.4 THRESHOLD OPERATION
4.5 CARRY EDGE DETECTION

5 CONCLUSION

REFERENCES
ABSTRACT

Artificial Intelligence's creation has acted as a catalyst in the area of


technology.Things that were once just a figment of our imagination can now be
realized. The birth of Lane detection concepts in cars is one of these innovations.
Days have come when you can do your work or your car and still get to your
destination securely. This project proposes a working model of a lane detection car
that can drive from one place to another, or on various types of tracks such as
curved, straight, and straight followed by curved tracks. Along with The Raspberry
Pi, a camera module, is mounted on the top of the vehicle. The images from the real
world are sent to the Raspberry Pi. The machine then forecasts one of the following
ways. Right, left, forward,or stop are the options. After that, a signal is sent from the
Arduino to the car's controller, and the car moves in the desired direction without
any human interference. From automated traffic control to automated home,
everything comes up to the rescue of humans to provide a comfortable and relaxing
lifestyle. After almost automating everything now mankind has moved to automate
transportation, starting with automating the vehicles. With this the first step taken is
to devise a Lane detection car or a driverless car, with an aim to provide humans
with relaxed driving.
LIST OF FIGURES
1 INTRODUCTION

Lane detection driving vehicles are one of the most talked-about technologies in the
modern era. It can operate without any human intervention. Various sensors are
combined and used to distinguish the road, barriers,and other objects in the
environment. The less fuel waste, increased protection, increased mobility, and less
an accident on the road by traveling. In that case we see the less traffic accidents, less
accident rate, less deaths, as a result of the safety benefits. By providing proper
specific lane mobility from source to destination, lane detection vehicles may
improve traffic flow.

Today,traffic accidents have become one of the most serious problems in the world.
Roads are the most commonly modes of transportation and provide the good
connectivity among all modes of transportation. Most frequently occurring traffic
problem is the negligence of the ,traffic rules by the drivers and it has become more
and more serious in today's world .
2 LITERATURE SURVEY

An algorithm for detection of marks of road lanes and road boundaries by using
intelligent vehicles. It converted the RGB road scene image into gray image and
employed the flood-fill algorithm to label the connected components of that gray
image. After that the largest connected component obtained by the algorithm and
which was the road region was extracted. The unwanted region was detected and
subtracted like the outer-side of the road. The extracted connected component was
filtered to detect white marks of road lane and road boundary. The road lane
detection algorithm still had some problems such as critical shadow condition of the
image and color of road lanes other than white.

FIG.-

Most roads such as highways have at least two lanes, one for traffic in each direction,
separated by lane markings. Major highways often have two roadways separated by a
median, each with multiple lanes. To detect these road lanes some system must be
employed that can help the driver to drive safely. Lane detection is an area of
computer vision with applications in autonomous vehicles and driver support
systems.
FIG.

Despite the perceived simplicity of finding white markings on a simple road, it can
be very difficult to determine lane markings on various types of road. These
difficulties can be shadows, occlusion by other vehicles, changes in the road surfaces
itself, and different types of lane markings. A lane detection system must be able to
detect all manner of markings from roadways and filter them to produce a reliable
estimate of the vehicle position relative to the lane. To detect road markings and road
boundaries various methodologies are used like Hough Transform, Canny edge
detection algorithm, bilateral filter.
3 PROPOSED METHOD

3.1 IMAGE PROCESSING using OpenCV


Image processing is a method to perform some operation on an image using digital
use of a computer to process digital images through an algorithm .In order to get
useful information from it.The demand of Image processing in the application areas
such as environment, agriculture, military, industry and medical .

Image processing mainly includes the following steps are Importing the image
from image acquisition tools.Analysing and manipulating the image in digital
form.Output which we get from changed image or a report which is based on
analysing that old
Image.

OpenCV is a great tool for image processing and performing computer vision tasks.
It is an open-source library that can be used to perform tasks like face detection,
objection tracking, landmark detection, and much more. Some of these functions
are really common and are used in almost every computer vision task

OpenCV is used as an image processing library in many computer vision real-time


applications.OpenCV supports a wide variety of programming languages like
Python, C++, Java,etc.There are thousands of functions available in OpenCV in
which simple techniques are used to shape our images in our required format.

3.2 RASPBERRY PI
The Raspberry Pi is a low cost, credit-card sized computer that plugs into a
computer monitor or TV. And used as a standard keyboard and mouse.It is a capable
little device that enables people of all ages to explore computing.It uses what's
called a system on a chip, which integrates the CPU and GPU in a single integrated
circuit, with the RAM, USB ports, and other components soldered onto the board
for an all-in-one package.
3.2.1 RASPBERRY PI BOARD
The raspberry pi board comprises a program memory (RAM), processor and
graphics chip, CPU, GPU, Ethernet port, GPIO pins, Xbee socket, UART, power
source connector. And various interfaces for other external devices. It also requires
mass storage, for that we use an SD flash memory card. So that raspberry pi board
will boot from this SD card similarly as a PC boots up into windows from its hard
disk.
The raspberry pi model Aboard is designed with 256MB of SDRAM and model B
is designed with 51MB.Raspberry pi is a small size PC compared with other PCs.
The normal PCs RAM memory is available in gigabytes. But in raspberry pi board,
the RAM memory is available more than 256MB or 512MB.

FIG.

3.3 ARDUINO UNO


Arduino is an open-source electronics platform based on easy to use hardware and
software. The Arduino hardware and software was designed for artists, designers,
and anyone interested in creating interactive objects .Arduino came in 2005 as a
tool for students at the Interaction Design Institute Ivrea, Italy.
Advantages of Arduino are that it is open source and extensible for software and
hardware purposes ,simple and clear programming language ,inexpensive.The
Arduino programming language has C programming language syntax.The Arduino
Software (IDE) is easy to use for beginners.

The Arduino Software is an open-source (IDE) that makes it easy to write code and
upload it to the board. This software can be used with any Arduino board. It works
on some applications like Windows, macOS, Linux ,that are written in functions
from C and C++.It is used to write and upload programs to Arduino boards.

An Arduino board consists of an ATMEL 8 bit AVR microcontroller; it is


responsible for all the operation that happens on board.Arduino can sense the
environment by receiving input from the various sensors and actuators .

The board should be selected on the basis of requirements of the uses.The best way
to select the arduino board is to check i/o and computing requirements.Each board
based on the inputs ,outputs ,speed ,voltage ,etc . The voltage required to operate
these boards range from 3.7V to 5V.

3.3.1 ARDUINO UNO BOARD


Arduino board designs use a variety of microprocessors and controllers. The boards
are equipped with sets of digital and analog i/o pins that may be interfaced to
various expansion boards or breadboards and other circuits. The boards feature
serial communications interfaces, including Universal Serial Bus (USB) on some
models, which are also used for loading programs .Most commonly used board is
arduino uno board, let see pins are in arduino uno board.
FIG.-Arduino UNO Board

3.4 MOTOR DRIVER L293D


L293D is a 16-pin IC which can control a set of two DC motors simultaneously in
any direction.It means that you can control two DC motors with a single L293D
IC.The L293D IC receives signals from the microprocessor and transmits the
relative signal to the motors.
The L293D is a popular 16-Pin Motor Driver IC. As the name suggests it is mainly
used to drive motors. A single L293D IC is capable of running two DC motors at
the same time; also the direction of these two motors can be controlled
independently. So if you have motors which have operating voltage less than 36V
and operating current less than 600mA, which are to be controlled by digital circuits
like Op-Amp, 555 timers, digital gates or even Microcontrollers like Arduino, PIC,
ARM etc.

FIG
4 PROCESS INVOLVED IN IMAGE PROCESSING

4.1 CAPTURING IMAGE


The process of obtaining a digital image from a vision sensor, such as a camera.The
process where an electronic device such as a scanner is used for creating a digital
representation of an image.

4.2 RGB TO GREY COLOUR SPACE


When converting an RGB image to grayscale, we have to take the RGB values for
each pixel and make as output a single value reflecting the brightness of that pixel.

4.3 REGION OF INTEREST


A region of interest, are samples within a data set identified for a particular
purpose.The concept of a ROI is commonly used in many application areas. For
example, in medical imaging, the boundaries of a tumor may be defined on an
image or in a volume.

4.4 THRESHOLD OPERATION


In digital image processing, thresholding is the simplest method of segmenting
images.From a grayscale image, thresholding can be used to create binary
images.An image processing method that creates a binary image based on setting a
threshold value on the pixel intensity of the original image.

4.5 CARRY EDGE DETECTION


The Canny edge detector is an edge detection operator that uses a multi-stage
algorithm to detect a wide range of edges in images. It was developed by John
F.Canny in 1986 Canny edge detection is a technique to extract useful structural
information from different vision objects and dramatically reduce the amount of
data to be processed.An edge detection solution to address these requirements can
be implemented in a wide range of situations.

5 SYSTEM ARCHITECTURE

FIG.

The proposed model uses a Pi cam connected to a RaspberryPi in the car to capture a
picture. The Raspberry Pi and the laptop are both linked to the same network, and the
Raspberry Pi sends the image captured as the input image. The picture will be
captured by the camera that was installed in the Raspberry Pi kit's top head; the
camera equipment will be linked via a USB port The Linux OS/Raspbian OS
programme can capture the image from the attached camera.

The extracted image from the camera is sent to the Raspberry Pi pack, which is then
used to run c++ code. Signals are created in the c++ coding, which come from the
execution of the kit and are sent to the car/robot. The Raspberry Pi and the robot car
follow each other and effectively detect objects. The SD card, like a hard drive on a
computer, is an essential component of the Raspberry Pi board. Before moving the
picture to the Network, it is grayscale. The model predicts one of four possible
outcomes: left, right, forward, or stop.

When a predicted outcome is obtained, the corresponding Arduino signal is


triggered, which in turn causes the corresponding Arduino signal to be triggered with
the assistance of its controller, assisting the car in moving in a specific direction.
5 CONCLUSION
REFERENCES

1. Prof. Shilpa Satre1, Vinayak Bhat, Pranay Gadhave, Nikhil Jadhav 2021
“Self-driving Car based onImage Processing with Machine
Learning”,IRJET,Vol.8,Issue 5,pg 1253-1255.
2. Anjali Goel, International Journal of Computer Science and Mobile Computing,
Vol.3 Issue.2, February- 2014, pg. 596-602
3. R. Poonkuzhali, Vineet Kumar Singh June 2020“Virtual Self Driving Car using
the Techniques of Image Processing and Deep Neural Networks”ISSN: 2249 –
8958, Volume-9 Issue-5,pg 190-195.
4. Computer Vision and Machine Learning for Autonomous Vehicles by Zhilu
Chen,August 2017.
5. Gonzalez, Rafael (2018). Digital image processing. New York, NY: Pearson.
ISBN 978-0-13-335672-4. OCLC 966609831.Retrieved from
https://en.wikipedia.org/wiki/Digital_image_processing#cite_ref-1
6. By Rafael C. Gonzalez, Richard E. Woods, Steven L. Eddins · 2010.Retrieved
From https://www.geeksforgeeks.org/digital-image-processing-basics/
7. https://www.analyticsvidhya.com/blog/2021/09/some-amazing-applications-of-op
encv-library/
8. https://www.raspberrypi.org/help/what-%20is-a-raspberry-pi
9. https://www.watelectronics.com/know-all-about-raspberry-pi-board-technology
10.https://www.pcmag.com/how-to/beginners-guide-how-to-get-started-with-raspber
ry-pi
11.Guide To OpenCV Functions For Image Processing (analyticsindiamag.com)
12.https://en.wikipedia.org/wiki/Arduino
13.https://www.arduino.cc/en/guide/introduction
14.Fig 1-https://robu.in/wp-content/uploads/2020/07/1-3.jpg
15.https://www.rakeshmondal.info/L293D-Motor-Driver
16.https://components101.com/ics/l293d-pinout-features-datasheet
17.https://en.wikipedia.org/wiki/Region_of_interest
18.https://en.wikipedia.org/wiki/Thresholding_(image_processing)
19.http://www.digitizationguidelines.gov/term.php?term=thresholding
20.https://www.ijert.org/research/comparison-of-canny-edge-detector-with-sobel-and
-pr
21.ewitt-edge-detector-using-different-image-formats-IJERTCONV2IS03009.pdf
22.https://en.wikipedia.org/wiki/Canny_edge_detector
23.

You might also like