Wummi
Wummi
INTRODUCTION
1.1 Background of the Study
Nowadays, Modern Technology has witnessed an epidemic rise. It makes human life much
easier by simplifying the way of our life. It changed the methods of communication, different
ways in products manufacturing, method of transportation, knowledge and thoughts of people.
There is currently an interest for showing all environments' types using vision technology. This
has many benefits, for example, management of resources, security, urban planning, and
advertising. From a point of view of technology, computer solutions of vision always consist of
detecting, transmitting, and persons analyzing using CPU (Jothibasu, M., 2019).
A counter for multiple gates to count number of persons in a place system is considered a
smart system. It is capable of information recording on the number of moving objects, like cars
or individuals that passed through an area, such as gates, an intersection and a tunnel. Also, this
system is responsible for analyzing each moving object direction, as entering or exiting a place.
Different sides of life need to propose many applications for counting entering and exiting
objects. There are many examples to these applications like the interest of the merchants in the
consumers number that entering or leaving their markets or malls during a period of time, also,
Garage owner need to know the number of cars enter or exit his garage to control parking
capacity.
Counting System using Smart Sensors is also known as Number Counting System and it is
implementing smart sensors in industries to count the mechanical components or instruments to
get more accurate answers. Presently, the Scale Counting System is been used in all the
industries for measuring the quantity of the instruments in the crates. This technique gives more
accuracy over the number of quantity. Though, the accuracy being high, it has a disadvantage
when compared with the monthly statistics. It produces a shortage as one for thousand
components for a single crate. This being small though, it becomes a major disadvantage at the
end. So, to rectify this error, the number counting system using smart sensors can be
implemented.
The smart counter is an electronic and electrical device that handles the counting and
controls the flow of individuals using an automated slide door that allows access only when the
administrator permits (Winfred, A., 2016). The ability to detect common objects taken for
1
granted by humans. In our daily lives, we can discern all manner of objects from very complex
scenes, and in turn draw complex conclusions from this data. It is perhaps unclear even today
how humans can accomplish such a feat using only the wet-ware of ours eyes and brain.
Computer scientists the world-over are now seeking to accomplish this task using the hardware
of computers and cameras and various forms of software using machine learning algorithms.
The aim of this project is to model a parking space management system, the objectives are to;
i. Demonstrate a smart device that counts the number of cars available entering and leaving
a parking space.
ii. To replace the old practice of counting the number of people entering and exiting the
room one by one.
iv. Implementation of small-scale energy conservation modelling system to carry out the
tasks.
2
easily and accurately be achieved. This can then be used to project the expected revenue based
on the number of cars parking and the time spent by each car. Accurate revenue projection will
lead to increased developments in the cities.
1.5 Methodology
The technology behind this project is the machine learning algorithm techniques with
which is the bedrock of the system. The system used CNN (Conventional Neural Network)
which is the main control/processor of the system. The image of the parking is been trained using
Tensor Flow, while OpenCV is used for the image processing.
This project focus on creation of an automated parking space in The Polytechnic, Ibadan
which is the scope of the study, and it also covers the features of the Machine learning algorithm
and its applications, it also involves the functionality of capacity monitor, the hardware
description, the use of transistor-transistor logic and microcontroller, how the system works and
its applications.
3
CHAPTER TWO
LITERATURE REVIEW
2.1 Historical Background of the study
Recent advancement in science and technology, has led to the development of several
sophisticated and high precision measurement and counting devices. Among the devices
developed, are those for counting the number of people present in a particular place (up/down
counters). These devices are essential because of the role they plays virtually in all aspects of life
(Kumar, S., 2020) .Visitor counting is simply a measurement of the number of visitors entering
and exiting conference rooms, malls, sports venues, etc. With the rise in the standard of living,
there is a growing sense of urgency to create circuits that will make life easier. An ancient
memory aid system used to record and register numbers, amounts, or even texts, was a tally (or
tally stick). Pliny the Elder makes historical reference to the best wood to be used for tallies, and
Marco Polo discusses the use of tallying in China. Tallies have been used to the point of being
reliable for various purposes, such as messaging and scheduling, and particularly in person
counting, financial and legal transactions. The mechanical tally counter was the replacement for
the tally stick, it's a mechanism used in counting anything incrementally. Counting people,
animals, or objects that are quickly entering and leaving a location is one of the most common
uses for tally counters.
In the last two decades visit estimations and counting were done using; trial logs,
examination of footprints, various permits and best estimates made by staffs working in
institutions (Sublakho, E., 2021). As time went on, an electronic counting counter with an LCD
screen to display the count and a push-button to advance the count was added. In the mid-1990s,
some still had a button to reduce the count in case of miscalculations. Different types of people
counters have now been introduced as a result of technological advancements to automatically
count the number of people entering and leaving a building at a specific time. Laser beams,
thermal imaging, video cameras, and infrared sensors are just a few of them. All of these sensors
serve as visitor detectors in their own right.
These devices are very reliable and accurate in terms of performance as compared to the
mechanical tally counter used previously. The counter gives statistics on the number of actual
visits to a region that have been made. It is possible to estimate the number of visitors and
4
monitor this information, combined with data obtained from visitor surveys. Electricity has
become a necessity for everyone; without it, daily life tasks and activities come to a halt. Energy
conservation has become mandatory because of the depletion of non- renewable resources, and
we can also reduce electricity bills by doing so. We all know that renewable energy sources like
wind, solar, and hydro are used to generate, conserve, and renew energy, which is advantageous
because it is pollution-free, long-lasting, and has no negative environmental consequences.
Energy resources such as petroleum, coal, natural gas, uranium, and propane, on the other hand,
are referred to as non -renewable resources because their finite supplies. Many environmental
impacts and the daily depletion of energy reserves are signals for us to conserve energy,
necessitating the development of an automatic energy conservation system (Kumar, S., 2018).
In recent times, there is an increasingly popular need for automatic appliances. With the
increase in the standard of living, there is a sense of urgency to create circuits that will make life
easier. In order to avoid congestion, the counters also contain information about the number of
people in a room. Counting of visitors passing through a location was previously performed
manually using of finger or tally methods which was time consuming and inaccurate. Other
room appliances such as light switches are still mainly operated manually in most regions of the
world invariably leading; to power waste of personal incompetence, human recourses, and time.
With technological innovations, many electronic technologies such as bidirectional visitors’
counters and automatic appliance controllers, have been created as a result of technological
advancements to keep count of the number of visitors entering a hall and control the lighting in
that environment. These technological developments led to the development of counters using an
8051 microcontroller (AT89C51).
5
Kodali et al.’s configuration allows mobile phones without Internet connectivity to
receive alerts and control IoT devices connected to the microcontroller. Tanwar et al. describe an
inexpensive home security system that implements a real-time email alert system. The system
uses a PIR module and a Raspberry Pi MCU. Security cameras and PIR sensors are connected to
the Raspberry Pi via USB ports and general purpose input/output pins respectively. The system
assumes that homes have Internet access; it uses the Internet to send e-mails to the resident in
real-time. The system’s intrusion detection logic identifies motion by comparing signal inputs
from the PIR sensors with their previous values. When current and previous signals differ, the
security camera captures an image that is stored temporarily on the Raspberry Pi and then
automatically e-mailed to the resident.
Gupta and Chhabra describe a cost-effective Ethernet-based smart home system for
monitoring energy consumption, smoke and temperature levels and detecting trespassing. This
system uses the Arduino-certified Intel Galileo 2nd generation microcontroller board.
Temperature, smoke and PIR sensors are connected directly to the microcontroller, while four
220 V devices are connected via a relay module. An android based mobile app that connects to
the Intel Galileo-based server over the Internet allows users to toggle switching devices by tap-
to-touch or voice commands through Google API speech recognition tools.
Piyare et al. present a Bluetooth-based home automation system where an Android cell
phone running a Python script communicates with an Arduino BT board with digital and analog
input/output ports to which sensors and appliances are connected. The smartphone application
has a toggle on and off feature for each device. However, Bluetooth connectivity between the
smartphone and the Arduino BT board required a range of 50 m or less within a concrete
building and mobile platforms other than Symbian do not support the Pyhton application.
Behera et al. designed and implemented a real-time smart home automation system using
an Arduino Uno board along with an Arduino Wi-Fi Shield and a PC home server. A PIR or
motion sensor, an light dependent resistor and an LM35 temperature sensor were used to collect
data which was made available on the PC server that also implemented a MATLAB-GUI
platform to control the temperature, lights, and fans. The PIR sensor also acted as a security
component by detecting possible intrusions and setting off a buzzer to alert the residents.
Howedi et al. proposed a low-cost smart home system built upon a similar architecture
using the Arduino Uno board, PIR sensors, DHT11 temperature sensors, INA219 high side DC
6
current sensor and servo motors that control doors and windows. The Arduino IDE is used to
implement the control and monitoring module of the system while the MIT App Inventor is used
to develop a simple Android application. Panwar et al. implemented the Eyrie smart home
automation system using the Raspberry Pi 3 MCU as the central hub. Their proposed architecture
connected several Arduino Nano boards located around the house to various types of sensors and
NRF24L trans-receivers that eliminated the need for Ethernet or Wi-Fi connectivity.
Recent counter systems using Arduino and Raspberry Pi are equipped with improved
architecture which includes; smart sensors and more advanced distributed control technology.
2.2.3 Arduino
Arduino is simply an open hardware development board used by tinkerers, software developers,
innovators, and inventors to design and build devices that communicate with the real-time
situations. It was originally developed in Ivrea, Italy.
Arduino boards can convert inputs like light on a sensor or a finger on a button and convert them
to outputs like triggering an engine or turning on an LED. Boards are programmed by giving a
series of commands to the board's microcontroller.
7
Figure 2.1: Arduino Uno
2.2.4 Raspberry Pi
Raspberry Pi is a series of small single-board computers built on 29 February 2012 by the
Raspberry Pi Foundation in association with Broadcom in the United Kingdom.
The Raspberry Pi was first released in 2012, and various versions and variants have been
released since then. The first Raspberry Pi had a single-core 700MHz CPU and only 256MB
Memory, while the most recent model has a quad-core 1.4GHz CPU and 1GB RAM. People all
over the world use Raspberry Pi to learn programming, develop hardware projects, automate
their homes, and even use it in automotive purposes. The Raspberry Pi is a cheaper computer
that runs Linux and has a set of GPIO pins for tracking physical computing components and
experimenting with the (IOT) technology.
8
Figure 2.2: Raspberry Pi 3 Model B+
9
S/N Name of Title of Article Aim & Applications Limitation
Authors/ Objectives
Years
1 Mallikarj Low Cost Arduino The aim of the ARDUINO Ino This project
un, G., et. Based Smart Parking project is to didn’t have
all (2019) Lot Controller with design and interfacing
Occupancy Counter implement An methods,
automatic which limit
parking lot the effect of its
with a vehicle operation.
occupancy
counter uses
Arduino
controller to
overcome the
problem of
vehicle count
or availability
of space to
park.
2. Kazim, Design and The aim of this This surveillance It is limited
M. & implementation of project is security system and used in a
Zhu, S. Smart Surveillance toDesign and implemented small area
Y. (2015) System Using PIR implement a using PIC micro which can
Sensor Network and Smart controller, only be
GSM Surveillance camera, GSM covered by the
System Using and sensors. network
PIR Sensor sensor and the
Network and GSM module
GSM.
3. Deogirik Design and The aim of this Hardware of this This project
ar, J., implementation of project is to system has been scope is only
&Vidhate modular home security design and designed using focused on a
, A. system with short implement a microcontroller specific house
10
(2017) messaging system. modular home AT Mega 328, and model that
security system PIR (Passive it is been
2.3 Applications
2.3.1 Smart learning System
It refers to the use of smart mobile devices and web technologies in the learning system. This
service enables lecturers and students to interact directly and indirectly in support of teaching
activities. It offers real-time distance learning, automatic attendance monitoring, on-demand
course delivery, cross-lecture and online materials, customized course programs, efficient library
management and efficient laboratory services.
It is developed with various sensors as an important part of the building automation process.
These sensors support the various capabilities of smart services such as temperature adjustment,
humidity measurement, switching off of objects (lights, projectors) etc. Smart building services
should also be able to generate reports to campus management, such as energy consumption
reports, real-time warning, energy and space usage patterns etc.
It is a system that improves and facilitates payment services. The money is stored inside the
student ID card and the payment is automatically debited when they perform any kind of service,
such as reservation of meals, etc.
Smart Grid is one of the smart environment area services. The management and deployment of
energy on a smart campus are very important, that’s why the smart grid is considered to be one
of the key components of the Smart Campus. The main aim of this system is to improve energy
consumption and reduce monthly bills, allow real-time load analysis on the power system,
increase sustainability, energy conservation, enhance reliability and detect potential failures.
11
In order to obtain a green environment, the campus has to manage water and waste properly and
in real-time by protecting the environment, detecting water pressure and leakage, detecting waste
levels in conditions and optimizing the collection of waste, etc.
This system is an intelligent campus application that enables remote control and speed
management of the library. Smart libraries use library card with electrical tags, mobile phone
and other physical objects. This electronic label (e.g. RFID) can improve several library services
such as borrowing and returning the library books, as well as automatically recording the
information of shelves, catalogues and books in the database without much human intervention.
This system helps to monitor users and devices inside the campus and track their location in the
event of an emergency or evacuation. Sensors may also transmit information to various safety
devices, such as motion detectors for the opening and closing of doors and windows, or safety
triggering instruments.
12
CHAPTER THREE
METHODOLOGY
3.1 Introduction
These units are connected together to create this embedded system, each unit operation
produce the connection to the next unit as seen in Fig. 3.1
13
3.2.1 Block by Block Description of the System
Background
Camera or Image New Frame Learning
Data
Feature Vehicle
Get the Vehicle
Extraction Classification
Outline
14
This system follows a standard steps of algorithm, the steps goes as follow;
Step 1: Gather Data:
i. To create a parking space counter, this system will be using CCTV camera for capturing of data
and sending to the program to create New Frame.
Step 2: Preprocessing:
i. Resize images: This is to create size paradigm for the space allocated and number of
space to be stored for the system to operate on.
ii. Convert to grayscale: The Neural Network will be used to convert the images to
grayscale to simplify processing.
iii. Thresholding:
This techniques is used to create binary images that highlight cars and parking spaces
with their allocated value and number remains.
Step 3: Counting
i. Count cars: After detecting cars in the images, count the number of cars detected.
ii. Count empty parking spaces: Compare the detected parking spaces with the detected cars
to calculate the number of empty spaces.
Step 4: Detecting Vehicles
i. Custom Object Detection: The system was trained using learning model on labeled car
images for the parking space allocation.
Step 5: Detecting Parking Spaces
i. Segment parking spaces: Image processing techniques like contour detection and edge
detection will be used to identify parking space boundaries.
Step 6: Display Results
i. The system will display and count of automobiles and available parking spaces on the screen or
in a user-friendly interface.
Step 7: Real-time Processing
i. A webcam or a camera feed to continuously process images and update the counts in real-
time.
Step 8: Testing and Optimization
i. The system will be used for parking lot images to ensure accuracy. The models and algorithms
will be trained and fine tune to improve performance.
15
Step 9: Deployment
i. The system was deployed as the accuracy and performance expected as been met
3.2.1.1 Definition of Hardware Component
i. CCTV (Closed-Circuit Television) Camera
CCTV means “closed-circuit television” and is commonly known as a video surveillance
technology. “Closed-circuit” means broadcasts are limited (closed) to a selected group of
monitors, unlike “regular” TV, which can be received and viewed by whoever sets up a reception
device. The device is used in this system for capturing and detecting car movement and parking
spaces diagrams.
16
3.2.2. Flowchart of the System
START
YES NO
Detect
Image
Display System
Loading
Display Parking
Wait for Response Space
STOP
17
3.2.3 Program Code
import cv2
import pickle
width, height = 137, 85
try:
with open('CarParkPos', 'rb') as f:
posList = pickle.load(f)
except:
posList = []
def mouseClick(events, x, y, flags, params):
if events == cv2.EVENT_LBUTTONDOWN:
posList.append((x, y))
if events == cv2.EVENT_RBUTTONDOWN:
for i, pos in enumerate(posList):
x1, y1 = pos
if x1 < x < x1 + width and y1 < y < y1 + height:
posList.pop(i)
with open('CarParkPos', 'wb') as f:
pickle.dump(posList, f)
while True:
img = cv2.imread('wer.jpg')
# cv2.rectangle(img,(50,192),(157,240),(255,0,255),2)
for pos in posList:
cv2.rectangle(img, pos, (pos[0] + width, pos[1] + height), (255, 0, 255), 2)
cv2.imshow('Image',img)
cv2.setMouseCallback("Image", mouseClick)
cv2.waitKey(1)
19
CHAPTER FOUR
TESTING, RESULTS AND DISCUSSION
4.0 Introduction
After the whole design constructed, it was put to test to see if it performs the design specifics of
the system actually perform the readings and operations effectively. In this prototype model, a
dedicated Sensor is provided which is the most significant components, this is used for motion
detecting. The Machine learning algorithm was embedded in the system software dashboard.
4.1 Testing
When the system was plugged to a power supply. The LED indicator display indicated system
power up, and sensor also beep to signify it active mode, to test the sensitivity of the system, the
project was connected to a laptop which is embedded with the software developed for it using
machine learning algorithm to monitor the system effectiveness.
4.2 Presentation of Results
Shown in Figure 4.1 and 4.2 below are the presentation of final packaging of the finished system.
`
Fig. 4.1: Empty System for testing
20
Fig. 4.2: Vehicle Display
21
4.2.2 Testing Modules
The system was tested, and the vehicle display program with the system were placed appropriately
on the surface to get the value according to the code structured for the system to run on.
4.3 Discussion
The project is carried out considering that, Machine learning algorithm is a technology that is
rapidly growing for maintaining and monitoring data. Therefore, it is essential to address the
challenge that exists in the successful evaluation of a smart counting system. By reviewing the
literature related to machine learning algorithm we noticed the necessity to concentrate on the
22
specific user requirements, particularly referring to monitoring, in order to develop an intuitive
and effective system.
23
CHAPTER FIVE
CONCLUSION AND RECOMENDATIONS
5.1 Conclusion
The modelling of a car parking system using Machine Learning Algorithm has been done in
the project. The designed system is a smart one as it provides security, parking guidance based
on a set priority, efficient usage of the parking area and protection of the parked cars. It can be
concluded that security has been given prime importance in the smart system as each car once
parked can be unparked only through a unique passcode. The parked cars are completely
protected from any disturbance through automated motion sensors. It can also be concluded that
setting up the parking slots at any angle results in efficient usage of the parking area.
5.2 Recommendations
As the system takes care of few of the drawbacks of the existing system, there is room for further
improvement and expansion of this work. The system can be enhanced further with addition of
alarm system to notify the driver or the personnel in charge if the space has all been allocated
and there is no space for packing anymore, also parking space booking system can be added.
24
REFERENCES
[11] D. K. Mohana (2019): "Industrial Automation with Bidirectional Visitor Counter," IOP
Publishing, 2019.
[12] L. James (2021):"Basic Knowledge - Diode," Power & Beyond, 26 February 2020.
25
[Online]. Available: https://www.power-and-beyond.com/what-is-a-diode-and-what-is-
it-used- for-a-908189/. [Accessed 13 January 2021].
[13] T. Saleh (2019): "Movement Sensed Automatic Door Control System . Department of
Electrical and Electronic Engineering, ATBU Bauchi," 2019.
26