Enhancing Security Measures through Colour Detection Algorithm
Implemented with ESP32 Cam
Vishwas D S
1 a
, Tanveer M Ahmad
1
b
, Manikanta Gopisetti
1 c
,
Harshitha M
1 d
, Ashwini R
1 e
,
Chandan Kumar K M
1 f
, Narasana Gowda
1 g
1
Electrical and Electronics Engineering Department, Dayananda Saagar College of Engineering, Bengaluru, Karnataka,
India
harshithaharshu068@gmail.com, ashwinir1006@gmail.com, chandanchandan51218@gmail.com,
narasanagowda23@gmail.com
Keywords: Drone Detection; UAV Detection ESP32.
Abstract: Drones, unmanned aerial vehicles (UAVs), have gained widespread use in various domains such as food
delivery, photography, and surveillance. However, their deployment in capturing information from unknown
areas at borders raises unethical behaviors. To address this issue, in this study an approach has been proposed
for detecting the object with respect to its color which plays very prominent and important role in security
purpose, air surveillance, etc.This study proposes the implementation of a color detection algorithm using
ESP32 CAM, an embedded system equipped with a camera module. This research contributes to enhancing
security measures and mitigating the unethical use of drones. The color detection algorithm aims to identify
specific colors associated with unethical drone behaviors, such as unauthorized surveillance or intrusion. By
analyzing the captured images or video frames, the algorithm detects the presence of predefined colors and
triggers appropriate actions, such as sending alerts or activating counter measures. The ESP32 CAM offers
significant advantages for this application, including its powerful processing capabilities, integrated Wi-Fi
and Bluetooth connectivity, and compact form factor. These features enable real-time color detection and
facilitate seamless integration with other security systems or networks. By leveraging the ESP32 CAM's
capabilities, the proposed color detection technique enhances the ability to detect and prevent unethical drone
behaviors. It provides a proactive approach to identify potential threats and take timely actions to mitigate
risks associated with drone misuse.
1 INTRODUCTION
Drones have become a source of concern due to
privacy violations, particularly in military and border
contexts where unidentified drones from objects
present challenges. To overcome these limitations,
unknown areas pose a spying threat. Ensuring
security in such scenarios necessitates the proper
implementation of technology, including
_______________________________________
a
https://orcid.org/0009-0004-1678-7191
b
https://orcid.org/0009-0007-2065-3032
c
https://orcid.org/0000-0002-2002-0020
d
https://orcid.org/0009-0003-6515-4086
e
https://orcid.org/0009-0008-6228-1414
f
https://orcid.org/0009-0005-6476-6448
g
https://orcid.org/0009-0002-7687-8808
radars and counter-Unmanned Aerial Vehicle (UAV)
systems, have been employed for drone detection and
mitigation However, these solutions often have
limitations in detecting stationary objects. While
radar systems are commonly used in military aircraft
for target identification and navigation, their limited
range and inability to detect stationary additional
security systems such as counter-UAS technology
and drone monitoring equipment are employed. The
color detection technique complements these systems
by efficiently identifying malicious objects,
enhancing reliability, and reducing reliance on radar-
based approaches.
By incorporating color detection into the existing
radar and counter-UAV systems, the proposed
approach provides a more comprehensive and
accurate means of identifying and tracking drones.
While radars and counter-UAV systems primarily rely
74
D S, V., M Ahmad, T., Gopisetti, M., M, H., R, A., Kumar K M, C. and Gowda, N.
Enhancing Security Measures Through Colour Detection Algorithm Implemented With ESP32 Cam.
DOI: 10.5220/0012507500003808
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 1st International Conference on Intelligent and Sustainable Power and Energy Systems (ISPES 2023), pages 74-79
ISBN: 978-989-758-689-7
Proceedings Copyright © 2024 by SCITEPRESS Science and Technology Publications, Lda.
on RF signals and motion detection, the addition of
color detection using ESP32 CAM offers an
additional layer of analysis based on visual cues. By
combining radars, counter-UAV systems, and color
detection using ESP32 CAM, this integrated solution
aims to provide a more robust and reliable approach
to detect and mitigate the unethical use of drones. It
enhances the overall effectiveness of drone detection
systems, allowing for more accurate identification,
tracking, and response to unauthorized drone
activities.
(Smith, J., & Johnson ,2019) has proposed a radar-
based drone detection and tracking systems. It
provides different radar technologies and their
capabilities in detecting drones. It also explains the
limitations of radar systems, particularly in
differentiating drones from other objects and
detecting stationary drones. It emphasizes the need
for complementary technologies, such as color
detection using cameras, to enhance the effectiveness
of drone detection systems.
Brown, M., & Davis A (2020) as proposed
Counter-Unmanned Aerial System (C-UAS)
technology. C-UAS technologies are designed to
detect, track, and mitigate unauthorized drones. It
provides an overview of various C-UAS techniques,
including radar-based systems, RF detection, and
optical sensors. The survey explores the strengths and
weaknesses of these technologies in identifying
drones with unethical intentions. It highlights the
potential benefits of integrating color detection using
cameras, such as ESP32 CAM, to enhance the
accuracy and reliability of C-UAS systems.
Garcia,(2020) has proposed an Anti-drone system: A
visual-based drone detection using neural networks
that proposes visual sensing by simulation to detect
drones by faster R-CNN (Region-based
Convolutional Neural Network) with Res-Net-101
(Residual Neural Network-101) networks.
(Patel, R., & Shah ,2021) has developed a color-
based object detection using ESP32 CAM for
unmanned aerial vehicle surveillance. This study
further focuses specifically on color-based object
detection using ESP32 CAM for unmanned aerial
vehicle (UAV) surveillance. It presents a case study
where ESP32 CAM is utilized to detect predefined
colors associated with unauthorized drone activities.
This mainly discusses the implementation details,
including image processing techniques and
integration with the overall surveillance system. It
demonstrates the effectiveness of color detection
using ESP32 CAM in enhancing UAV surveillance
capabilities and potentially preventing unethical
drone behaviors.
(Samadzadegan, et.al,2022) has developed a
detection and recognition of drones, based on a Deep
Convolutional Neural Network Using Visible
Imagery. Drones are often confused with birds
because of their physical and behavioural similarity.
The proposed method is not only able to detect the
presence or absence of drones in an area but also to
recognize and distinguish between two types of
drones, as well as distinguish them from birds. The
dataset used in this work to train the network consists
of 10,000 visible images containing two types of
drones as multi-rotors, helicopters, and also birds.
(Ahmad, et.al ,2020) has proposed a Machine
Learning Approach for Detecting Unauthorized
Drone Operators. It is mainly about detecting
unauthorized drone operators through RF
communication Technology, GPS tracking or
RADAR by Machine Learning approach. A
comprehensive analysis is conducted to find the
optimal machine learning approach to classify the
UAV operator in terms of accuracy, sensitivity, and
prediction time. The utilized dataset consists of
recorded flying sessions of 20 different pilots based
on four features, thrust, yaw, pitch, and roll. To
balance the dataset, the Synthetic Minority Over-
sampling Technique (SMOTE) is utilized.
The study presents a noteworthy development in
the form color detection which utilizes advanced
technology to detect drones and promptly issue
security alerts through an alarm system. Key to this
detection capability is the integration of an ESP32
microcontroller, known for its powerful processing
capabilities and built-in Wi-Fi and Bluetooth
connectivity. With real-time monitoring and analysis
facilitated by the ESP32, the system effectively
distinguishes drones from other airborne objects,
employing a comprehensive drone detection
algorithm that combines visual and acoustic sensors.
Overall, this study contributes significantly to the
field of color detection for security by providing a
reliable and environmentally friendly solution for
drone detection and real-time security alerts using
specific libraries, enhancing safety in diverse settings.
This paper is organised as follows. Methodology of
the study has been given in section II, which explains
about incorporating color and tracking parameters of
defined colors in section III. Section IV concludes the
paper. built-in Wi-Fi and Bluetooth functionality,
eliminating the need for an additional Ethernet shield
for connectivity. For colour or image detection, the
ESP32 CAM module is particularly significant
malicious behaviour is detected, no notification
detection into the existing radar and counter-UAV
systems, the proposed approach provides a more
Enhancing Security Measures Through Colour Detection Algorithm Implemented With ESP32 Cam
75
comprehensive and accurate means of identifying and
tracking drones. Results of the study with a pictorial
representation of a specific colors of an object has
been shown along with the defined ranges Fig 1
depicts the block diagram of proposed methodology
for finding the object is malicious or not. Solar power
panels are used in this study, where the power has
been taken. In recent trends, there is a depletion of
fossil fuel and on the other hand the power demand is
increasing at load centers. In this study, renewable
power generation source has been used. By utilizing
solar energy to power a system designed for drone
identification. The system incorporates an ESP32
CAM, which enables the analysis of the behaviour of
detected objects. If an object is identified as
malicious, an alarm is triggered to alert the user.
Conversely, if no malicious behaviour is detected, no
notification is sent to the user. This entire process is
powered by solar energy, promoting sustainable and
environmentally friendly operations.
1.1 Methodology
Figure1: Block diagram.
The ESP32, developed by Espressif Systems, is a
microcontroller that incorporates a range of System
on a Chip (SoC) modules. It stands out for its
affordability and low power consumption. Unlike
many other boards, the ESP32 includes.
Set up the ESP32 CAM module by connecting
it to the ESP32 development board and ensuring that
the required libraries and dependencies are installed.
Capture images using the ESP32 CAM module,
utilizing the provided functions or methods to capture
frames from the camera. Preprocess the captured
image to enhance color detection accuracy.
This can involve operations like resizing,
cropping, or adjusting the image's color space.
Convert the image from the default RGB color space
to a color space suitable for color detection, such as
HSV (hue saturation value) or LAB. Define the color
range(s) to detect by specifying lower and upper
thresholds for each color component in the chosen
color space.
For example, specify HSV (hue saturation value)
or LAB values that correspond to the color red. Apply
thresholding techniques to Segment the image based
on the defined color range(s). This will separate the
desired colors from the rest of the image.
Thresholding techniques include simple thresholding,
adaptive thresholding, or morphological operations.
Use contour detection algorithms to identify the
boundaries of the color regions in the segmented
image. This will provide location and shape
information for the detected colors. Analyze the
detected color regions based on specific
requirements.
Calculate properties such as centroid, area, or
perimeter of the color regions. Once the color
segmentation is performed, the resulting color regions
can be analyzed. Various properties of the color
regions can be calculated, such as the centroid (the
center of mass of the region), area (number of pixels
in the region), or perimeter (length of the region's
boundary). These properties provide information
about the detected colors. To differentiate colors, the
properties of the detected color regions can be
compared. For example, compare the centroids of
different color regions to determine their relative
positions or distances. Additionally, can analyze other
properties, such as the dominant color within a region
or the relative sizes of color regions. Perform desired
actions based on the color detection results.
This can include activating alarms, controlling
external devices, or sending notifications to users.
Test the color detection algorithm in different lighting
conditions and with various color samples to evaluate
its accuracy and reliability.
2 RESULTS
The color detection algorithm successfully identified
several colors in the captured image. The algorithm
accurately determined the presence of specific colors
based on their defined color ranges. In the captured
image, the algorithm detected regions or areas where
the identified colors were found. It provided
ISPES 2023 - International Conference on Intelligent and Sustainable Power and Energy Systems
76
information about the position, size, and shape of these
color regions, allowing for a detailed understanding of
their distribution within the image. Moreover, the
algorithm provided additional properties of the
detected color regions. This included the centroid
coordinates, which indicate the central point of each
color region. The area of each color region, measured
in terms of the number of pixels it occupies, was also
determined. Additionally, the algorithm calculated the
perimeter of the color regions, providing insights into
their boundary lengths.
To demonstrate the results, a pictorial
representation was generated. The representation
visually depicted the detected colors and their
corresponding regions within the image. This
visualization allowed for a clear and intuitive
understanding of the algorithm's performance.
Furthermore, the algorithm provided the
flexibility to adjust the tracking parameters. In the
presented frame, the green color was specifically
tracked and is shown in Fig 2. As shown in the Fig 3,
By manipulating the LH (Lower Hue), LS (Lower
Saturation), LV (Lower Value), UH (Upper Hue), and
UV (Upper Value) values using the provided tracking
bars and different colors could be targeted and
detected for different colors like blue, orange and
yellow depicted in Fig 2. This adjustable feature
enabled the algorithm to adapt to various color
detection requirements and cater to specific
application needs.
The prototype of the color detection is shown in
Fig 4, the prototype mainly consists of rotating pole
of 360 degrees and a camera has been attached to it,
so that it can detect the UAV or drones based on color
detection algorithm. The code for changing the color
ranges and detecting the colors is shown in Fig 5.
a) Green is detected
b) Blue is detected
c) Orange is detected
d) Yellow is detected
Figure 1: Colordetection of different objects.
Enhancing Security Measures Through Colour Detection Algorithm Implemented With ESP32 Cam
77
Figure 2: Tracking bar.
Figure 3.
Figure 4: Code for color detection.
3 CONCLUSIONS
This study addresses concerns related to the misuse
of drones for non-ethical purposes, particularly in
border surveillance. The integration of radars, counter
UAV systems, and color detection using ESP32 CAM
presents a promising approach to address the issue of
unethical behaviors of drones. By combining radar
technology with the ESP32 CAM's color detection
capabilities, it becomes possible to enhance the
detection and identification of drones engaged in non-
ethical activities.
The utilization of radars allows for detection and
tracking of drones, providing valuable information
about their presence and movement. Coupled with the
ESP32 CAM's color detection functionality, the
system can further refine the identification process by
analyzing the visual characteristics of the drones,
such as their color patterns. The algorithm accurately
determined the presence of colors based on
predefined color ranges and provided detailed
information about the position, size, shape, centroid
coordinates, area, and perimeter of the detected color
regions. A pictorial representation visually depicted
the detected colors, enabling a clear understanding of
the algorithm's performance.
However, it is important to acknowledge that the
effectiveness of such a system relies on continuous
research, development, and refinement. Ongoing
advancements in radar technology, counter UAV
systems, and color detection algorithms will be
essential to stay ahead of evolving drone capabilities
and potential new unethical behaviour.
REFERENCES
Smith (2019). (n.d.).). Radar-based drone detection and
tracking systems: A survey. In Proceedings of the IEEE
Conference on Wireless Communications and
Networking Conference (WCNC) [Review of). Radar-
based drone detection and tracking systems: A survey.
In Proceedings of the IEEE Conference on Wireless
Communications and Networking Conference
(WCNC)]. . In: IEEE. pp.19.
Brown, M., & Davis, A. (2020). Counter-Unmanned Aerial
System (C-UAS) technology: A survey. IEEE
Transactions on Aerospace and Electronic
Systems, 56(2), 14951513.
Garcia, A. J., Min Lee, J., & Kim, D. S. (2020, October 21)
Anti-drone system: A visual-based drone detection
using neural networks. 2020 International Conference
on Information and Communication Technology
Convergence (ICTC). Presented at the 2020
International Conference on Information and
ISPES 2023 - International Conference on Intelligent and Sustainable Power and Energy Systems
78
Communication Technology Convergence (ICTC), Jeju
Island. doi:10.1109/ictc49870.2020.9289397
Patel, R., & Shah, A. (2021). Color-based object detection
using ESP32 CAM for unmanned aerial vehicle
surveillance. International Journal of Innovative
Research in Computer Science and Technology, 9(2),
126–130.
Samadzadegan, F., Dadrass Javan, F., Ashtari Mahini, F., &
Gholamshahi, M. (2022). Detection and recognition of
drones based on a deep convolutional neural network
using visible imagery. Aerospace, 9(1), 31.
doi:10.3390/aerospace9010031.
Samadzadegan, F., Dadrass Javan, F., Ashtari Mahini, F., &
Gholamshahi, M. (2022). Detection and recognition of
drones based on a deep convolutional neural network
using visible imagery. Aerospace, 9(1), 31.
doi:10.3390/aerospace9010031
Gopal, V. (2020). Developing an Effective Anti-drone
System for India’s Armed Forces. Observer Research
Foundation.
Shi, X., Yang, C., Xie, W., Liang, C., Shi, Z., & Chen, J.
(2018). Anti-drone system with multiple surveillance
technologies: Architecture, implementation, and
challenges. IEEE Communications Magazine, 56(4),
68–74. doi:10.1109/mcom.2018.1700430
Lulla, G., Kumar, A., Pole, G., & Deshmukh, G. (2021,
March 5). IoT based Smart Security and Surveillance
System. 2021 International Conference on Emerging
Smart Computing and Informatics (ESCI). Presented at
the 2021 International Conference on Emerging Smart
Computing and Informatics (ESCI), Pune, India.
doi:10.1109/esci50559.2021.9396843
Abunada, A. H., Osman, A. Y., Khandakar, A., Chowdhury,
M. E. H., Khattab, T., & Touati, F. (2020, February).
Design and implementation of a RF based anti-drone
system. 2020 IEEE International Conference on
Informatics, IoT, and Enabling Technologies (ICIoT).
Presented at the 2020 IEEE International Conference on
Informatics, IoT, and Enabling Technologies (ICIoT),
Doha, Qatar. doi:10.1109/iciot48696.2020.9089515
Oh, H., Min, H., & Lee, M. Y. (2019). Comparing
Convolutional Neural Network (CNN) models for
machine learning-based drone and bird classification of
anti-drone system. In 2019 19th International
Conference on Control, Automation and Systems
(ICCAS) (pp. 87–90). IEEE.
Bisio, I., Garibotto, C., Lavagetto, F., Sciarrone, A., &
Zappatore, S. (2019). Blind detection: Advanced
techniques for WiFi-based drone surveillance. IEEE
Transactions on Vehicular Technology, 68(1), 938–946.
doi:10.1109/tvt.2018.2884767
Kumar, U., Sachin, H., Rathod, J., Vijaykumar, R., Pradeep,
S., & Savitha, P. B. (n.d.). IoT-Based Quadcopter with
Automatic Landing System and Object Detection.
In 2022 Fourth International Conference on Emerging
Research in Electronics, Computer Science and
Technology (ICERECT). IEEE.
Singha, S., & Aydin, B. (2021). Automated drone detection
using YOLOv4. Drones, 5(3), 95.
doi:10.3390/drones5030095
Prasetyo, S. Y., & Joko, S. (n.d.). Analysis Transfer Data
Image Processing and Face Recognition Using Camera
Esp32cam Web Browser IOT.
Enhancing Security Measures Through Colour Detection Algorithm Implemented With ESP32 Cam
79