0% found this document useful (0 votes)
5 views56 pages

Ilovepdf Merged

The project report presents an Automated Pothole and Road Irregularity Detection System aimed at enhancing driver safety by utilizing advanced computer vision and machine-learning techniques for real-time pothole identification. The system employs a Raspberry Pi and OpenCV libraries to detect potholes from images, geotagging them for efficient monitoring and alerting drivers via social messaging applications. This innovative approach aims to improve road maintenance and safety, contributing to the development of smart cities.

Uploaded by

tanushkumar618
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)
5 views56 pages

Ilovepdf Merged

The project report presents an Automated Pothole and Road Irregularity Detection System aimed at enhancing driver safety by utilizing advanced computer vision and machine-learning techniques for real-time pothole identification. The system employs a Raspberry Pi and OpenCV libraries to detect potholes from images, geotagging them for efficient monitoring and alerting drivers via social messaging applications. This innovative approach aims to improve road maintenance and safety, contributing to the development of smart cities.

Uploaded by

tanushkumar618
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/ 56

AUTOMATED POTHOLE AND ROAD IRREGULARITY

DETECTION FOR DRIVER SAFETY


A Project Report

Submitted in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
In

ELECTRONICS AND COMMUNICATION ENGINEERING

by
A. Tanush Kumar 21L31A0407
A. Karthik 21L31A0405
D.K.V. Varma 21L31A0433
G.S.L. Manasa 21L31A0443

Under the Esteemed Guidance of


Dr. H. Devanna
Associate Professor
Department of ECE
VIIT(A), Visakhapatnam

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY


(Autonomous)
Affiliated to JNTUGV, Vizianagaram & Approved by AICTE, New Delhi
Re-Accredited by NAAC (CGPA of 3.40/ 4.00)
ISO 9001:2008, ISO 14001:2004, OHSAS 18001:2007 Certified Institution
VISAKHAPATNAM – 530039

APRIL 2025
AUTOMATED POTHOLE AND ROAD IRREGULARITY
DETECTION FOR DRIVER SAFETY

A Project Report

Submitted in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
In

ELECTRONICS AND COMMUNICATION ENGINEERING

by
A. Tanush Kumar 21L31A0407
A. Karthik 21L31A0405
D.K.V. Varma 21L31A0433
G.S.L. Manasa 21L31A0443

Under the Esteemed Guidance of


Dr. H. Devanna
Associate Professor
Department of ECE
VIIT(A), Visakhapatnam

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY


(Autonomous)
Affiliated to JNTUGV, Vizianagaram & Approved by AICTE, New Delhi
Re-Accredited by NAAC (CGPA of 3.40/ 4.00)
ISO 9001:2008, ISO 14001:2004, OHSAS 18001:2007 Certified Institution
VISAKHAPATNAM – 530039

APRIL 2025
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE

This is to certify that the project report entitled “AUTOMATED POTHOLE AND ROAD
IRREGULARITY DETECTION FOR DRIVER SAFETY” is a bonafide record of
project work carried out under my supervision by Appikonda Tanush Kumar
(21L31A0407), Ambati Karthik (21L31A0405), Datla Krishna Vivek Varma
(21L31A0433), Gamini Sri Lakshmi Manasa (21L31A0443) during the academic year
2024-25, in partial fulfillment of the requirements for the award of the degree of Bachelor of
Technology in ELECTRONICS AND COMMUNICATION ENGINEERING of VIGNAN’S
INSTITUTE OF INFORMATION TECHNOLOGY (Autonomous). The results embodied in
this major project report have not been submitted to any other University or Institute for the
award of any Degree or Diploma.

Signature of the Project Guide Signature of the Head of the Department


Dr. H. Devanna Dr. Ch. Ramesh Babu
Associate Professor Professor & HoD
Department of ECE, VIIT (A) Department of ECE, VIIT (A)

External Examiner
DECLARATION
We hereby declare that the project work entitled “AUTOMATED POTHOLE AND ROAD
IRREGULARITY DETECTION FOR DRIVER SAFETY” is being submitted to
VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY (Autonomous), in partial
fulfillment for the award of B.Tech degree during the year 2024-25 in Electronics and
Communication Engineering. The work was originally designed and executed by us under
the guidance of our supervisor Dr. H. Devanna, Associate Professor, and was not a
duplication of work done by someone else. We hold the responsibility of the originality of the
work incorporated into this thesis.

Signature of the candidate


Name: A. TANUSH KUMAR
Date:

Signature of the candidate:


Name: A. KARTHIK

Date:

Signature of the candidate:


Name: D.K.V. VARMA
Date:

Signature of the candidate:


Name: G.S.L. MANASA
Date:
ACKNOWLEDGEMENT

Our deepest thanks to our Guide Dr. H. Devanna, Associate Professor, Department of
Electronics and Communication Engineering, VIGNAN’S INSTITUTE OF INFORMATION
TECHNOLOGY (Autonomous), Visakhapatnam for his invaluable scholarly advice,
inspirations, help, and guidance that helped us throughout our project work. We will always
be indebted to him for all he has done for us, and it is a pleasure to acknowledge his guidance
and support.

We sincerely thank our Head of the Department of Electronics and communication


Engineering Dr. Ch. Ramesh Babu, Professor & HoD who has helped us incessantly and
encouraging throughout the course of this project, for providing us with necessary facilities
for our project work.

We sincerely and honestly thank Dr. A. Naga Jyothi, Professor of ECE & Dean of
Academics of VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY
(Autonomous)for her valuable advices and encouragement for the project work.

We sincerely and honestly thank Dr. J. Sudhakar, Professor & Principal,


VIGNAN’S INSTITUTE OF INFORMATION TECHNOLOGY (Autonomous). We express
heart-felt gratitude for his valuable advices and encouragement for the project work.

We also thankful to Dr. Lavu Rathaiah, Chairman of Vignan Group, for his
constant source of inspiration and motivation.

We express thanks to our faculty members and non-teaching staff who were directly
and indirectly involved in this project for their overwhelming cooperation.

Finally, we would like to extend our heart-felt thanks to our beloved parents whose
blessings & encouragement were always there as a source of strength and inspiration.
ABSTRACT

Roadside potholes can cause severe traffic safety issues and damage vehicles. Pothole
detection is an important activity in road maintenance that ensures traffic safety and
infrastructure longevity. This work proposes an effective method for pothole detection based
on adaptive Canny edge detection and contour analysis. The technique dynamically calculates
edge thresholds according to the median intensity of the image, providing robustness in
different lighting conditions. The pipeline starts with pre-processing with Median Blur to
minimize noise, and adaptive Canny edge detection for reliable boundary detection. Extracted
edges are then detected using contour detection, where convex hull methods and bounding
box computations assist in marking potential pothole areas. To enhance reliability, DBSCAN
clustering clusters proximate contours to reduce false detection. The new method improves
conventional edge detection by learning to adapt to various environments and minimizing
manual threshold tuning. The efficiency of the system makes it ideal for practical applications
like autonomous road inspection and self-driving vehicle navigation, with a cost-efficient and
scalable approach to pothole detection.

Key Terms: Raspberry Pi, Canny edge detection, Cost-effective solution, Road safety.

i
TABLE OF CONTENTS

Chapter no. Title Page no.


Cover page
Certification
Declaration
Acknowledgement
Abstract i
Contents ii
List of Figures v
Chapter 1 INTRODUCTION 1-2
1.1 Introduction 1
1.2 Objectives 2
Chapter 2 LITERATURE SURVEY 3-5
2.1 Ultrasonic sensor 3
2.2 POT-YOLO 3
2.3 Vibrational Analysis 4
2.4 Point Laser Sensor 4
2.5 Mobile Laser Scanning 4-5

Chapter 3 HARDWARE IMPLEMENTATION 6-16


3.1 NEO-6M GPS Module 6
3.1.1 Introduction to Neo-6m GPS Module 6
3.1.2 Features and Specifications of Neo- 6-7
6m GPS Module
3.1.3 Applications 7
3.2 Raspberry Pi Camera Module 7-8
3.2.1 Introduction to Raspberry Pi Camera 7
Module
3.2.2 Features of Raspberry Pi Camera

ii
Module 8
3.3 Raspberry Pi 4 Model B
3.3.1 Introduction 8-17
3.3.2 Features 8
3.3.3 Ports 8-9
3.3.4 Power Requirements 9-10
3.3.5 Peripherals 10
3.3.6 Virtual Environment in Raspberry Pi 10-12
3.3.7 Initialisation of Raspberry Pi 12-14
3.3.8 Activation of VNC Viewer 14-16
3.4 ESP8266 Microcontroller 16-17
3.4.1 Introduction ESP8266 NodeMCU 17-20
3.4.2 Features of ESP8266 NodeMCU 17
3.4.3 Pin description 18
3.5 L298N Driver module 18-20
3.5.1 Introduction to L298N driver module 20-21
3.5.2 Features of L298N driver module 20
3.6 Battery operated DC motor 21
3.6.1 Introduction 21-22
3.6.2 Features of BO DC motor 21
22
Chapter 4 SOFTWARE IMPLEMENTATION 23-26
4.1 Algorithm for automated pothole and road 23-24
irregularity detection for driver safety
4.2 Pothole detection using different algorithms 24-26
4.2.1 Step by Step process 25-26

iii
Chapter 5 DESIGN AND METHODOLGY 27-35
5.1 Introduction to the proposed system 27
5.2 System Architecture, Block Diagram and 28-30
circuit diagram
5.3 Block Diagram of the proposed system 30
5.4 Block Diagram Explanation 30-32
5.5 Circuit Diagram 32-34
5.5.1 Description of the Pothole Detection 32-33
System Circuit Diagram
5.5.2 Description of Robotic Car Circuit 33-34
Diagram
5.6 Flowchart 35
Chapter 6 TESTING AND EXPERIMENTAL 36-38
RESULTS
6.1 Circuit Connections 36
6.2 Pothole detection 37
6.3 Dropbox excel sheet 37-38
6.4 Messages sent through telegram bot 38

Chapter 7 CONCLUSION & FUTURE SCOPE 39-40


7.1 Conclusion 39
7.2 Future Scope 39-40
7.3 Applications 40
Appendix Geo Tag Photo 42
References 43-45
CO-PO mapping 46

iv
LIST OF FIGURES

S. No. Figure No. Description Page No.

01 3.1.1 Neo-6m GPS Module 6

02 3.2.1 Raspberry with pi camera 7

03 3.3.1 Raspberry Pi 4 Model B 8

04 3.3.2 Ports of Raspberry Pi 10

05 3.3.3 GPIO Pin Layout of Raspberry Pi 11

06 3.3.4 Creation of Virtual Environment 13

07 3.3.5 Activation of Virtual Environment 13

08 3.3.6 Deactivation of Virtual Environment 14

09 3.3.7 Raspberry Pi Imager 14


10 3.3.8 Different OS available in pi imager 15
11 3.3.9 OS Customization 15
12 3.3.10 Dialog box to customize OS 15
13 3.3.11 Raspberry Pi software configuration tool 16
14 3.3.12 Interfacing options 16

15 3.3.13 VNC viewer activation 17

16 3.3.14 Raspberry Pi Desktop 17

17 3.4.1 ESP8266 NodeMCU 17

18 3.4.2 Pinout diagram 18

19 3.5.1 L289N driver module 20

20 3.6.1 BO DC motor 21

21 4.2.1 Pothole detected using different algorithms 24

22 4.2.2 Message sent to Telegram bot 25

23 5.3.1 Block diagram of proposed detection system 30

v
24 5.5.1 Circuit Diagram 32

25 5.5.2 Circuit diagram of Robotic car 33

26 5.6.1 Flowchart 35

27 6.1.1 Circuit Connections 36

28 6.2.1 Detection of Potholes 37

29 6.3.1 Results Stored in Dropbox data sheet 38

30 6.4.1 Messages sent through Telegram Bot 38

vi
Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 1
INTRODUCTION

1.1 INTRODUCTION:

Road infrastructure is a fundamental aspect of modern transportation systems,


ensuring smooth and safe travel for commuters. However, potholes and road
irregularities remain a persistent challenge, significantly impacting road safety
and vehicle longevity. These road defects can lead to traffic accidents, vehicle
damage, increased fuel consumption, and costly repairs. The manual methods
currently employed for pothole detection and road maintenance are labour-
intensive, time-consuming, and inefficient, often failing to provide timely
responses to road deterioration. This lack of efficiency necessitates an automated,
accurate, and scalable solution to detect and address potholes before they become
hazardous.
To bridge this gap, this research presents an Automated Pothole and Road
Irregularity Detection System that leverages advanced computer vision and
machine-learning techniques for real-time pothole identification. The system
utilizes a Raspberry Pi development board, integrating OpenCV libraries for
image processing, and employs a contour detection module to accurately detect
potholes from images captured by vehicle-mounted cameras or road surveillance
systems. The detected potholes are then geotagged using a GPS module and
stored in a cloud database, allowing authorities to monitor road conditions
efficiently.
In addition to real-time detection, the system enhances road safety by providing
instant alerts to drivers through social messaging applications, warning them
about upcoming potholes and suggesting alternative routes. This not only
minimizes the risk of accidents but also enables proactive road maintenance
strategies, allowing municipal authorities to prioritize repair efforts based on real-
time data analysis.

The significance of this research lies in its potential to revolutionize road


maintenance and infrastructure management. By automating the detection and

Department of Electronics and Communication Engineering, VIIT(A) 1


Automated Pothole and Road Irregularity Detection for Driver Safety

reporting of potholes, this system contributes to the development of smart cities,


where technology-driven solutions enhance urban living. Additionally, the use of
a cost-effective, scalable, and easily deployable system ensures that this
technology can be widely adopted, particularly in regions where manual road
inspection is challenging.
This thesis explores the design, implementation, and performance evaluation of
the proposed pothole detection system, discussing its accuracy, efficiency, and
feasibility in real-world applications. By continuously monitoring and updating
road condition data, this system not only improves driving experiences but also
aids in long-term infrastructure planning and development, ultimately leading to
safer and more efficient roadways.

1.2 OBJECTIVES:

 To detect potholes in captured images using image processing algorithms


and OpenCV libraries.
 Store images, location data, and other relevant information in a cloud-based
database and send real-time alerts to users about the presence of potholes
using social messaging apps.

Department of Electronics and Communication Engineering, VIIT(A) 2


Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 2

LITERATURE SURVEY

Over the past decade, various technologies such as active and passive sensing, have
been utilized to acquire road data and aid personnel in detecting road potholes. These
methods include using vibration analysis from 3-axis accelerometer, disparity
transformation and road surface modelling, computer vision and learning, mobile
laser scanning, point laser sensor, pot-yolo v8 network. To overcome this, we try to
propose a road irregularity detection technique using Raspberry Pi and image
processing combined with GPS for location tracking.

2.1 ULTRASONIC GPS MAPPING

To find the depth of any potholes, the pothole detection system uses a waterproof
ultrasonic sensor that is attached on the front end of the Pothole Robot Agent
(PRA). The sensor constantly senses the distance on a flat road. A pothole is a
positive difference, but a negative difference indicates a road hump. To enable
correct mapping of pothole locations, the system also utilizes a GPS Module
Board to take the geographic coordinates of sensed potholes. An Atmega328
Arduino Uno Microcontroller manages the communication between the GPS
module and the ultrasonic sensor, guaranteeing precise data processing and
gathering. This process facilitates easy detection and definition of potholes in real
time, which later forms an extensive pothole map for road users.

2.2 POT-YOLO
With the YOLOv8 network, the authors introduced a novel approach for real-time
pothole detection termed POT-YOLO. The authors captured pothole videos and
split them into individual picture frames for further analysis. They employed a
pre-processing technique referred to as the Contrast Stretching Adaptive Gaussian
Star Filter (CAGF) to enhance the quality of these frames and eliminate
distortions.
Following pre-processing, Sobel edge detection was applied to scan the photos
and identify the edges of potholes. To identify and classify various types of

Department of Electronics and Communication Engineering, VIIT(A) 3


Automated Pothole and Road Irregularity Detection for Driver Safety

potholes such as cracks, oil spots, patches, and stones correctly, the processed
photos were then input into the POT-YOLOv8 model. Following several metrics,
the performance of the POT-YOLO method was measured and revealed to be
highly accurate and efficient in pothole detection but is highly complicated.

2.3 VIBRATIONAL ANALYSIS

It employs vibration sensors attached to a vehicle's steering column to sense road


roughness. The data are measured using a triaxial accelerometer, positioning using
GNSS, and an NB-IoT module for wireless communication. The vibration signals
are analysed with the use of RMS calculations, FFT, and wavelet transforms in
order to detect potholes, 80 HZ vibrations being signals generated from extreme
road damage. The system maps potholes by merging vibration signals with
location data using Google Plus codes for precise tracking. Data is passed on to a
cloud-based Web-GIS environment that offers real-time updates of road
conditions, but is unable to offer data from the path the car has not travelled, or
when the pothole is found in the centre of track.

2.4 POINT LASER SENSOR


The authors presented a real-time road assessment system using point laser
sensors and a low-complexity signal processing algorithm to detect road surface
defects. Unlike traditional scanning lasers, which provide high-density 2D data,
the proposed system captures longitudinal 1D data, reducing complexity and
enabling real-time processing. The method calculates a Road Texture Index (RTI)
using Root Mean Square (RMS) values and compares local and global RTI
distributions to identify road deterioration.
Performance comparisons with scanning lasers show that point lasers effectively
identify longitudinal defects but may miss small traverse cracks.

2.5 MOBILE LASER SCANNING


It is a semi-automated method for classifying road markings from Mobile laser
scanning point clouds. The process involves steps such as Pre-processing, Road
Marking Extraction and Classification. In pre-processing, raw 3D MLS data is
filtered to remove objects other than road using voxel-based segmentation and
high-pass filtering, then converted into 2D intensity images with scan angle based

Department of Electronics and Communication Engineering, VIIT(A) 4


Automated Pothole and Road Irregularity Detection for Driver Safety

correction to enhance contrast. Next, Otsu’s thresholding and noise removal


techniques extract road markings and they are segmented and classified using
geometric features and hierarchical decision tree.

Department of Electronics and Communication Engineering, VIIT(A) 5


Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 3
HARDWARE IMPLEMENTATION

3.1 NEO-6M GPS MODULE:


3.1.1 Introduction to Neo-6m GPS Module:
The u-blox NEO-6M is a compact, cost-effective GPS module with a built-in ceramic
antenna, offering a 50-channel GPS receiver and features like a fast time-to-first-fix,
configurable baud rates, and an external EEPROM for configuration storage.

FIGURE 3.1.1 Neo-6m GPS Module


3.1.2 Features and Specifications of Neo-6m GPS Module:
 GPS Receiver: 50-channel u-blox 6 positioning engine.
 Antenna: Built-in 25 x 25 x 4mm ceramic antenna for strong satellite search
capability.
 Power Supply: Operates on 3-5V.
 Interface: RS232 TTL.
 Baud Rate: Default is 9600 bps, configurable from 4800 to 115200.
 Time to First Fix (TTFF): Under 1 second for hot starts, 27 seconds for cold starts.
 Position Accuracy: 2 meters and better with multiple good satellite signals.
 Velocity Accuracy: 0.1 m/s.
 Operating Temperature: -40°C to 85°C.
 Operating Current: 45mA.

Department of Electronics and Communication Engineering, VIIT(A) 6


Automated Pothole and Road Irregularity Detection for Driver Safety

 EEPROM: Built-in for saving configuration parameter data.


 Mounting Holes: 3mm diameter.
 Dimensions: 36mm (1.42\") x 25.8mm (1.02\") x 4mm (0.16\")
 Antenna Dimensions: 25.5mm (1\") x 25.5mm (1\") x 8.8mm (0.35\")
 Weight: 17.6g (0.6oz)

3.1.3 Applications:

 Navigation: Suitable for applications requiring accurate location tracking.


 Robotics: Can be used for autonomous navigation and path following.
 IoT: Suitable for applications where GPS data is needed.

3.2 RASPBERRY PI CAMERA MODULE:


3.2.1 Introduction to Raspberry Pi Camera Module:

The Raspberry Pi Camera Board is a custom designed add-on module for


Raspberry Pi hardware. It attaches to Raspberry Pi hardware through a
custom CSI interface. The sensor has 5-megapixel native resolution in still
capture mode. In video mode it supports capture resolutions up to 1080p at 30
frames per second.

FIGURE 3.2.1 Raspberry with Pi camera

Department of Electronics and Communication Engineering, VIIT(A) 7


Automated Pothole and Road Irregularity Detection for Driver Safety

3.2.2 Features of Raspberry Pi Camera Module:

 Compatible with Raspberry Pi 4 Model B/3B+/3B/2B/Zero Wireless


 5 Megapixel OV5647 Camera
 Camera specifications
1) Static Images Resolution: 2592×1944
2) Supported Video Resolution: 1080p/30 fps, 720p/ 60fps and 640 x480p 60/90
video recording
3) Aperture (F): 1.8
4) Visual Angle: 65 degree
 Dimension: 24mmx23.5mmx8mm
 Weight: 3g
 Interface: CSI connector
 Supported OS: Raspbian (latest version recommended)

3.3 RASPBERRY PI 4 MODEL B:

3.3.1 Introduction:

The Raspberry Pi 4 Model B (Pi4B) is the first of a new generation of Raspberry Pi


computers supporting more RAM and with significantly enhanced CPU, GPU and
I/O performance in a similar form factor, power envelope and cost as the previous
generation Raspberry Pi 3B+. The Pi4B is available with 1, 2, 4, or 8 gigabytes of
LPDDR4 SDRAM.

FIGURE 3.3.1 Raspberry Pi 4 Model B


3.3.2 Features:

 Quad core 64-bit ARM-Cortex A72 running at 1.5GHz.


 1, 2 and 4 Gigabyte LPDDR4 RAM options.

Department of Electronics and Communication Engineering, VIIT(A) 8


Automated Pothole and Road Irregularity Detection for Driver Safety

 H.265 (HEVC) hardware decode (up to 4Kp60).


 H.264 hardware decode (up to 1080p60).
 VideoCore VI 3D Graphics.
 Supports dual HDMI display output up to 4Kp60.
 802.11 b/g/n/ac Wireless LAN. • Bluetooth 5.0 with BLE.
 1x SD Card.
 2x micro-HDMI ports supporting dual displays up to 4Kp60 resolution.
 2x USB2 ports.
 2x USB3 ports.
 1x Gigabit Ethernet port (supports PoE with add-on PoE HAT).
 1x Raspberry Pi camera port (2-lane MIPI CSI).
 1x Raspberry Pi display port (2-lane MIPI DSI).
 28x user GPIO supporting various interface options: – Up to 6x UARTUp to 6x
I2C – Up to 5x SPI – 1x SDIO interface – 1x DPI (Parallel RGB Display) – 1x
PCM – Up to 2x PWM channels – Up to 3x GPCLK outputs.
 ARMv8 Instruction Set.
 Mature Linux software stack.
 Actively developed and maintained.
 Recent Linux kernel support.
 Many drivers upstreamed.
 Stable and well supported userland.
 Availability of GPU functions using standard APIs.

3.3.3 Ports:

 USB ports — these are used to connect a mouse and keyboard. You can also
connect other components, such as a USB drive.
 SD card slot — you can slot the SD card in here. This is where the operating
system software and your files are stored.
 Ethernet port — this is used to connect Raspberry Pi to a network with a cable.
Raspberry Pi can also connect to a network via wireless LAN.
 Audio jack — you can connect headphones or speakers here.

Department of Electronics and Communication Engineering, VIIT(A) 9


Automated Pothole and Road Irregularity Detection for Driver Safety

FIGURE 3.3.2 Ports of Raspberry Pi


 HDMI port — this is where you connect the monitor (or projector) that
you are using to display the output from the Raspberry Pi. If your monitor
has speakers, you can also use them to hear sound.
 Micro USB power connector — this is where you connect a power
supply. You should always do this last, after you have connected all your
other components.
 GPIO ports — these allow you to connect electronic components such as
LEDs and buttons to Raspberry Pi.

3.3.4 POWER REQUIREMENTS:

It requires a good quality USB-C power supply capable of delivering5V at 3A. If


attached downstream USB devices consume less than 500mA, a 5V, 2.5A supply may
be used. Higher power supply when provided can cause permanent damage to the
device.

3.3.5 PERIPHERALS:
 GPIO Interface: The Pi4B makes 28 BCM2711 GPIOs available via a standard
Raspberry Pi 40-pin header.
 GPIO Pin Layout: As well as being able to be used as straightforward software
controlled input and output (with programmable pulls), GPIO pins can be
switched (multiplexed) into various other modes backed by dedicated peripheral
blocks such as I2C, UART and SPI. In addition to the standard peripheral options,
it has extra I2C, UART and SPI peripherals as further MUX option.

Department of Electronics and Communication Engineering, VIIT(A) 10


Automated Pothole and Road Irregularity Detection for Driver Safety

FIGURE 3.3.3 GPIO Pin Layout of Raspberry Pi.

 Display Parallel Interface (DPI): A standard parallel RGB (DPI) interface is


available for the GPIOs. This up-to-24-bit parallel interface can support a
secondary display.
 SD/SDIO Interface: The Pi4B has a dedicated SD card socket which supports
1.8V, DDR50 mode (at a peak bandwidth of 50 Megabytes / sec). In addition, a
legacy SDIO interface is available on the GPIO pins.
 Camera and Display Interfaces: The Pi4B has 1x Raspberry Pi 2-ane MIPI CSI
Camera and 1x Raspberry Pi 2-lane MIPI DSI.
 Display connector. These connectors are backwards compatible with legacy
Raspberry Pi boards, and support all of the available Raspberry Pi camera and
display peripherals.
 USB: The Pi4B has 2x USB2 and 2x USB3 type-A sockets. Downstream USB
current is limited to approximately 1.1A in aggregate over the four sockets.
 HDMI: The Pi4B has 2x micro-HDMI ports, both of which support CEC and
HDMI 2.0 with resolutions up to 4Kp60.
 Audio and Composite (TV Out): The Pi4B supports near-CD-quality analogue
audio output and composite TV-output via a 4-ring TRS ’A/V’ jack. The analog
audio output can drive 32 Ohm headphones directly.
 Temperature Range and Thermals: The recommended ambient operating
temperature range is 0 to 50 degrees Celsius. To reduce thermal output when
idling or under light load, the Pi4B reduces the CPU clock speed and voltage.

Department of Electronics and Communication Engineering, VIIT(A) 11


Automated Pothole and Road Irregularity Detection for Driver Safety

During heavier load the speed and voltage (and hence thermal output) are
increased. The internal governor will throttle back both the CPU speed and voltage
to make sure the CPU temperature never exceeds 85 degrees C. The Pi4B will
operate perfectly well without any extra cooling and is designed for sprint
performance - expecting a light use case on average and ramping up the CPU
speed when needed (e.g. when loading a webpage). If a user wishes to load the
system continually or operate it at a high temperature at full performance, further
cooling may be needed.

3.3.6 VIRTUAL ENVIRONMENT IN RASPBERRY PI:

A virtual environment is a tool that helps to keep dependencies required by different


projects separate by creating isolated Python virtual environments for them. This is
one of the most important tools that most Python developers use.A virtual
Environment should be used whenever you work on any Python-based project. It is
generally good to have one new virtual environment for every Python-based project
you work on. So the dependencies of every project are isolated from the system and
each other. It is also easy to share the files from one device to other device without the
hassle of installing the packages again and again.

1) Creation:

Python has a command for creation of virtual environment which varies between
different OSs, as our raspberry pi runs on Linux the command that we use is: python -
m venv /path/to/new/virtual/environment Once created we can observe that it creates
a file based on the name specified by us in the command.

Fig.3.3.4: Creation of Virtual Environment

Department of Electronics and Communication Engineering, VIIT(A) 12


Automated Pothole and Road Irregularity Detection for Driver Safety

2) Activation:

After creation to work in the created virtual environment we have to activate it. To
activate it we have a command which also differs between different OS, the command
that we use is:
source <venv>/bin/activate
After this we can observe that our virtual environment is activated. Here after
activation we can install packages into it using the command:
python -m pip install <module name>

FIGURE 3.3.5 Activation of Virtual Environment

3) Deactivation:

Once activated if we want to deactivate our virtual environment we can simply enter
the command ‘deactivate’ into the terminal and the virtual environment deactivates.

FIGURE 3.3.6 Deactivation of Virtual Environment

Department of Electronics and Communication Engineering, VIIT(A) 13


Automated Pothole and Road Irregularity Detection for Driver Safety

3.3.7 Initialisation of Raspberry Pi:

Installation of OS: To install the OS into our Raspberry pi we use an application


called Raspberry pi imager which has to be installed into our PC. Once installed we
have to take an SD card along with a card reader and connect it to ourPC. After that
open the pi imager application.

FIGURE 3.3.7 Raspberry Pi Imager

Now, choose the device as raspberry pi 4 and select the Debian bookworm OS and
install the 64-bit version, when storage is selected it shows the SD card that we
connected to our PC select it and click on next.

FIGURE 3.3.8 Different OS available in pi imager

then a dialog box pops up asking if we want to customize the OS settings, click on
‘edit settings’. After that another window pops up for OS customization, there we set

Department of Electronics and Communication Engineering, VIIT(A) 14


Automated Pothole and Road Irregularity Detection for Driver Safety

our username and password of our user in Raspberry pi along with it we can also
configure the wireless LAN.

FIGURE 3.3.9 OS Customization

FIGURE 3.3.10 Dialog box to customize OS

After this, click on Services and click on enable SSH and select ‘Use password
authentication’, then click Save. Once done, the OS is written into the SD card. Later
we remove the SD card from the card reader and place it in Raspberry Pi

3.3.8 Activation of VNC Viewer:

VNC Viewer is an application which allows to operate a device which is connected in


a LAN network through another device which is connected in the same LAN network,
but in our case to do so we have to enable the VNC in our Raspberry Pi, now this can
be done in two ways either we can connect a desktop, mouse and keyboard to our
Raspberry pi and perform it directly or we can do it virtually using Putty application.

Department of Electronics and Communication Engineering, VIIT(A) 15


Automated Pothole and Road Irregularity Detection for Driver Safety

After accessing we have to open a terminal an enter the command “sudoraspi-config”


which evokes the software configuration tools, in that window, use the arrow keys to
select Interfacing Options and press Enter.

FIGURE 3.3.11 Raspberry Pi software configuration tool

Use the arrow keys to select VNC and press Enter.You will be prompted to enable
VNC Server. Select Yes and press Enter.

FIGURE 3.3.12 Interfacing options

FIGURE 3.3.13 VNC viewer activation

Department of Electronics and Communication Engineering, VIIT(A) 16


Automated Pothole and Road Irregularity Detection for Driver Safety

Use the arrow keys to select Ok and then Finish, to return to the terminal. After
setting it up, we have to reboot the system for it to implement. Later, Install VNC
Viewer in your PC and login to it and a window appears. Here, Enter the IP address of
the network connected to your Raspberry pi and we will be able to operate it on our
PC

FIGURE 3.3.14 Raspberry Pi Desktop

3.4 ESP8266 MICROCONTROLLER


3.4.1 Introduction ESP8266 NodeMCU:
The NodeMCU ESP8266 is a low-cost, open-source Wi-Fi development board based
on the ESP8266 microcontroller. It is widely used for IoT (Internet of Things)
projects, allowing devices to connect to the internet and communicate wirelessly.

FIGURE 3.4.1 ESP8266 NodeMCU


3.4.2 Features of ESP8266 NodeMCU:

 Wi-Fi Connectivity: Built-in Wi-Fi module for wireless communication.

 Microcontroller: Based on the ESP8266 chip with a 32-bit processor.

 Operating Voltage: 3.3V

 GPIO Pins: ~11 General Purpose Input/Output (GPIO) pins.

 ADC Pin: 1 Analog-to-Digital Converter (ADC) pin.

 PWM Support: Pulse Width Modulation for controlling LEDs, motors, etc.

Department of Electronics and Communication Engineering, VIIT(A) 17


Automated Pothole and Road Irregularity Detection for Driver Safety

 UART, SPI, I2C Protocols: Used for serial communication with other devices.

 USB-to-Serial Interface: Onboard CP2102 or CH340 chip for easy programming.

 Flash Memory: 4MB of memory for storing programs and data.

 Power Consumption: Low-power design for battery-operated applications.

3.4.3 Pin description:

FIGURE 3.4.2 Pinout diagram


Power Pins There are four power pins. VIN pin and three 3.3V pins.

VIN can be used to directly supply the NodeMCU/ESP8266 and its peripherals.
Power delivered on VIN is regulated through the on board regulator on the NodeMCU
module – you can also supply 5V regulated to the VIN pin.3.3V pins are the output of
the on board voltage regulator and can be used to supply power to external
components. GND are the ground pins of NodeMCU/ESP8266

I2C Pins are used to connect I2C sensors and peripherals. Both I2C Master and I2C
Slave are supported. I2C interface functionality can be realized programmatically, and
the clock frequency is 100 kHz at a maximum. It should be noted that I2C clock
frequency should be higher than the slowest clock frequency of the slave device.

NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions such as


I2C, I2S, UART, PWM, IR Remote Control, LED Light and Button programmatically.
Each digital enabled GPIO can be configured to internal pull-up or pull-down, or set

Department of Electronics and Communication Engineering, VIIT(A) 18


Automated Pothole and Road Irregularity Detection for Driver Safety

to high impedance. When configured as an input, it can also be set to edge-trigger or


level-trigger to generate CPU interrupts.

The NodeMCU is embedded with a 10-bit precision SAR ADC. The two functions
can be implemented using ADC. Testing power supply voltage of VDD3P3 pin and
testing input voltage of TOUT pin. However, they cannot be implemented at the same
time.

NodeMCU/ESP8266 has 2 UART interfaces (UART0 and UART1) which provide


asynchronous communication (RS232 and RS485), and can communicate at up to 4.5
Mbps. UART0 (TXD0, RXD0, RST0 & CTS0 pins) can be used for communication.
However, UART1 (TXD1 pin) features only data transmit signal so, it is usually used
for printing log.

NodeMCU/ESP8266 features two SPIs (SPI and HSPI) in slave and master modes.
These SPIs also support the following general-purpose SPI features:

4 timing modes of the SPI format transfer, Up to 80 MHz and the divided clocks of 80
MHz, and up to 64-Byte FIFO

NodeMCU/ESP8266 features Secure Digital Input/output Interface (SDIO) which is


used to directly interface SD cards. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO
v2.0 are supported.

The board has 4 channels of Pulse Width Modulation (PWM). The PWM output can
be implemented programmatically and used for driving digital motors and LEDs.
PWM frequency range is adjustable from 1000 μs to 10000 μs (100 Hz and 1 kHz).

Control Pins are used to control the NodeMCU/ESP8266. These pins include Chip
Enable pin (EN), Reset pin (RST) and WAKE pin.

Tiny Sine Wave Control Pins are used to control the NodeMCU/ESP8266. These pins
include Chip Enable pin (EN), Reset pin (RST) and WAKE pin.

EN: The ESP8266 chip is enabled when EN pin is pulled HIGH. When pulled LOW
the chip works at minimum power.

RST: RST pin is used to reset the ESP8266 chip.

WAKE: Wake pin is used to wake the chip from deep-sleep.

Department of Electronics and Communication Engineering, VIIT(A) 19


Automated Pothole and Road Irregularity Detection for Driver Safety

3.5 L298N DRIVER MODULE:


3.5.1 Introduction to L298N driver module:
This L298N Motor Driver Module is a high power motor driver module for driving
DC and Stepper Motors. This module consists of an L298 motor driver IC and a
78M05 5V regulator. L298N Module can control up to 4 DC motors, or 2 DC motors
with directional and speed control.

FIGURE 3.5.1 L289N driver module


The L298N Motor Driver module consists of an L298 Motor Driver IC, 78M05
Voltage Regulator, resistors, capacitor, Power LED, 5V jumper in an integrated
circuit. 78M05 Voltage regulator will be enabled only when the jumper is placed.
When the power supply is less than or equal to 12V, then the internal circuitry will be
powered by the voltage regulator and the 5V pin can be used as an output pin to
power the microcontroller. The jumper should not be placed when the power supply is
greater than 12V and separate 5V should be given through 5V terminal to power the
internal circuitry.

3.5.2 Features of L298N driver module:


 Driver Model: L298N 2A
 Driver Chip: Double H Bridge L298N
 Motor Supply Voltage (Maximum): 46V
 Motor Supply Current (Maximum): 2A
 Logic Voltage: 5V
 Driver Voltage: 5-35V
 Driver Current:2A
 Logical Current:0-36mA

Department of Electronics and Communication Engineering, VIIT(A) 20


Automated Pothole and Road Irregularity Detection for Driver Safety

 Maximum Power (W): 25W


 Current Sense for each motor
 Heatsink for better performance
 Power-On LED indicator

3.6 Battery operated DC motor:


3.6.1 Introduction:
A BO DC Motor (Battery Operated DC Motor) is a small, lightweight, and low-power
DC motor commonly used in robotics, automation, and hobby electronics projects.
These motors are ideal for applications where low-speed, high-torque movement is
required.

FIGURE 3.6.1 BO DC motor


3.6.2 Features of BO DC motor:

 Voltage Rating: Typically operates on 3V to 12V.

 Current Consumption: Around 100mA – 300mA (depending on load).

 Speed: Ranges from 60 RPM to 300 RPM (varies with model).

 Torque: Provides enough torque for small robotic applications.

 Compact Size: Lightweight and easy to mount.

 Gear Reduction: Comes with an internal gearbox to increase torque.

 Low Power Consumption: Efficient for battery-powered projects.

Department of Electronics and Communication Engineering, VIIT(A) 21


Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 4
SOFTWARE IMPLEMENTATION

4.1 ALGORITHM FOR AUTOMATED POTHOLE AND ROAD


IRREGULARITY DETECTION FOR DRIVER SAFETY:

Step 1: Import Required Libraries

 cv2 (OpenCV) → Image processing


 numpy → Numerical operations
 pandas → Data storage (Excel)
 telegram → Sending alerts
 dropbox → Cloud storage
 Picamera2 → Capturing images
 serial → Reading GPS data
 DBSCAN → Clustering potholes

Step 2: Initialize System Variables

 Set up Telegram bot credentials.


 Define Dropbox API token for cloud storage.
 Configure GPS module (port & baud rate).
 Define a threshold for pothole detection.

Step 3: Capture Image

 Use Raspberry Pi Camera (Picamera2) to capture an image.


 Convert the image into a numpy array for processing.

Step 4: Read GPS Data

 Connect to GPS module via serial communication.


 Extract latitude and longitude from GPRMC data.

Step 5: Preprocess the Image

1. Convert the image to grayscale.

Department of Electronics and Communication Engineering, VIIT(A) 22


Automated Pothole and Road Irregularity Detection for Driver Safety

2. Apply histogram equalization to improve contrast.


3. Use median blur to remove noise.
4. Perform adaptive Canny edge detection to find edges.
5. Apply morphological closing to fill small gaps in edges.

Step 6: Detect Contours

 Find contours using cv2.findContours().


 Group nearby contours using DBSCAN clustering.

Step 7: Analyze Pothole Properties

For each detected pothole region:

 Compute bounding box (x, y, width, height).


 Calculate:
o Area
o Perimeter
o Aspect Ratio
o Circularity
o Solidity
 Filter clusters with at least 3 contours (to avoid noise).

Step 8: Save and Upload Data

 Draw bounding boxes around potholes.


 Save processed images locally.
 Upload images & pothole data to Dropbox.
 Save data in Excel (pothole_data.xlsx).
 Send a Telegram alert with pothole count & location.

Step 9: Display Results

 Show detected potholes on the image.


 If potholes exist → Save & send results.
 If no potholes detected → Notify via Telegram.

Department of Electronics and Communication Engineering, VIIT(A) 23


Automated Pothole and Road Irregularity Detection for Driver Safety

4.2 POTHOLE DETECTION USING DIFFERENT ALGORITHMS:

FIGURE 4.2.1 Pothole detected using different algorithms

FIGURE 4.2.2 Message sent to Telegram bot

4.2.1 Step by Step process:

1. Grayscale Conversion:

Purpose: Reduces the image complexity by converting the color image into asingle-
channel image representing intensity values (0-255).

Method: Use a suitable image processing library (e.g., OpenCV) to convert the image
to grayscale.

2. Median Blurring:

Purpose: Reduces noise and sharpens edges by smoothing the image.

Method: Apply a Median blur filter to the grayscale image, using a suitable kernel
size (e.g., 5x5 or 7x7).

3. Canny Edge Detection:

Purpose: Detects edges in the image by identifying abrupt changes in intensity.

Department of Electronics and Communication Engineering, VIIT(A) 24


Automated Pothole and Road Irregularity Detection for Driver Safety

Method:

a. Noise Reduction: Apply a median blur to reduce noise.


b. Gradient Calculation: Calculate the gradients (magnitude and direction) of the
image.
4. Contour Extraction:
Purpose: Find the boundaries of objects (in this case, potholes) in the image.

Method: Use a contour finding algorithm (e.g., OpenCV's cv2.findContours) to


identify the contours in the Canny edge-detected image.

5. Contour Clustering:

Purpose: Group nearby contours that likely belong to the same pothole.
Method: It uses DBSCAN to cluster contour center points based on spatial proximity,
helping to merge fragmented edges into unified pothole regions.

Department of Electronics and Communication Engineering, VIIT(A) 25


Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 5

DESIGN AND METHODOLGY

5.1 INTRODUCTION TO THE PROPOSED SYSTEM:


The proposed automated pothole detection system leverages a Raspberry Pi with a Pi
Camera and GPS module to capture road images, process them using OpenCV-based
computer vision techniques (including adaptive edge detection, contour clustering,
and geometric feature analysis), log pothole data (location, size, shape) in an Excel
file, upload processed images and reports to Dropbox, and send real-time alerts via
Telegram when potholes are detected, providing a portable, low-cost solution for road
condition monitoring.

Key Features:
Real-Time Pothole Detection: Uses adaptive Canny edge detection &
DBSCAN clustering for accurate identification.

GPS Tagging: Logs latitude & longitude of each pothole for precise location
tracking.

Automated Reporting: Stores pothole dimensions (area, perimeter,


circularity) in an Excel file.

Cloud Backup: Uploads processed images (grayscale, edges, highlighted


potholes) to Dropbox.

Instant Alerts: Sends Telegram notifications when potholes are detected.

Raspberry Pi-Powered: Low-cost, portable, and energy-efficient for vehicle-


mounted deployment.

Adaptive Thresholding: Adjusts detection parameters for varying


lighting/road conditions.

Morphological Filtering: Reduces noise and enhances pothole edges for


better accuracy.

Department of Electronics and Communication Engineering, VIIT(A) 26


Automated Pothole and Road Irregularity Detection for Driver Safety

5.2 SYSTEM ARCHITECTURE, BLOCK DIAGRAM AND


CIRCUIT DIAGRAM:

Hardware Components:

1. Raspberry Pi - Main processing unit

2. Pi Camera Module - For image capture (using Picamera2 library)

3. NEO-6M GPS Module - For location tracking (connected via UART)

4. Optional: Vehicle Mount - For mobile deployment

Software Components:

1. Computer Vision Pipeline - OpenCV-based image processing

2. GPS Data Acquisition - Serial communication with GPS module

3. Cloud Integration - Dropbox for data storage

4. Notification System - Telegram bot for alerts

Methodology:

1. Image Acquisition

 Uses Picamera2 to capture 640×480 resolution images


 Images are stored in memory as byte streams before processing

2. Preprocessing Pipeline

 Grayscale Conversion: Convert color image to single-channel


grayscale

 Histogram Equalization: Enhance contrast for better feature


detection

 Median Blurring: (5×5 kernel) to reduce noise while preserving


edges

3. Edge Detection

 Adaptive Canny Edge Detection:

Automatically calculates thresholds based on image median


intensity

Department of Electronics and Communication Engineering, VIIT(A) 27


Automated Pothole and Road Irregularity Detection for Driver Safety

Uses sigma value (0.33) to determine lower/upper bounds

 Morphological Closing: (5×5 kernel) to connect broken edges

4. Contour Analysis

 Contour Detection: Finds all external contours in edge image

 Contour Clustering:
Uses DBSCAN algorithm to group nearby contours
 Parameters: max_distance=30px, min_samples=1

 Cluster Filtering:

Only considers clusters with ≥3 contours as potential potholes


Merges contours within clusters using convex hull

5. Feature Extraction

For each detected pothole:

Geometric Features:

 Bounding box coordinates (x,y,width,height)


 Area and perimeter
 Aspect ratio (width/height)
 Circularity (4π·area/perimeter²)
 Solidity (area/convex hull area)
 Temporal Feature: Timestamp of detection
 Spatial Feature: GPS coordinates (latitude/longitude)

6. Data Management

Local Storage:

 Processed images (original, grayscale, blurred, edges)


 Excel file with all pothole metrics
 Cloud Synchronization:
 Automatic upload to Dropbox (in 'potholeAll' folder)
 Local files deleted after successful upload

Department of Electronics and Communication Engineering, VIIT(A) 28


Automated Pothole and Road Irregularity Detection for Driver Safety

Alert System:

 Telegram notifications with detection summary


 Includes pothole count and location

7. GPS Integration

 Parses NMEA GPRMC sentences from serial port


 Converts DMM format to decimal degrees
 Handles invalid/absent GPS data gracefully

 Marks data with (0,0) coordinates if GPS unavailable

5.3 BLOCK DIAGRAM OF THE PROPOSED SYSTEM:

FIGURE 5.3.1 Block diagram of proposed detection system

5.4 BLOCK DIAGRAM EXPLANATION:

1. Pi Camera

 Description: Refers to the Raspberry Pi Camera Module (v1 or v2), connected


via the CSI (Camera Serial Interface) port.
 Function: Captures real-time images/video for processing.
 Key Features:
o Supports HD resolution (e.g., 1080p or 8MP stills).
o Used for computer vision tasks (object detection).

Department of Electronics and Communication Engineering, VIIT(A) 29


Automated Pothole and Road Irregularity Detection for Driver Safety

2. Raspberry Pi

 Description: The central processing unit (likely a model like RPi 3B+/4/5)
running Linux.
 Function: Executes OpenCV scripts and manages peripheral communication.
 Key Features:
o Runs Python/OpenCV for image processing.
o Connects to Wi-Fi/Bluetooth for data transmission.

3. OpenCV & Image Processing

 Description: Software block using the OpenCV library (Open Source


Computer Vision).
 Function: Processes camera input for tasks like:
o Edge detection, color filtering, contour tracking.
o AI-based analysis (e.g., TensorFlow Lite for ML).
 Key Features:
o Real-time video analysis.
o Integration with Python/C++.

4. Telegram

 Description: A cloud-based messaging app used as an alert/notification system.


 Function: Sends processed data (e.g., detected objects, alerts) to users via
Telegram Bot API.
 Key Features:
o Instant remote notifications.
o Low-code integration (Python python-telegram-bot library).

5. Dropbox

 Description: Cloud storage service for data logging.


 Function: Stores processed images/video or sensor data for backup/analysis.
 Key Features:
o Automated uploads via Dropbox API.

Department of Electronics and Communication Engineering, VIIT(A) 30


Automated Pothole and Road Irregularity Detection for Driver Safety

o Accessible from anywhere.

6. GPS Module

 Description: Hardware module (e.g., NEO-6M) for geolocation tracking.


 Function: Adds location metadata to captured images/alerts (e.g., wildlife
tracking).
 Key Features:
o UART communication with RPi.
o Latitude/Longitude logging.

5.5 CIRCUIT DIAGRAM:

FIGURE 5.5.1 Circuit Diagram

5.5.1 Description of the Pothole Detection System Circuit Diagram:

The circuit diagram represents a pothole detection system based on a Raspberry Pi


4B, integrated with various sensors and modules for efficient real-time road condition
monitoring. Below is a detailed breakdown of the components and their roles in the
system:

Department of Electronics and Communication Engineering, VIIT(A) 31


Automated Pothole and Road Irregularity Detection for Driver Safety

a) Raspberry Pi 4B:
 Acts as the central processing unit, handling data acquisition, image processing,
and communication.
 Connects to all peripheral modules, including the camera, GPS module, and
network interface for cloud communication.
b) Raspberry Pi Camera V2:
 Captures real-time images of the road surface to identify potholes using computer
vision and machine learning techniques.
 The captured images are processed using OpenCV algorithms to detect road
irregularities.
c) GPS Module:
 The GPS module collects real-time location data of detected potholes.
 The GPS module facilitates data transmission to a cloud database or central server,
allowing authorities to monitor road conditions remotely.
d) CAT5 LAN Cable with RJ45 Connector:
 Provides network connectivity, allowing real-time data transfer to cloud-based
applications or a local monitoring system.
 Ensures fast and stable communication between the Raspberry Pi and external
systems.
e) USB-C Power Cable:
Supplies power to the Raspberry Pi 4B, ensuring uninterrupted system operation.

FIGURE 5.5.2 Circuit diagram of Robotic car

Department of Electronics and Communication Engineering, VIIT(A) 32


Automated Pothole and Road Irregularity Detection for Driver Safety

5.5.2 Description of Robotic Car Circuit Diagram


The circuit depicts a motor control setup using an L298N motor driver and a
NodeMCU microcontroller, powered by a 9V battery.
Components:
 ESP8266 NodeMCU: A microcontroller with Wi-Fi capabilities for
controlling the motors.
 L298N Motor Driver: Used for driving DC motors. It has four output
terminals (OUT1 to OUT4) for connecting to two motors.
 DC Motors: Four motors are connected to the L298N driver via the output
terminals.
 Power Supply: A 9V battery supplies power to the circuit.
Connections:
 Motor Connections:
Motor 1,2 is connected to OUT1 and OUT2 of the L298N.
Motor 3,4 is connected to OUT3 and OUT4 of the L298N.
 Power Connections: The 9V battery connects to the L298N motor driver,
supplying power to the driver (12V GND and 5V pins).
 NodeMCU Connections: Control pins from the NodeMCU are connected to
the L298N.Digital pins are used to control OUT1 to OUT4 (usually from
GPIOs of NodeMCU).
 Ground Connections: The ground (GND) from the battery, L298N, and
NodeMCU are commonly connected to ensure proper function.

Department of Electronics and Communication Engineering, VIIT(A) 33


Automated Pothole and Road Irregularity Detection for Driver Safety

5.6 FLOWCHART:

FIGURE 5.6.1 Flowchart

Department of Electronics and Communication Engineering, VIIT(A) 34


Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 6

TESTING AND EXPERIMENTAL RESULTS

6.1 CIRCUIT CONNECTIONS:

This pothole detection project demonstrates a robust and practical approach to


automated road condition monitoring. By combining image processing techniques
(grayscale conversion, adaptive edge detection, and contour clustering) with GPS
geotagging and cloud-based data storage, the system effectively identifies potholes
while minimizing false positives through DBSCAN clustering and geometric feature
analysis (circularity, solidity). The implementation excels in data collection,
automatically documenting each detection's location, dimensions, and timestamp
while providing visual evidence through multiple processed image versions. The
Telegram integration offers real-time alerts, making it suitable for maintenance crews.
While the system handles varying lighting conditions well through histogram
equalization and adaptive thresholds, its accuracy may be affected by extreme weather
or heavily cracked road surfaces. The modular design allows for easy adjustments to
detection sensitivity and could be extended with machine learning for improved
classification.

FIGURE 6.1.1 Circuit Connections

Department of Electronics and Communication Engineering, VIIT(A) 35


Automated Pothole and Road Irregularity Detection for Driver Safety

6.2 POTHOLE DETECTION:

By converting the image to grayscale, applying histogram equalization to enhance


contrast, and using a median blur to reduce noise, the system prepares the image
efficiently for edge detection. The use of adaptive Canny edge detection followed by
morphological closing helps ensure that only significant, well-formed edges are
captured (see Fig. 6.2.1). This pre-processing pipeline contributes to a relatively
accurate contour detection process, allowing the system to focus on potential pothole
shapes. Contours extracted from the image are grouped using DBSCAN clustering,
which is well-suited for separating closely located features that may represent
different potholes. The system then calculates geometric descriptors like area,
perimeter, aspect ratio, circularity, and solidity to filter out false positives and ensure
that only meaningful shapes resembling potholes are retained. This ensures that only
clusters with sufficient contour complexity and resemblance to pothole characteristics
are considered valid, helping to improve precision.

FIGURE 6.2.1 Detection of Potholes.

6.3 DROPBOX EXCEL SHEET:


Furthermore, the integration with Dropbox allows the system to automatically upload
processed images and datasets, ensuring centralized storage and remote access.(see
Fig. 6.3.1) Notifications sent via Telegram provide real-time updates, making the
system highly suitable for live road monitoring or municipal use.

Department of Electronics and Communication Engineering, VIIT(A) 36


Automated Pothole and Road Irregularity Detection for Driver Safety

FIGURE 6.3.1 Results Stored in Dropbox data sheet

6.4 MESSAGES SENT THROUGH TELEGRAM BOT:


A Telegram alert is triggered in real-time, informing you of, number of potholes
detected, their exact coordinates and time of detection (see Fig. 6.4.1). This
integration makes the system suitable for, remote monitoring and automated alerts

FIGURE 6.4.1 Messages sent through Telegram Bot

Department of Electronics and Communication Engineering, VIIT(A) 37


Automated Pothole and Road Irregularity Detection for Driver Safety

CHAPTER 7

CONCLUSION AND FUTURE SCOPE

7.1 CONCLUSION:
This project successfully demonstrates the feasibility and effectiveness of the
proposed system in addressing the identified problem. By integrating innovative
approaches, it balances theoretical concepts with practical applications, resulting in
improved efficiency, accuracy, and usability. The challenges encountered during
development provided valuable learning experiences, enhancing problem-solving
skills and fostering a deeper understanding of the subject. The system's design ensures
reliability and scalability, allowing it to adapt to evolving requirements and
technological advancements. Furthermore, its impact extends across various domains,
offering benefits such as automation, cost reduction, time efficiency, and enhanced
user experience. The insights gained from this project highlight the importance of
continuous research, testing, and refinement to further optimize performance and
expand its scope of application. Overall, this project marks a significant step toward
innovation and digital transformation, paving the way for future advancements that
can contribute to both academic and industrial sectors.

7.2 FUTURE SCOPE:


The project can be further extended to multiple ways like
1) Integration with Autonomous Vehicles:
The system can be adapted for use in autonomous vehicles to enhance their navigation
and safety features by providing real-time pothole detection and avoidance
capabilities.
2) Expanded Road Anomaly Detection:
Extend the system to detect other roads anomalies such as cracks, speed bumps, and
debris, providing a more comprehensive road condition monitoring solution.
3) Real Time alerts via Mobile Apps:
Develop a dedicated mobile application to provide real-time alerts to drivers,
including visual and audio warnings and suggest alternative routes to avoid potholes.

Department of Electronics and Communication Engineering, VIIT(A) 38


Automated Pothole and Road Irregularity Detection for Driver Safety

4) Integration with Traffic Management Systems:


Link the system with traffic management centres to dynamically adjust traffic signals
or speed limits in areas with detected road hazards, improving overall traffic safety.

7.3 APPLICATIONS:
1. Smart City Infrastructure – Automated road monitoring for municipal maintenance
teams.
2. Autonomous Vehicles – Real-time road hazard alerts for self-driving cars.
3. Fleet Management – Route optimization for logistics companies to avoid pothole
damage.
4.Government Audits – Data-driven reporting for road repair budgets and
accountability.
5. GPS Navigation Apps – Live pothole alerts (e.g., Google Maps/Waze integration).

Department of Electronics and Communication Engineering, VIIT(A) 39


Automated Pothole and Road Irregularity Detection for Driver Safety

APPENDIX

Department of Electronics and Communication Engineering, VIIT(A) 40


Automated Pothole and Road Irregularity Detection for Driver Safety

GEO TAG IMAGE

P568+879, Block D, Visakhapatnam, Andhra


Pradesh 531021, India
Lat 17.710852° Long 83.165694°

FIGURE: GEO TAG Photo

Department of Electronics and Communication Engineering, VIIT(A) 41


Automated Pothole and Road Irregularity Detection for Driver Safety

REFERENCES

[1] Bidve, Vijaykumar S., et al. "Pothole detection model for road safety using
computer vision and machine learning." Int J Artif Intell ISSN 2252.8938: 4481.
[2] Fan, Rui, et al. "Pothole detection based on disparity transformation and road
surface modeling." IEEE Transactions on Image Processing 29 (2019): 897-908.
[3] Chen, Dong, et al. "Real-time road pothole mapping based on vibration analysis in
smart city." IEEE Journal of selected topics in applied Earth observations and
remote sensing 15 (2022): 6972-6984
[4] Cheng, Ming, et al. "Extraction and classification of road markings using mobile
laser scanning point clouds." IEEE Journal of Selected Topics in Applied Earth
Observations and Remote Sensing 10.3 (2016): 1182-1196.
[5] Li, Wenda, Michael Burrow, and Zijun Li. "Automatic road condition assessment
by using point laser sensor." 2018 IEEE SENSORS. IEEE, 2018.
[6] Bhavana, N., et al. "POT-YOLO: Real-Time Road Potholes Detection using Edge
Segmentation based Yolo V8 Network." IEEE Sensors Journal (2024).
[7] Z. Hou, K. C. P. Wang, and W. Gong, “Experimentation of 3D pavement imaging
through stereovision,” in International Conference on Transportation Engineering
2007, ICTE 2007, 2007, pp. 376–381, doi: 10.1061/40932(246)62.
[8] H. Lokeshwor, L. K. Das, and S. Goel, “Robust method for automated
segmentation of frames with/without distress from road surface video clips,” J.
Transp. Eng., vol. 140, no. 1, pp. 31–41, Jan. 2014, doi: 10.1061/(ASCE)TE.1943-
5436.0000564.
[9] A. Mednis, G. Strazdins, R. Zviedris, G. Kanonirs, and L. Selavo, “Real time
pothole detection using Android smartphones with accelerometers,” in 2011
International Conference on Distributed Computing in Sensor Systems and
Workshops, DCOSS’11, 2011, doi: 10.1109/DCOSS.2011.5982206.
[10] R. S. Shaikh Patil Pallavi and S. S. Priyanka Khan Aabid A, “Detection of
Potholes, Humps and Measuring Distance between Two Vehicles using Ultrasonic
Sensor and Accelerometer,” GRD Journals-Global Res. Dev. J. Eng., vol. 3, no. 6,
2018.

Department of Electronics and Communication Engineering, VIIT(A) 42


Automated Pothole and Road Irregularity Detection for Driver Safety

[11] Kim, Taehyeong, and Seung-Ki Ryu. "Review and analysis of pothole
detection methods." Journal of Emerging Trends in Computing and Information
Sciences 5.8 (2014): 603-608.
[12] Kim, Young-Mok, et al. "Review of recent automated pothole-detection
methods." Applied Sciences 12.11 (2022): 5320.
[13] Koch, Christian, and Ioannis Brilakis. "Pothole detection in asphalt pavement
images." Advanced engineering informatics 25.3 (2011): 507-515.
[14] Fan, Rui, et al. "Pothole detection based on disparity transformation and road
surface modeling." IEEE Transactions on Image Processing 29 (2019): 897-908.
[15] Kang, Byeong-ho, and Su-il Choi. "Pothole detection system using 2D LiDAR
and camera." 2017 ninth international conference on ubiquitous and future
networks (ICUFN). IEEE, 2017.
[16] Zhang, Zhen, et al. "An efficient algorithm for pothole detection using stereo
vision." 2014 IEEE International Conference on Acoustics, Speech and Signal
Processing (ICASSP). IEEE, 2014.
[17] Bučko, Boris, et al. "Computer vision based pothole detection under
challenging conditions." Sensors 22.22 (2022): 8878.
[18] Tsai, Yi-Chang, and Anirban Chatterjee. "Pothole detection and classification
using 3D technology and watershed method." Journal of Computing in Civil
Engineering 32.2 (2018): 04017078.
[19] Pandey, Anup Kumar, et al. "Convolution neural networks for pothole
detection of critical road infrastructure." Computers and Electrical
Engineering 99 (2022): 107725.
[20] Kulkarni, Aniket, et al. "Pothole detection system using machine learning on
Android." International Journal of Emerging Technology and Advanced
Engineering 4.7 (2014): 360-364.

Department of Electronics and Communication Engineering, VIIT(A) 43


Automated Pothole and Road Irregularity Detection for Driver Safety

BIBLIOGRAPHY

REFERNCE WEBSITES:

1. https://www.raspberrypi.com/documentation/computers/getting-started.html
2. https://www.electronicwings.com/raspberry-pi/gps-module-interfacing-with
raspberry-pi
3. https://www.raspberrypi.com/documentation/accessories/camera.html
4. https://www.make-it.ca/nodemcu-details-specifications/
5. https://components101.com/modules/l293n-motor-driver-module

Department of Electronics and Communication Engineering, VIIT(A) 44


Automated Pothole and Road Irregularity Detection for Driver Safety

Project Title: Automated Pothole and Road Irregularity Detection for Driver Safety
Batch No: A7
Student Names: 1. A. Tanush Kumar - (21L31A0407)
2. A. Karthik - (21L31A0405)
3. D.K.V. Varma - (21L31A0433)
4. G. Srilakshmi Manasa - (21L31A0443)

Project Course Outcomes:

CO1: Understand about embedded system and Raspberry Pi, learn how to implement
image processing using OpenCV in Raspberry pi.

CO2: Detect potholes in captured images using image processing techniques and
OpenCV, analysing shape, texture, and depth.

CO3: Store pothole images, location data, and timestamps in a cloud database for
efficient retrieval and analysis.
CO4: Send real-time pothole alerts to users and authorities via social messaging apps,
ensuring timely road maintenance

CO-PO Mapping:
PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2

CO1 3 3 1 2 - - - - - - - - - 3

CO2 - - 3 3 3 2 - 3 3 - 2 - 2 3

CO3 - - 3 - 3 2 - 3 1 3 2 - - 3

CO4 - - 3 - 3 1 - 3 1 3 1 - - 3

Team Leader Signature Signature of the Project guide


Dr. H. Devanna
Associate Professor
Department of ECE, VIIT (A)

Department of Electronics and Communication Engineering, VIIT(A) 45

You might also like