Keywords

1 Introduction

Smart cities offer various opportunities for technological advancements and improved accessibility. As modernization progresses, people are experiencing a significant increase in vehicle ownership. Many towns and cities around the world, especially urban areas, are encountering challenges in locating available parking spaces in all parking areas. This scarcity of parking spaces has resulted in inconvenience for vehicle users during their trips and may negative effect on driver behaviours. Additionally, it has given rise to various issues such as traffic congestion, traffic accidents, stress and difficulties in finding suitable parking lots, and limited parking accessibility [1]. According to a United Nations [2] report, the global population was evenly divided between urban and rural areas, primarily due to an unprecedented surge in urbanization. However, this rapid urban growth in the last century has led to several challenges such as increased traffic congestion, traffic chaos in cities, air pollution, and a lack of parking spaces. In the last two decades, private car utilization has significantly increased, yet the availability of parking spaces has not kept pace [3]. This imbalance results in citizens wasting a considerable amount of time searching for available parking spaces, exacerbating traffic congestion and air pollution. Current technological systems focus on to optimize parking space utilization to estimate the utilization status of parking areas, such as determining the vehicle numbers and available lots.

In recent years, numerous authors have put forth computer vision-based approaches to tackle parking lot management challenges. These approaches primarily involve processing images obtained from parking lots and addressing various objectives. These objectives encompass: a) Automatic detection of parking space positions; b) Classification of individual parking spaces: and (c) Vehicle detection and counting in images. All these tasks serve as fundamental components of smart parking solutions, which aim to provide automated parking lot management. Examples of such management include dynamic pricing based on the number of cars in the parking lot and guiding drivers to the nearest available parking space. Smart Parking solutions are crucial as they not only optimize the utilization of parking spaces but also save both time and fuel for drivers [4, 5]. Nowadays, smart parking systems have also begun to be integrated into the concept of smart cities. Thus, smart parking solutions promote the application of cutting-edge technologies such as the Internet of Things, computer vision, machine learning, and 5g networks to enhance the effective parking areas.

This study developed software that detects available free parking spaces in three different outdoor parking lots located within Ondokuz Mayıs University (OMU) Central Campus, using three different cameras placed in those parking lots. The information about the available spaces is then displayed on digital screens at the entrances of the parking lots, allowing drivers to see the vacant spots. With this user-friendly software, both time and fuel can be saved as the confusion in the outdoor parking area and its surroundings decreases. Along with reduced fuel consumption, an environmental gain can also be achieved. Additionally, drivers will experience less stress due to improved operational performance of the outdoor parking lots, leading to indirect health benefits. The developed empty parking space detection software is unique compared to its existing examples. The developed new software works as completely user-friendly and it allows the operator using the software to perform all maintenance and calibration tasks after installation. This software enables parking lot operators to define the boundaries of all parking slots themselves compared to existing samples. The software also supplies opportunity to make necessary adjustments and modifications (if needed) and connects the desired camera footage to the software. Thus, users can make edits using the tools provided by the software in case of errors. Additionally, it has a distinctive structure compared to its current examples which area actively used in the fields This software also supplies full access and editing rights to the users and it is a big difference from the current other examples. Moreover, there will be no maintenance or update requirements from the developer after the initial installation that is generally expected to be preferred by outdoor parking lot operators.

2 Literature Review

Numerous studies have been conducted to develop efficient parking systems to estimate parking occupancy and count cars in car parking areas. In their study, Almeida et al. [6] introduced a new parking lot dataset, revealing the need for different classification techniques to address primary challenges. They provided a parking lot dataset consisting of 105,837 images captured from various angles in different parking areas. Another parking lot dataset with 480,000 images under different climatic conditions was proposed using convolutional neural networks [7]. These datasets highlighted the importance of employing different classification techniques to address primary challenges. In another study, Ahrnbom et al. [8] proposed machine learning algorithms SVM and Linear Regression with six quantized values. They also developed an algorithm capable of obtaining a set of canonical parking spaces and estimating their structure based on a pre-trained model generated from the system. Huang and Wang [9] utilized image-based methods to classify parking spaces and cars, while Lee et al. [10] developed a monitoring approach using videos for outdoor parking lots. Horprasert et al. [11] presented background subtraction for static images obtained from cameras, enabling statistical estimation of background and calculation of parking occupancy. Huang et al. [12] proposed a Bayesian structure for formulating vacant parking spaces that worked effectively during both day and night. Masmoudi et al. [13] focused on the issue of missed spaces between parked cars, which can affect system accuracy. Jermsurawong et al. [14] presented a customized method for determining parking space occupancy based on specific objectives.

Other studies have also explored various features and techniques in parking systems. Tschentscher et al. [15] and Ahrnbom et al. [8] utilized colour histograms and colour space analysis, respectively. Delibaltov et al. [16] developed a unique 3D model-based structure that effectively addressed occlusion issues encountered during occupied parking space calculation. Wu et al. [17] employed a Bayesian classifier based on edges, corners, and wavelet features to detect cars and overcome challenges posed by illumination changes. Seo and Urmson [18] proposed a method utilizing aerial images as input for detecting empty spaces in parking lots. They also introduced an algorithm capable of obtaining canonical parking spaces and estimating their structure using a pre-trained model generated by the system. Several authors, including Lu et al. [19], Tang et al. [20], Badiiet et al. [21], and Kotb et al. [22], have contributed to this line of research. For example, Huang and Wang [12] employed image-based methods to classify both parking spaces and cars. Lee et al. [10] developed a monitoring approach for outdoor parking lots using videos. Horprasert et al. [11] presented background subtraction techniques to estimate background information at specific time intervals and statistically analyze the data for calculating parking occupancy. In a study by Schneiderman and Kanade [23], Gabor filters were used to train a classifier on images captured under different lighting conditions, specifically focusing on unoccupied parking slots. This approach enabled the system to detect whether a vehicle was present in the slot or not. Bayesian structures have been found effective for formulating vacant parking spaces, functioning well in both day and night situations. Manase et al. [24] emphasized the occlusion challenges in parking lots, particularly the spaces between parked cars that can be missed and impact system accuracy. Saharan et al. [25] proposed a sensor-based solution for collecting real-time parking availability data. Jermsurawong et al. [14] presented a customized method for determining parking space occupancy using neural networks and visual-based feature extraction. Furthermore, recent studies have explored emerging concepts such as IoT-based techniques, image processing, and fog removal elimination [26,27,28,29]. These advancements contribute to the development of smarter parking systems in Smart Cities. Currently, In the scope of smart cities, the detection of free parking spaces in outdoor parking lots primarily relies on two different techniques and technologies:

  • Sensor-Based Technologies: These technologies involve the installation of sensors beneath the asphalt to detect the presence or absence of vehicles. The sensors can accurately identify whether a parking space is occupied or vacant. By utilizing this approach, cities can efficiently manage parking spaces, mitigating challenges such as traffic congestion, reducing air pollution, minimizing waiting times for parking, and enabling a more self-governing parking system.

  • Vision-Based Technologies: Image-based technologies utilize cameras to observe parking areas and employ computer vision methods to determine capacity utilization. By analyzing the images captured by the cameras, the system can determine the availability of parking spaces. This approach provides a cost-effective and flexible solution for parking management. Vision-based technologies offer advantages such as easier maintenance and lower installation costs compared to sensor-based systems.

The adoption of these technologies in smart cities facilitates effective parking space management, helping to address associated challenges and improving the overall urban experience. By accurately detecting parking space availability, cities can optimize parking utilization, reduce congestion, and enhance the convenience and satisfaction of residents and visitors.

Sensor-Based technologies are widely implemented in smart parking systems for smart cities, offering various benefits such as minimizing traffic jams, reducing air pollution, and decreasing waiting times for parking vehicles. This technology enables self-governing parking systems that enhance overall efficiency. One implementation of Sensor-Based technology utilizes Bluetooth, allowing users to identify vacant parking slots through their smartphones [30]. This system finds application in diverse settings like shopping malls, cinema halls, and universities. Nath et al. [31] discussed two different variations of the parking system, concluding that IoT (Internet of Things) technology, particularly at level 1, is well-suited for implementing smart parking solutions. Users can identify available parking slots using their smartphones or laptops [32]. Wireless sensors, computer vision, and Android technologies are employed to identify parking spaces [33]. While sensor-based networks and vision-based systems have been proposed for Parking Detection Systems (PDS), sensor-based networks have limitations due to the high cost and complexity of installing individual sensors. Consequently, large parking areas with numerous spaces cannot be feasibly monitored with individual sensors. In contrast, vision-based systems offer advantages in terms of cost and maintenance compared to sensor-based systems. As a result, a framework has been suggested that determines the optimum parking systems through advanced feature extraction and machine learning techniques, leveraging the benefits of vision-based approaches.

Another popular and effective technique is vision-based technology utilization. Vision-based technologies have gained popularity as an effective technique in parking systems, with several researchers making significant contributions in this field. For instance, Al-Kharusi and Al-Bahadly [34] proposed an innovative system that utilizes image processing techniques to detect parking spaces. Their system captures and processes images of the parking lot, providing drivers with access to this processed information to locate available parking spots. This groundbreaking approach has paved the way for a unique parking management system based on License Plate Recognition [35]. Not only does this system provide accurate vehicle information, but it also records entry and exit times. Additionally, it offers real-time video streaming, ensuring the availability of the most up-to-date and relevant information about vehicles, even at high speeds. The LPR model has demonstrated impressive results, achieving a remarkable 95% success rate in real-time implementation. Another noteworthy advancement is the introduction of an innovative parking space detection system based on image processing techniques, which offers improved efficiency and accuracy compared to moving objects [36]. This system relies on image processing instead of sensor-based technology, as it is considered more effective and cost-efficient. The study not only sheds light on existing parking services but also discusses their economic viability, highlighting the limitations of current parking methods in terms of reliability, modernity, and efficiency [37]. Furthermore, a noteworthy approach involves the implementation of a secure parking system that utilizes video analysis to determine human behaviours [38]. An image registration algorithm is employed to register incoming and outgoing vehicles, maintaining a record of available parking slots. Support vector machine classification is also utilized to monitor activities within the parking area.

Additionally, an effective car parking detection system based on Wireless Network Sensors (WSIV) has been established, where nodes detect and monitor the availability of parking lots [39]. The parking management team collects detailed information on vacant parking spaces, security, and statistical data using CrossBow Motes to implement the system. In another study by Postigo et al. [40], the authors propose an innovative method that utilizes a static surveillance camera to estimate the size of non-measured free parking areas. Various systems described in the literature have their own advantages and limitations. However, careful observation has highlighted the need for a new intelligent outdoor parking system to effectively address the existing problems. Currently, many car parking areas lack proper management systems and rely on manual handling without the support of scientific equipment or systems. This often leads to significant time wastage for people searching for suitable parking spaces, particularly in metropolitan cities where the availability of free parking spaces is scarcer compared to rural areas. The main reason behind this scarcity is the lack of modern technologies installed in parking current outdoor parking areas. The aim of this study is to provide parking lot operators with the possibility of monitoring and management of empty spaces with simple equipment at their disposal. During the study, image processing algorithms will be used to first detect the empty space. Then, with the help of the developed algorithm, the system will be able to instantly display the results to the user and operator. Users will be able to achieve maximum performance by changing the parking limits at any time using the developed algorithm and the prepared software. In contrast to the existing studies in the literature, the algorithm developed within the framework of this study and the software that provides full open access to the users will be presented.

3 Study Site and Datasets

In the study, an image processing-based car parking slot detection analysis was performed on a dataset of a total peak 6 h in examined three car park areas which are located at the main campus of the Ondokuz Mayıs University in Türkiye (Fig. 1).

Fig. 1.
figure 1

a) A satellite image and b) schematic location of the Ondokuz Mayıs University main campus.

The study dataset has been obtained on different days and shows different parking behaviors at the examined three car parks. The dataset has been collected using three cameras that are oriented at different outdoor parking areas. All three cameras are named as ‘‘Cam-1”, ‘‘Cam-2” and ‘‘Cam-3” during the data collection process. ‘‘Cam-1” observes Car Park 1 (Fig. 2a), ‘‘Cam-2” monitors Car Park-2 (Fig. 2b), and ‘‘Cam-3” observes the Car Park-3 (Fig. 2c).

Fig. 2.
figure 2

Examined car parks (a) Car Park-1 (b) Car Park-2 and (c) Car Park-3.

Considering the varying perspectives of the cameras in the three car parks, the collected video footage exhibits different geometries. To achieve this, a total of 6 h of video was recorded for each camera across the three car parks, at a frame rate of 1 fps. The videos, amounting to two hours per car park, were captured on different days, ensuring coverage of various parking space configurations, including both “empty” and “fully” occupied scenarios. Table 1 provides a summary of the recorded videos included in the dataset, along with the observed vehicle counts for each video.

Table 1. Some information for the data collection and analysis.

4 Methods and Analysis

In the study, a benchmark approach was used to determine the occupancy status of parking areas from the video recordings. Specifically, it was considered solutions based on image processing from a video recording which is a popular computer vision. For this purpose, used working scheme for the study is summarized in the given Workflow in Fig. 3.

Fig. 3.
figure 3

Flowchart of the used methods during the occupied area determination.

The study, is focused on developing automatic full and empty parking spaces detection by detecting the coordinates of each parking space, manually. This process is shown in Fig. 4 where the operator defines each parking coordinate in the beginning of the system installation process.

Fig. 4.
figure 4

Determination of the coordinates of slots to develop software that detects occupied or empty park slots.

4.1 Car Park Occupancy Detection

In the study, a software is aimed to develop to detect occupied car parks. In accordance with this objective, a user interface design will be created using the Python programming language and the Tkinter library as given in Fig. 5.

In the software development process, the main purpose is to design a user-friendly interface to supply an easily understandable appearance. Thus, it may allow users to easily use it and make adjustments and calibrations suitable for their operations.

Fig. 5.
figure 5

An example coding of the developed algorithm.

During the development of the occupancy detection system, it is crucial to highlight the changes occurring in the region of interest compared to the image background. To determine these changes, the region of interest needs to be determined within the frame. Each area corresponds to an occupied spot, and the pixel-wise differences within each area are accumulated. To identify empty lots in the image, the technique used involves subtracting the background from the current frame. If the pixel weight exceeds a predefined threshold, it indicates the presence of a vehicle in the parking lot. The differences are then scaled, stored, and utilized to determine the changes in the examined area. By comparing the real pixel value with previous values, the system can filter out values that exceed the threshold. If night vision cameras or the necessary lighting infrastructure are available, the developed algorithm can work smoothly even at night. The slightest change in the pixel values in the parking lots can be used to determine whether the parking lot is empty or occupied. Again, empty parking spaces can be easily detected in rainy or cloudy weather using the developed algorithm. If the parking lot is covered with snow, the algorithm can detect the car by the change of the pixel value when the cars stop in the parking lot, but if the car is completely covered with snow, i.e. if the pixel value is the same in the entire lot, the algorithm unfortunately cannot detect the change until the car moves and cannot detect empty.

In the developed system, A Convolutional Neural Network (CNN) algorithm is used. This algorithm is a type of deep learning algorithm that is particularly well-suited for image recognition and processing tasks. The algorithm trains using a large dataset of labelled images, where the network learns to recognize patterns and features that are associated with specific objects or classes. In the study, it is worth noting that the used cameras are fixed, and the positioning of the parking lots is part of a calibration process that only needs to be performed once during the camera installation process. Therefore, the position of each lot is known, it is normal to determine the number of available parking lots by evaluating the status of each lot (free or occupied). For this scenario, three potential approaches are explored: image classification, object detection, and semantic segmentation. The image classification approach operates as given: an input image for the analysis, a small rectangular image patch is sampled around each lot to ensure it covers the entire lot. These image examples are sampled during both the training and testing process, relying on the specified coordinates of the parking lots during camera installation using CNN algorithm. Each extracted lot is labelled as either ‘empty’ or ‘full’ based on the occupancy status of the corresponding stall. Subsequently, a classifier is trained to differentiate between ‘empty’ and ‘full’ stalls. During analysis, the trained data is employed to determine the late status of each parking lot, enabling the system to get the count of occupied parking spaces. This situation is visualized in Fig. 6.

Fig. 6.
figure 6

Working infrastructure of the developed user-friendly car park area detection software.

In the system design, area examination limits are generated and assessed for car park area detection in the three examined car park areas, as depicted in Fig. 7. The obtained dataset has been manually named to provide the following information:

  • Park area: This identifies the region where the parking spaces are located (Fig. 4).

  • Total number of cars: This indicates the count of cars which is observed in parking area (Fig. 6).

  • Bounding boxes around each car: A bounding box is provided for each car within the observed parking area (Fig. 7).

  • Coordinates of the four corners for each parking lot: The coordinates are specified for each lot as shown in Fig. 8.

Fig. 7.
figure 7

Bounding boxes annotated for the full park and red for the empty park lot.

During the development process, a real screen image was captured in a real parking lot using an installed fixed camera. In the image, parking lots are indicated by green colour when they are empty and red colour when they are fully occupied (see Fig. 8).

Fig. 8.
figure 8

Parking lots for empty and fully occupied parking slots.

5 Conclusion

In the study, the occupancy status of three different parking areas (lots-based) in Ondokuz Mayıs University Campus has been investigated by using an image-based method. The study results were obtained from a real-site data from the examined areas. An algorithm has been developed using parking utilization videos obtained from real sites (a data source) and the data has been processed into areal processed data to make it ready for programming. In the next step, user-friendly software has been developed for outdoor parking areas. With the help of this software, users can define parking area boundaries, and the developed algorithm within the software can detect free and occupied parking spaces in sample parking lots. The results obtained are displayed using green colour for free parking spaces and red colour for occupied parking spaces. This process has resulted in obtaining a detailed dataset that can be used for analysis and planning related to parking utilization. With this dataset, errors in the software have been identified and resolved, resulting in the development of software capable of detecting free and occupied spaces in all areas.

By using the software, drivers’ concerns and time spent searching for free parking spaces within the parking area have decreased. Consequently, traffic congestion and delays in parking areas have also decreased, leading to increased fuel efficiency and providing environmental benefits. Additionally, the software records entries and exits in all parking areas, enabling the digital collection of daily parking data. It is foreseen that these accurate and real-time parking utilization and occupancy data can be effectively used in future parking planning efforts.

Overall, the software has proven to be beneficial in reducing parking search time for drivers, minimizing traffic congestion and delays in parking areas, increasing fuel efficiency, and contributing positively to the environment. Moreover, the collection of daily parking data through the software is expected to be valuable for future parking planning activities by researchers, planners and road authorities.