IoT in Services for Communities in the Recognition of Plates with
OpenCV-Python
Liliana Enciso
1,2
, Roddy Yaguana
2
, Renzo Jaramillo
2
and Elmer Zelaya-Policarpo
2
1
Grupo Investigaci
´
on IoT - Network Communications on Smart Environment, Universidad T
´
ecnica Particular de Loja,
San Cayetano Alto, Loja, Ecuador
2
Departamento de Ciencias de la Computaci
´
on y Electr
´
onica, Universidad T
´
ecnica Particular de Loja,
San Cayetano Alto, Loja, Ecuador
Keywords:
Artificial Neural Networks, IoT, Artificial Vision, OCR, ANPR, Search for Patterns.
Abstract:
The evolution of the technology day by day advances looking for greater comfort for the users, facilitating
the daily living, allowing to reduce times, costs and resources, the advance of the technology allows greater
learning. The application was designed with the objective of controlling vehicular access to the UTPL by
recognizing the plaque, only the teachers and staff that have access can enter, in this way it will prevent people
outside the university from entering. Periodic control of all income was taken to the university and that way a
statistic can be drawn from the people who really belong to the university.
1 INTRODUCTION
The field of image processing is continuously evol-
ving. During recent years there has been a signifi-
cant increase in interest in fields such as image mor-
phology, artificial neural networks, color and / or
grayscale image processing, image data compression,
image recognition and analysis systems. knowledge-
based images. Recognition is a basic attribute of the
human being, as well as of other living organisms.
This recognition is usually generated by means of pat-
terns (Peralta, 2009). With the advancement of artifi-
cial vision we could acquire, process, analyze and un-
derstand the images of the real world in order to pro-
duce numerical or symbolic information to be treated
by the computer, just as humans do in order to under-
stand the world we live in surrounds. We will des-
cribe the process of extraction of characteristic pat-
terns of images, through the help of Artificial Neu-
ral Networks, for the treatment of the images libraries
will be used OpenCV (P. Garc
´
ıa., 2013).
Computer systems that use computer vision make
use of digital image processing techniques in order
to emulate the vision system and algorithm (Enciso-
Quispe et al., 2018). The research work developed has
its origin in the need to develop a system that is capa-
ble of identifying images quickly and without exces-
sive consumption of resources. Of all this the giants
of the computer science (I. Ortiz, 2016) have realized
and they have launched applications of recognition of
images for mobile devices developing algorithms ba-
sed on the content of the images recognizing forms
and analyzing their resemblance. The idea of this pro-
ject is born from the need to see an object that we do
not recognize and we have not been able to look for
it because we do not know under what name to look
for it, or we have gone down the street and we have
seen a monument and we did not know what it was, or
we have been in a museum and we would have liked
to have more information instantly about the work we
contemplate.
2 RELATED WORKS
Computer vision aims to solve several of the problems
that arise in the daily life of human beings. Every-
thing that humans observe is through our vision, that
is why we have investigated several projects to cap-
ture ideas of how computer vision works.
The recognition of images (P. Garc
´
ıa., 2013) using
artificial neural networks describes the process of ex-
tracting characteristic patterns of images, with the
help of Artificial Neural Networks. The information
of the Neural Network together with additional data
of the images, will be stored in a database and con-
sumed by a web service. A mobile phone with an
Android operating system will consume the informa-
430
Enciso, L., Yaguana, R., Jaramillo, R. and Zelaya-Policarpo, E.
IoT in Services for Communities in the Recognition of Plates with OpenCV-Python.
DOI: 10.5220/0007235004300437
In Proceedings of the 14th International Conference on Web Information Systems and Technologies (WEBIST 2018), pages 430-437
ISBN: 978-989-758-324-7
Copyright © 2018 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
tion stored in the web service. After making an image
capture with the phone camera, it processes the image
and together with the data consumed by the web ser-
vice will be able to identify which image it is. For
the treatment of the images, OpenCV libraries will be
used, both on the server and on the mobile phone.
The recognition of objects immersed in static ima-
ges using the algorithm HOG and RNA-MLP is a
research project approved by the Technological Uni-
versity of the Mixteca. It is based on presenting an
object recognition system that it uses in the process
of extracting characteristics from the HOG algorithm
and an MLP type RNA in the classification process
(Garc
´
ıa., 2015).
The practical application of artificial vision for the re-
cognition of faces in an image, using neural networks
and object recognition algorithms of the Opencv li-
brary is a project that focuses on studying the different
methods and algorithms that allow detecting a face in
an image , and develop an application that can be trai-
ned to perform the recognition of a specific person
within the image (E. Caballero., 2017).
The application of neural networks (Lanzarini and
Giusti., 2014) to the recognition of patterns in medical
images is a project that presents the research in image
analysis and recognition of patterns as a help to medi-
cal diagnosis is widely recognized for its complexity
and importance, in this sense the neural networks re-
sult from It is extremely useful, since not only are they
capable of learning with the help of the expert but they
can themselves generalize the information contained
in the input data, showing relationships that are a pri-
ori complex.
The development (Paucar and Tasiguano, 2016) of
the algorithm for the recognition of vehicle license
plates consists of a digital image algorithm. For this, a
vehicle license plate recognition system has been de-
veloped using the LabView program and its artificial
vision toolkit and a high resolution IP camera. The
designed software locates the vehicle plate inside the
captured image of the vehicle and recognizes the cha-
racters and numbers that are inside it. The location
of the vehicle plate in the image is made by looking
for patterns. For the recognition of the characters and
numbers contained in the plate, optical character re-
cognition, OCR is used. Once the text on the plate
has been read, the characters and numbers are collated
with thoseof a database that contains all the license
plates of the vehicles that are authorized to enter the
parking lot.
Plaque Recognition through OpenCv - Python: In
our project we describe the development of a software
system oriented to the Recognition of Vehicle Plates
using both hardware and software tools. The system
will locate the vehicle plate inside the image of the
vehicle and will recognize the characters and num-
bers that are inside it and will be compared with those
of the database that contain all the license plates of
the vehicles that are authorized to access the vehicle.
the University on Paris Street, seeking to optimize the
access time.
3 TEORETHICAL FRAMEWORK
Computer vision aims to solve several of the problems
that arise in the daily life of human beings. Every-
thing that humans observe is through our vision, that
is why we have investigated several projects to cap-
ture ideas of how computer vision works.
3.1 Arduino UNO
It is an electronic board based on the ATmega328P
(technical sheet). It has 14 digital input pins, 6 analog
inputs, a 16MHz quartz crystal, a USB connection,
a power connector, an ICSP header and a reset but-
ton. The model of the Arduino with its different ports,
circuits and components, can be programmed with
the Arduino software (IDE). But this module is al-
ready pre-programmed with a boot loader that allows
you to load a new code into the system without the
use of an external hardware programmer (Badamasi,
2014),(Enciso-Quispe et al., 2017a).
Figure 1: Arduino UNO.
3.2 Artificial Vision
Artificial computer vision is the ability of the machine
to see the world around it, more precisely to deduce
the structure and properties of the three- dimensio-
nal world from one or more two- dimensional images
IoT in Services for Communities in the Recognition of Plates with OpenCV-Python
431
(Pajares and de la Cruz, 2008). It is defined as a field
of ”Artificial Intelligence”, allows the use of appro-
priate techniques, allow the collection and analysis of
any spatial information obtained through digital ima-
ges. It is composed of a set of processes designed to
perform image analysis. These processes are: captu-
ring images, memorizing information, processing and
interpreting results. With artificial vision you can:
Automate repetitive inspection tasks performed
by operators.
Conduct quality control of products that could not
be verified by traditional methods.
Perform inspections of objects without physical
contact.
Reduce cycle time in automated processes.
3.3 Artificial Intelligence
Artificial intelligence (AI) or also known as compu-
tational intelligence is the intelligence shown by ma-
chines, in a broad and somewhat circular definition,
aims at the study of intelligent behavior in machines.
In turn, intelligent behavior involves perceiving, rea-
soning, learning, communicating and acting in com-
plex environments(Nilsson, 2001).
The machine has to be able to recognize the natural
language in which humans speak. Speech is associa-
ted with a superior intelligence, and for a machine to
be able to recognize it and also to build sentences it
must be able to perform complex morphological ana-
lyzes , syntactic, semantic and contextual of the in-
formation it receives and the phrases it generates. In
order for an artificial entity to be considered intelli-
gent, the following is considered (Serrano, 2013):
Natural Language Processing or NLP.
Automatic reasoning and Machine learning.
3.4 Neuronal Networks
Neural networks are schemes that aim to mimic the
architecture of the brain. It serves to effectively re-
present any function that is very complex in algebraic
terms, as well as pattern classification tasks (C. San-
chez, V. Sandonis., 2017). Artificial neural networks
(ANNs) arelearning systems inspired by the functi-
oning of the human brain. They are mathematical
models constructed based on the functioning of bio-
logical neural networks (H. Vega, A. Cortez, A. M.
Huayna, L. Alarc
´
on, P. Romero., 2017).
3.5 Detection of Vehicle Plates
The techniques must be chosen according to the needs
of the particular environment in which the system will
operate, so that the methods with the highest perfor-
mance in general will be exposed. In the same way
factors such as performance, execution time and plat-
form should be taken into account, since they will di-
rectly affect the performance of the system.
3.5.1 Processing of Binary Images
This technique is based on combinations of statistical
methods of analysis and mathematical morphology.
(Used to extract useful components of images, for the
representation and description of the shape of regi-
ons)(R.Radha, 2012). The method, is based on the
principle that the change of brightness in the region
of the plate, is more remarkable and stronger than in
any other place of the image.
3.5.2 Grays Level Processing
1. Global Image Processing. For the location of the
plate, several systems use an approach as presented
in (Draghici, 1997), which consists of scanning the
image horizontally, looking for repeated changes
of contrast on a scale of 15 pixels or more. The
assumptions that the contrast between the characters
the bottom of the plate is su ciently good and that
there are at least three to four characters in a plate
whose minimum vertical size is 15 pixels(Draghici,
1997).
2. Partial Analysis of the Image. This method scans
the image of the vehicle partially, making several re-
petitions of the analysis in different sections of the
image taking into account some distance N- the. as a
limit of the section, to then count the existing borders
in said section. If the number of edges is greater than
an average, it can be assumed that the plate was lo-
cated in that area. The execution time of this method
is very fast since it only scans certain images of the
image (J. Cano, 2003).
3.6 Python
Python is a programming language whose philosophy
emphasizes a syntax that favors a readable code, it
is a programming language multiparadigma, since it
supports object orientation, imperative programming
and, to a lesser extent, functional programming. It
has an interpreter by command line in which you can
enter sentences. Each sentence is executed and pro-
duces a visible result, which can help us understand
ITSCO 2018 - Special Session on Internet of Things and Smart Communities
432
Figure 2: Successfull detection of the vehicle plate.
better the language and test the results of the execu-
tion of code proportions quickly ( Python Software
Foundation, 2017).
3.7 OpenCV
OpenCV (Open Source Computer Vision Library) is
released under BSD license and, therefore, is free
for both academic and commercial use. It has C
++, C, Python and Java interfaces and is compatible
with Windows, Linux, Mac OS, iOS and Android.
OpenCV was designed for computational efficiency
and with a Strong focus on real-time applications.
Written in optimized C / C ++, the library can take
advantage of the processing of multiple cores. Ena-
bled with OpenCL, you can take advantage of the har-
dware acceleration of the underlying heterogeneous
information platform (OpenCv Team, 2017), (Enciso-
Quispe et al., 2017b).
4 METHODOLOGY
4.1 Analysis
Currently there are different types of problems with
respect to control vehicular in parking areas or areas
of restricted access, added to these problems does not
take a statistical control of the different parameters
that are generated when entering or leaving a vehicle
from the parking lot, that is, vehicles entered, parking
availability, parking demands over time, or for pre-
vention of future problems. This project focuses on
the development of a detection system and extraction
of vehicle plates in the area of access to a parking
lot based on artificial vision. The system will allow
access to be automated, if the vehicle is in the data-
base and if it is verified that the vehicle belongs to
someone belonging to the university, it will be given
access, otherwise it will be denied.
4.2 Diagram of the Application
In the Figure 1 and 2, details all the components in-
volved in the use of the application, it shows that the
user approaches the control and is when the IP camera
communicates through the WI-FI with the router the
LPR System complements the next:
Identification of a user using his vehicle license
plate.
Presentation of information related to a plate.
User administration that will be identified later
through vehicular plate.
Guarantee access to the parking lot.
It will control a prototype of a front entrance to a
parking lot.
IoT in Services for Communities in the Recognition of Plates with OpenCV-Python
433
Figure 3: Diagram of the application.
Figure 4: Values of the positioning of the letters in the image.
4.3 Software Development
For the development of the system it was decided to
use the good practice SCRUM for this the following
roles are defined:
Scrum master: person who leads the team to com-
ply with the rules and processes of the selected
methodology.
The representative of the client who will use the
software. It focuses on the business side. Trans-
fers the vision of the project to the team, formali-
zes the benefits in stories to be incorporated in the
Product Backlog and repriorizes them on a regular
basis.
Team: consisting of two people with the neces-
sary technical knowledge and who developed the
system along with the stories of each sprint.
ITSCO 2018 - Special Session on Internet of Things and Smart Communities
434
Figure 5: Detect Function.
Figure 6: Return the outline of the plate.
4.4 Criteria of Acceptance
The acceptance criteria are the basis for the appli-
cation which will analyze the requirements, types of
tools that will be used and how they will be develo-
ped, facilitating the functionality of the application,
among them we have:
Independence of the platform.
Attractive and functional interface.
Updated information.
Figure 7: Go through the images on the plates.
5 RESULTS
The system:
Allows us to capture the plate through the camera
and send it to the system.
Performs the segmentation of characters by means
of the algorithm.
Recognizes the characters and very that the dis-
played plate has access.
Can store the license plate of all the vehicles that
have entered.
Can store people who have tried to enter without
being part of the university.
6 CONCLUSIONS
It seeks to automate the access of the staff of the
institution for control of Paris street without pro-
blems and in a faster way minimizing effort and
maximizing its performance.
Avoid entry to people who are not in the database
of the University.
Achieve a record of the people who are authorized
to enter the university on Paris Street.
IoT in Services for Communities in the Recognition of Plates with OpenCV-Python
435
Figure 8: Extraction of the number the plate.
REFERENCES
Python Software Foundation (2017). Python. url:https://
www.python.org/.
Badamasi, Y. A. (2014). The working principle of an ar-
duino. In 2014 11th International Conference on Elec-
tronics, Computer and Computation (ICECCO), pa-
ges 1–4.
C. Sanchez, V. Sandonis. (2017). Reconocimiento
´
Optico
de Caracteres . url:http://www.it.uc3m.es/jvillena/irc/
practicas/08-09/09.pdf.
Draghici, S. (1997). A neural network based artificial vision
system for licence plate recognition. Signal & Image
Processing, 8(1):113–126.
E. Caballero. (2017). Aplicacion Practica De La Vision Ar-
tificial Para El Reconocimiento De Rostros En Una
Imagen, Utilizando Redes Neuronales Y Algoritmos
De Reconocimiento De Objetos De La Biblioteca
OpenCv.
Enciso-Quispe, L., Barba-Guaman, L., Sanchez, J., and
Quezada-Sarmiento, P. A. (2018). Simulation of pe-
ople counter for public service buses of loja with iot
concept applying the viola-jones algorithm. In 2018
13th Iberian Conference on Information Systems and
Technologies (CISTI), pages 1–6.
Enciso-Quispe, L., Delgado, J., Vivanco, H., Zelaya-
Policarpo, E., and Quezada-Sarmiento, P. A. (2017a).
Internet of things based on android technology for
people with disabilities. In 2017 12th Iberian Con-
ference on Information Systems and Technologies
(CISTI), pages 1–6.
Enciso-Quispe, L., Quichimbo, J., Luz
´
on, F., Zelaya-
Policarpo, E., and Quezada-Sarmiento, P. A. (2017b).
Rest architecture in the implementation of a web and
mobile application for vehicular tariff rotating par-
king. In 2017 12th Iberian Conference on Information
Systems and Technologies (CISTI), pages 1–6.
Garc
´
ıa., A. (2015). Reconocimiento De Objetos Inmersos
En Im
´
agenes Est
´
aticas Mediante El Algoritmo Hog
Y Rna-Mlp. Universidad Tecnol
´
ogica de la Mixteca,
M
´
exico (2015).
H. Vega, A. Cortez, A. M. Huayna, L. Alarc
´
on, P.
Romero. (2017). Reconocimiento de patrones
mediante redes neuronales artificiales . url:http://
sisbib.unmsm.edu.pe/BibVirtual/Publicaciones/risi/
2009 n2/v6n2/a03v6n2.pdf.
I. Ortiz (2016). Google Visi
´
on Api. url:https://
elandroidelibre.elespanol.com/2016/02/google-
vision-api-reconocimiento-de-fotos.html.
J. Cano, J. C. P. C. (2003). Vehicle license plate segmenta-
tion in natural images. Pattern recognition and image
analysis, pages 142–149.
Lanzarini, L. and Giusti., A. D. (2014). Aplicacion De Re-
des Neuronales Al Reconocimiento De Patrones En
Imagenes Medicas. Universidad Nacional de la Plata,
Argentina (2014).
Nilsson, N. (2001). Inteligencia Artificial:Una Nueva
S
´
ıntesis. Mcgraw-Hill Grupo Editor, Espa
˜
na (2001).
OpenCv Team (2017). OpenCv . url:https://opencv.org/.
P. Garc
´
ıa. (2013). Reconocimiento De Im
´
agenes Utilizando
Redes Neuronales Artificiales. .
Pajares, G. and de la Cruz, J. (2008). Visi
´
on Por Computa-
ITSCO 2018 - Special Session on Internet of Things and Smart Communities
436
dor: Im
´
agenes Digitales Y Aplicaciones. Alfaomega
Grupo Editor, M
´
exico (2008).
Paucar, L. and Tasiguano, C. (2016). Desarrollo de algorit-
mos para el reconocimiento de placas de veh
´
ıculos.
Peralta, A. (2009). Reconocimiento de imagenes a tra-
ves de su contenido. Universidad Pontificia Comillas,
8(1):202.
R.Radha, C. (2012). A novel approach to extract text from
license plate of vehicles. Signal & Image Processing,
3(4):181–192.
Serrano, A. G. (2013). Inteligencia Artificial: Fundamen-
tos, pr
´
actica y aplicaciones. Alfaomega Grupo Editor,
M
´
exico (2013).
IoT in Services for Communities in the Recognition of Plates with OpenCV-Python
437