Implementation of an Available Parking Space Detection System in Hectic Parking Lots

Abstract

Parking automation has been developed for locating available parking spaces inside a parking lot with new technologies, such as automatic collection, capacity, or empty spaces’ detection; to both reduce search time and avoid crowds of vehicles waiting to park in it. A simple detection system of available spaces, within the Faculty and Staff parking lot of the Engineering and Chemistry Departments at the Autonomous University of Chihuahua, Mexico (UACH), was set up. First, an analysis of vehicle capacity was carried out to establish the peak hours of vehicles’ entrances and compare it to the parking lots’ capacity. For one working week (6 days), it was determined that Tuesdays have the highest vehicle occupancy, and Saturdays are the days with the least traffic. Second, the geometric design of the parking lot (divided into two areas because of the terrain topography: upper and bottom levels), its dimensions and location of parking spots and marks on the pavement for traffic directions, were obtained from its blueprint, to visualize how the surveillance cameras can be oriented to cover the area. A detection system prototype was created for a specific area of the parking lot, using an artificial vision technique to perform the video extraction, while the digital image processing was developed in MATLAB. To complement and achieve the objective, Object- Oriented Programming (OOP) was used to obtain the count analysis as well as the availability/occupancy of each of the parking areas. This information is shown on a web page, with a simple driver-friendly design, since it has each parking space number and its availability in blue with the word “Available” or, in the opposite case, the word “Taken” in pink.

Share and Cite:

Gómez-Ruíz, D. , Espejel-García, D. , Ramírez-Alonso, G. , Espejel-García, V. and Villalobos-Aragón, A. (2021) Implementation of an Available Parking Space Detection System in Hectic Parking Lots. Journal of Transportation Technologies, 11, 688-701. doi: 10.4236/jtts.2021.114043.

1. Introduction

Worldwide university communities grow yearly, and the Autonomous University of Chihuahua (UACH) is no exception. In the past decade, enrollment has grown from approximately 26,000 students in 2010 to 29,180 by 2019 [1], increasing along with it the need for parking spaces. UACH’s Engineering and Chemistry Departments, the object of this study, has parking space issues during peak hours, with drivers wasting a lot of time locating where to park. Due to these arguments, a need to implement an intelligent system arises, which allows drivers to easily and quickly visualize where there are places available, thus optimizing times, reducing accidents and CO2 emissions.

Drivers in big cities spend an average of 20 minutes hunting for a parking space [2], making parking one of the most inefficient daily activities. A study realized by the company INRIX in 2017, Americans spent about 17 hours a year hunting for parking spots, and they wasted around 345 dollars in time, fuel, and emissions [3]. Globally, this inefficiency has big consequences in our lives: 30% of urban traffic is generated by drivers looking for parking [4], in average, more than 50 hours per driver are spent looking for a parking spot annually [5]; the time and fuel wasted costs consumers and local economies about $600 million US dollars per year [5]. Bill Ford, Executive Chairman of Ford Motors, warned in 2011 that “the freedom of mobility is being threatened”, since the world fleet of 800 million cars will grow to 2 - 4 billion by 2050, when 75% of the population will live in cities. This will lead to a “global gridlock”, which “will stifle economic growth and our ability to deliver food and healthcare”. The solution to this challenge is not to build more roads, but to develop smart roads, smart public transportation, and smart parking [6].

Automation inside parking lots has allowed drivers to be comfortable and safe, using programmable technology [7] [8] [9]. These techniques provide various tools, such as the use of a digital platform with a guide detection of empty spaces system, to indicate which parking spot is available or occupied within the parking lot. This project developed an available spaces detection software prototype for a small area within the Faculty and Staff parking lots at UACH’s Engineering and Chemistry Departments. With the development of an application, it was possible to detect empty or occupied parking spots, through a driver-friendly web page. The main purpose of this research was to contribute and benefit the UACH’s community and to improve the service to the vehicle fleet. Additionally, to reduce the driving stress to all staff and students, while helping find available space to leave your vehicle in a safe and timely manner.

1.1. Background

Since the end of the 19th century, specifically in 1885, when the first vehicle was built, and in 1889, when the first car making companies were created, automobiles have been considered as the main means of transport [10]. Since the 1990’s, the number of private vehicles has increased to such an extent that it has exceeded the capacity of the road infrastructure of urban centers. This has made circulation more difficult, therefore generating large parking demands, leading to the need to adapt automation within a vehicular parking system [11].

Parking automation is considered the global trend procedure to solve the above-mentioned issues. Implementing new technologies, such as automatic collection, capacity, or empty spaces’ detection, within public spaces, are some of the solutions being implemented to this date [12]. In the case of public parking lots, with a rate according to its time of use, automation turns out to be a good business, while for private parking lots, is also considered as an opportunity area for administration and optimization, to automate services and/or control of access and exits [13].

1.2. Current Parking System in Mexico

In Mexico, most of the parking lots do not have highly structured systems, since access control is generally done manually, causing the availability of spaces to be validated through a personal review. However, to improve the parking service, as a minimum, a basic model is required, in which generally there is a surveillance booth, operated manually [14]. Whether or not there is a security booth, at least one person must be present at the parking lot’s access point, responsible for providing information about whether there are enough parking spaces available and delivering a ticket with the date and time of entry. However, there are places where only a ticket is provided, and the driver must circulate through the whole parking lot until an empty space is located. This model could also be improved by adding the use of automatic barriers and card/ticket readers [14].

1.3. Applicable Technology in Parking Lots

Current technological advances developed to optimize parking lots include pass printing and automatic payments, efficient lighting systems, intelligent systems to find available parking spots, and even chargers for electric vehicles [12]. To run a system or application that specializes in empty spaces’ detection, the Arduino platform implementation, with artificial vision or video detection, and a Radio Frequency Identification (RFID) technology was implemented [15] [16]. It should be considered, however, how these systems typically present high costs for installation and execution [16].

1.4. Smart Parking Systems in Latin America

In Latin America, some projects have been carried out, such as in the Pontifical Catholic University of Peru (in 2008), where a vehicle detection system for a parking lot was developed, recognizing the presence of cars through a detection sensor that was installed in the access lane and another in the exit lane, limiting vehicles to enter and exit using the same lane [17]. In Ecuador in 2011, the National Polytechnic School developed the PROPARK tool. This system enables searches in any smart phone, users can find the closest parking spot to their location, as well as availability of other unoccupied places. Its operation requires global positioning system (GPS), wireless technologies such as Bluetooth, and consultation through text messages (SMS) [18]. In 2012, the Army Polytechnic School (Mendoza and Romero, 2012) presented an artificial vision system, which consists of an image processing system, which allowed or denied access to vehicles wishing to enter the university. All information is processed in data analysis system [19]. Also, in the National Polytechnic School of Ecuador (2014), a smart vehicle accommodation system was designed through video recording and the implementation of a test prototype. After digital images are processed in the application, through matrices, recognizing the parking area of each of the available and occupied spaces, thus providing a result to the app user [20].

1.5. Smart Parking Systems in Mexico

In 2011, the Technological Institute of Aguascalientes presented a project where the main goal was to automate and provide support for greater security to achieve vehicular access control. The automation works with RFID technology, a radio frequency identification card, with a unique and unrepeatable number, which manages to provide security [21]. Also, a proposal for smart parking based on sensors with internet in the Malecon area and downtown Mazatlán, was developed by the Autonomous University of Sinaloa, using an optical photoresistor sensor (LDR). It works with light interruption, if an obstacle interrupts the passage of light, the LDR increases its resistance and interrupts passage of current through the control circuit. These are installed in each parking spot and then connected to the Internet via Wi-Fi. Later, a mobile application in Microsoft C # language and the .NET platform were developed since it is cross-platform for optimal operation [22]. In 2018, a parking space counting prototype was developed at Puebla’s Iberoamerican University. An optical sensor was placed in each parking space, it detected the presence of a person or an object that interrupts light reaching the sensor, which use solar cells to charge the sensors’ batteries. For the LED lamp panels, red and green LEDs were used to signal the system. In addition, resistors, an Arduino Uno system (which is necessary for the counter programming) were used [23].

2. Methodology

The main goal of this project consisted in developing an accessible and not expensive parking spot detection system prototype. The study area included only the parking spaces reserved for Faculty and Staff at the Engineering Department at UACH (Figure 1). To complete the prototype development, the project was carried out in several stages, where each of them needed to be finished before starting the next one.

2.1. Geometric Design

The geometric design of the parking lot facilities was visualized both in situ and

Figure 1. Faculty and Staff parking spaces distribution of the Engineering and Chemistry Departments at UACH [24].

digitally. It was possible to recognize the entire area with the bay designs and each parking space location. An interesting fact about this parking lot is that all vehicles must be parked in reverse, making the system’s goal easier. It is also necessary to mention, that the parking area is not homogeneous, since it has spaces separated by narrow connectors and differences in elevation, in addition to the access point, with a booth, located in its middle section.

First of all, it was necessary to generate an inventory of all available parking spaces, and due to the complexity of the parking lot’s terrain, it was divided into two areas: area “A”, made up of all the space located to the west of the access booth, only accessible through a card reader sensor west of the booth; and area “B”, which encompasses the surface located to the east of the booth, the Chemistry Department parking space, as seen in Figure 2.

Parking spaces were grouped by color following their function, others by their geometry and usage. The colorless parking spots in Figure 2 are those available without restrictions. The ones in green are reserved for pregnant women and seniors; and those in blue are reserved for people with disabilities or wheelchairs. Finally, the spots shown in red are reserved for institutional vehicles such as cars, busses, vans, etc. In addition, there are some parking spots poorly drawn and with a size that does not correspond to standard measurements. Furthermore, some spots are designated for official vehicles (busses, vans, or even trucks). Table 1 shows the distribution of parking spots by parking area. According to the different existing categories it was possible to determine capacities for both area A and area B.

2.2. Vehicle Capacity

Vehicle capacity was measured by counting all the vehicles entering and leaving the parking lot during a 24/7 period. The study was carried out using a TimeMark air impulse gauge with 4 inlets for pneumatic tubes, being placed at the access point in area A. Other counting devices were installed at the entrance/exit door

Figure 2. The engineering (a) and chemistry (b) Departments’ parking lot division in two broad parking areas. Black spot: access booth; blue zones: disability spots; green zones: seniors and pregnant women spots; red zones: institutional vehicles spots.

Table 1. Distribution of numbers of parking spaces according to their classification.

to area B, where 4 pneumatic tubes were used for 6 days. After all this, the gauges with their respective pneumatic tubes were removed, data was downloaded, and files were transferred from the counter to a computer using the Vehicle Identification and Analysis System (VIAS software). The data was organized in tables and graphs, where it was classified according to date, hour, and number of vehicles, allowing to distinguish peak hours, total capacity and, above all, vehicle rotation.

2.3. Machine Vision and Video Processing

The parking lot in question has a surveillance camera that can only monitor area A at its top (Figure 3), so the prototype only focuses on this zone. All information provided by the camera was acquired, and those videos that focused the parking spots with a clear line sight were delimited. Having the artificial visualization of the study area, several scenarios were considered, such as the empty parking lot, the parking maneuvers, and a completely packed parking lot, to be able to process the video through the images obtained. Once the video is captured, it is converted to a sequence of images (JPEG files). The Ffmpeg program for Windows needs to be downloaded; then, work with the commands Prompt (cmd) and Ffmpeg to convert the video into images. The video is trimmed to

Figure 3. View of the surveillance camera of the parking lot area “A”.

obtain the necessary images and they must be placed in the same folder where the video is, to work with them at the same time.

2.4. Object-Oriented Programming (OOP) in MATLAB

To create the empty spaces’ detection program, a reading and writing images execution algorithm was developed using an Object-Oriented Programming (OOP) within MATLAB 2016. First thing done was to extract the “base” image that is represented by the empty parking lot, giving it a numerical value starting from the left side to the right side (Figure 4(a)). Subsequently, the cursor delimits the area of each of the parking spots, determining their X and Y coordinates, in addition to creating a polymask to make the comparison with other images where time has elapsed (Figure 4(b)).

This polymask was designed in a binary way through the drawn polygon (Figure 5(a)); it is represented by the number 1 and graphically is white, which is the determined area of the parking spot. The number 0 is represented by the black color, which is the area that complements the parking image of the other parking spaces and the environment. Subsequently, the comparison was made at different times where the parking space is occupied and when it is free. For this, the MATLAB SURF feature detector function was used with the input images in gray scale, where coincident points are obtained in the image sets. The SURF detector process begins by finding the image characteristics, then these are extracted, and the points of interest are marked.

When the parking spot is occupied by a vehicle (Figure 5(b)), no characteristics matches appear by comparing the input image with an empty space, or base image, previously saved. Instead, when the space is empty, the interest points of the input and base images are very similar, and a match is produced. The red circles and green signs on Figure 5(c) indicate the exact location of these coincidences. When the detector process (the SURF feature in MATLAB) ends, an analysis is made with the results of the variables of the points of interest, so that the result is displayed and exported to a text file, informing when a parking spot is free or occupied.

Figure 4. Base image used for the prototype. (a) Numbered parking spaces; (b) MATLAB delimitation of the parking space.

Figure 5. MATLAB SURF detector process. (a) Polygon drawn for a parking space; (b) Same polygon with a vehicle; (c) Same polygon for the empty space, where points of interest from the base image are detected.

2.5. Webpage

A website was created to show users the available parking spots, and which ones are already occupied, allowing the drivers to go to the place where can park with no loss of time. In addition, the representative way of the results was modified using only the parking space number (0 or 1). The number 1 is used for spots not available and number 0 for the free ones, which is saved in the text file.

The development of the steps to create the web page is represented in a flowchart (Figure 6). The Wampserver software was used, it served as an auxiliary to have a server on the laptop, and to process all the previous analysis in MATLAB. With the help of the test server, it was possible to assess different web designs, and make changes quickly. The web page can be accessed from the local network or by enabling the accessibility settings from the internet with an IP address. It was necessary to have all the files on the web page in a folder inside the Wampserver server document root folder (wamp64), as well as the MATLAB processing

Figure 6. Flowchart followed to detect empty parking spaces.

files. All the required prototype files were stored in the app folder, in the text file of the web page, it was written in html language and with the support of Php. To access the website, the Wampserver must be activated so that the user can enter with the following link localhost/app or with an IP/app address, 192.168.42.48/app. Both the users and the server must be connected to the same wireless network for its correct operation.

The text file that MATLAB generated with the binary representation of the available parking spaces (Figure 8), was extracted by the app webpage, and then it created an auxiliary variable ($aux[ ]), where the numbers’ chains were stored.

Continuing with the webpage code, a loop with a control variable was applied ($i), starting with number “0” and repeating until reach the number of parking spots analyzed. Additionally, a basic function was executed to subtract the characters, and with the help of the conditioning “if”, it was able to evaluate the numbers, leaving “0” for available and “1” for taken spots. Finally, with the help of Quixlab graphic interface, it was possible to create a friendly visual representation of empty parking spots for users.

3. Results

3.1. Vehicle Capacity Analysis

Vehicle counting in and out of the parking lot, as mentioned above, was carried out in a 24/7 for an entire week. The hour with the highest incidence of entries during the week was detected from 7:00 am to 10:00 am (Figure 7(a)). Unlike the hours of entry, the peak hours of departure varied according to the day, although it is constant between 13:00 and 15:00, and between 18:00 and 21:00 with a different magnitude, as appreciated in Figure 7(b). The day with the highest vehicle turnover in the 200 available parking spaces, was Tuesday with a rotation

Figure 7. Representative histograms of entries and exits of the parking lot on Wednesday. (a) Entries; (b) Exits.

of 98.3%, followed by Wednesday with 92.3%, Thursday with 84%, Friday 83.8%, Monday with 75% and finally on Saturday with only 14.3%.

Comparing the parking lot capacity with the vehicle counting analysis, it is notable how during mornings of weekdays, finding an available parking spot without delay gets more complicated. Is during these “congested times” when the proposed detection system would help greatly.

3.2. MATLAB Analytic Tests

Several tests were performed using the algorithm created in MATLAB, to assure the correct operation. Above all, it was possible to reach the exact count of the availability in each of the parking spaces in different images. As can be seen in the upper portion of Figure 8, four spots are occupied/taken: 3, 4, 5 and 6 and the rest are free, in addition, this same interpretation appears in a text box using numbers 1 and 0, as previously explained (Figure 8 below).

3.3. Functional Tests of the Website

When entering the localhost/app address or the ip/app/address in the browser, just press enter to view the web page as shown in Figure 9.

Shown in the prototype webpage are the parking slot number, a drawn car, and a text box. If the parking spot is available, it is presented with a blue car accompanied by a text box of the same color with the word “Available”. If the spot is occupied, the spot is represented with a pink car and a text box of the same color displaying the word “Taken”. Then there is a button to update the information shown in the page. This prototype webpage needs to be improved by adding a map of the parking spot numbers, as suggested by the test users.

Figure 8. Parking spots with and without vehicles, and the respective MATLAB output represented with 0 (empty/available space) and 1 (taken space).

Figure 9. Access to webpage with localhost/app, showing the free and occupied spots (in blue and pink, respectively).

4. Conclusions

This project allowed designing a simple parking detection system prototyping in a crowded parking lot. Only the use of a camera, a computer, digital data processing, and free software support is required. It is possible to detect and report the available parking spaces in a parking lot through image processing. This search system provided the parking spot’s availability, allowed quick decision-making when looking for parking spaces alternatives, avoiding the stress of searching the entire area to find an available place. It also helps in reducing CO2 emissions and, increases productivity while reducing parking related stress for the UACH’s Staff.

Machine vision and image processing eased the prototype design, so it was possible to manipulate images from a video, to understand their relationships with a function attached to MATLAB. With the SURF detector, it was possible to extract the characteristic and relevant points of an image, then later determine if there is an object or not. In addition, throughout the development process, functionality tests were performed by making a visual comparison with images, thus corroborating the detection system. With the polymask binarization, essential for the program to run efficiently, it was possible to discriminate unnecessary information outside the parking spaces, and in turn, generate the coordinates and the specific area for each parking spot, to make the analysis and avoid delays in executing it with so much information.

Effects caused by changes in environmental lighting while image processing, was a variable not evaluated in this research, since it may cause many problems, especially in night shifts, as the prototype had a conflict with the shadows of the trees during daylight. This remains as a future work point. A user-friendly web page allowed to show the final data obtained in the prototype, so that it can easily be seen by users, on digital media such as computers, tablets and/or cell phones.

Acknowledgements

The authors express their gratitude to the Facultad de Ingeniería from the Universidad Autónoma de Chihuahua, specially to Dr. Cornelio Alvarez and M.I. David Maloof for all their support and contributions to this research.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Universidad Autónoma de Chihuahua (2019) Estadística Básica: Administración 2016-2022.
https://uach.mx/assets/media/publications/2017/10/143_agenda-estadistica/estadistica-basica-2019.pdf
[2] IBM (2011) IBM Global Parking Survey: Drivers Share Worldwide Parking Woes.
https://www-03.ibm.com/press/us/en/pressrelease/35515.wss#release
[3] Parking Logix (2019) Is the Search for Parking Making Your Roads Congested?
https://parkinglogix.com/search-for-parking-roads-congested/
[4] Shoup, D.C. (2006) Cruising for Parking. Transport Policy, 13, 479-486.
https://doi.org/10.1016/j.tranpol.2006.05.005
[5] Frost & Sullivan (2006) Strategic Analysis of Smart Parking Market in Europe and North America. Department of Urban Planning. University of California, Los Angeles.
[6] Worldsensing.
http://www.worldsensing.com
[7] Heimberger, M., Horgan, J., Hughes, C., McDonald, J. and Yogamani, S. (2017) Computer Vision in Automated Parking Systems: Design, Implementation and Challenges. Image and Vision Computing, 68, 88-101.
https://doi.org/10.1016/j.imavis.2017.07.002
[8] Jang, C., Kim, C., Lee, S., Kim, S., Lee, S. and Sunwoo, M. (2019) Re-Plannable Automated Parking System with a Standalone around View Monitor for Narrow Parking Lots. IEEE Transactions on Intelligent Transportation Systems, 21, 777-790.
https://doi.org/10.1109/TITS.2019.2891665
[9] Wu, G., Xu, X. and Lu, X. (2020) Considering the Influence of Queue Length on Performance Improvement for a New Compact Robotic Automated Parking System. International Journal of Information Management, 50, 487-497.
https://doi.org/10.1016/j.ijinfomgt.2019.04.002
[10] Garber, N.J. and Hoel, L.A. (2014) Traffic and Highway Engineering. 5th Edition, Cengage Learning, Boston.
[11] Gutiérrez, W. (2017) Automatización de estacionamientos en los parqueaderos de centros comerciales en Valledupar.
https://scholar.google.es/scholar?hl=es&as_sdt=0%2C5&q=AUTOMATIZACI%C3%93N+DE+ESTACIONAMIENTOS+EN+LOS+PARQUEADEROS+DE+CENTROS+COMERCIALES+EN+VALLEDUPAR&btnG=
[12] Graviton.
https://www.graviton-espacios.com/
[13] Ruiz, A. and Alexander, R. (2015) Diseño de un prototipo de aplicación móvil (android) “parquil” para la administración y localización de parqueaderos públicos ubicados en las parroquias rocafuerte y pedro carbo-concepción de la ciudad de guayaquil.
http://repositorio.ug.edu.ec/handle/redug/11655
[14] Parra, S., Motta, N. and García, W. (2016) Diseño de Prototipo de software móvil para la programación y control del parqueadero UD. Universidad Distrital Francisco José de Caldas, Bogota.
http://repository.udistrital.edu.co/bitstream/11349/5131/1/RoaParraSandraMilena2016.pdf
[15] Kinyanjui, K.E. and Kahonge, A.M. (2013) Mobile Phone–Based Parking System. International Journal of Information Technology, Control and Automation, 3, 23-37.
[16] Sojos, A., Nugra, M. and Ernesto, H. (2016) Desarrollo de una aplicación loT para el monitoreo y predicción del tráfico en la avenida Simón Bolívar de Quito, utilizando una red de sensores basados en la plataforma Arduino. Universidad de las Fuerzas Armadas ESPE, Sangolquí.
http://repositorio.espe.edu.ec/jspui/bitstream/21000/12113/1/T-ESPE-053394.pdf
[17] Bohorquez, I.B. (2008) Diseño de un sistema electrónico para el aviso automático de disponibilidad en estacionamientos vehiculares. Pontificia Universidad Católica del Perú, Lima.
https://tesis.pucp.edu.pe/repositorio/handle/20.500.12404/263
[18] Porras-Torres, E.X. (2011) Desarrollo de un sistema prototipo de consulta de parqueaderos libres. Escuela Politécnica Nacional, Facultad de Ingeniería Eléctrica y Electrónica.
http://bibdigital.epn.edu.ec/bitstream/15000/3877/1/CD-3706.pdf
[19] Mendoza, D. and Romero, W. (2012) Diseño y construcción de un prototipo de sistema de control para monitorear e incrementar la seguridad en el acceso vehicular al parqueadero de la ESPE-L, utilizando procesamiento digital de imágenes. Departamento de Ciencias de la Energía y Mecánica; Carrera de Ingeniería en Mecatrónica. ESPE. Extensión Latacunga.
http://repositorio.espe.edu.ec/jspui/handle/21000/5878
[20] Veintemilla D.J. and Siguencia Y.F. (2014) Diseño de un sistema inteligente de parqueo vehicular mediante videograbación e implementación de un prototipo de prueba para la FIEE. Escuela Politécnica Nacional, Facultad de Ingeniería Eléctrica y Electrónica.
http://bibdigital.epn.edu.ec/bitstream/15000/7853/4/CD-5666.pdf
[21] León, O.E. (2011) Estacionamiento Automatizado con Tecnología RFID. Conciencia Tecnológica, No. 42, 71-73.
[22] Hernandez, C., Perazca, J., Olivarría, M. and Cobain, J. (2017) Estacionamiento Inteligente basado en sensores con Internet de las cosas en la zona del Malecón y Centro de Mazatlán. Universidad Autónoma de Sinaloa, Culiacán.
https://www.redtis.org/index.php/Redtis/article/view/12
[23] Acosta, L.A. (2018) Desarrollo de un prototipo de conteo de lugares de estacionamiento vacíos en la Universidad Iberoamericana de Puebla. Universidad Iberoamericana Puebla, Puebla.
https://repositorio.iberopuebla.mx/handle/20.500.11777/3848
[24] Google Earth (2021) Universidad Autónoma de Chihuahua, Facultad de Ingeniería, Campus II 28°42'8.38" N and 106°08'19.09" W.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.