A Prototype of Parking Space Information System based on Image Processing

—An automatic parking system has been proposed to make the car parking process more efficient in terms of time and cost. The absence of information on the position of the parking lot makes the car driver take longer to find it. In multi-story parking lots, officers cannot constantly monitor the available parking conditions directly, so prospective parking users do not know the position of the open parking space. In addition, many parking lots use automatic door latch, but no parking space information display. Parking system automation can be based on hardware, software, or a combination of hardware and software. To the best of our knowledge, no software-based framework is entirely used on this system. Therefore, this study proposes an automatic parking system based on camera sensors and software, which is combined into an information system. The proposed method uses simple morphological operations. Based on the test results, the detection accuracy achieved is 100% with a light intensity of 3 lux, 15 lux, 30 lux, 60 lux, 120 lux, and 250 lux. The average processing time is 1.59 seconds. From this study, it is hoped that this prototype can be tested on relevant environmental conditions so that the prototype can be implemented in parking lots.

can be selected automatically. In that case, Hough transform is used to detect parking lines. Another study by Ahad et al. implemented a web-based system named "Park Easy" to show car park occupancy [12]. Alam et al. implementing a smart parking system as a parking occupancy information system, but this system requires hardware sensors both in the parking slot and in the car [13]. A similar study by Azshwanth et al. proposed an automated car parking system that requires the installation of hardware sensors [14]. This system requires high installation costs because sensors must be installed at every parking slot.
There is still a research gap that can be developed, that is, building an integrated system that provides information on parking spaces with low-cost resources, hardware installation, and computing. Therefore, this study proposes a parking space information system using digital image processing with low-cost morphological operations. This system is expected to accelerate providing parking availability information in the form of images and parking space positions to potential parking space users.

II. ProPosed system
The general design of the proposed system is depicted in Fig. 1. First, the image will be processed into a grayscale image to simplify the computation and determination of an image's intensity. Then the grayscale image is converted into an image using the thresholding method. Morphological operations include closing, opening, dilation, and erosion will modify the object's binary pixels from the original image. The final processing stage is object detection and parked objects calculation. Information viewer will display the availability of parking space and its position.
Details of image processing algorithm of this proposed system are shown in Fig. 2. The captured images are RGB images that have three channels, including: red, green and blue. Then the color channels are separated. Each channel is a gray image that has a different intensity based on the channel. Each gray image is converted into a binary image based on the threshold so that three binary images are obtained. The images are added (combined) so that one binary image is obtained. Furthermore, the binary image will be processed by utilizing a dilation process which is useful for expanding the object or structure.
Moreover, the image that has been dilated will go through an erosion process to narrow the area. The image that has been processed for dilation and erosion will be re-processed with the opening to fill in the holes and closing to remove unwanted objects. The parking space design is shown in Fig. 3, where the parking space has a colored rectangular marker. The vehicles that parked in the parking space will cover the marker. Then the image processing will detect the yellow marker as an available parking space.
Object detection is carried out by dividing the image based on each parking space to retrieve data using specific formulas. The data obtained will be processed, so that information regarding the availability of parking spaces is obtained. This information will be displayed as a system output, as shown in Figure 4. Based on Fig. 4, the red color indicates the parking space that has been filled by vehicles, while the green color indicates an available parking space. The hardware which is used in building system design is as follows. 1. A personal computer with an Intel Core i3-4005U @ 1.70GHz (4 CPUs) specified, 6 GB RAM, NVIDIA GeForce 930M graphics card, Windows 10 64-bit operating system. 2. A Logitech C270 High-definition web camera unit with fixed focus settings, 60 ° field of view, and 720p/30fps resolution. Meanwhile, the software used in building the system design is MATLAB R2018b 64-bit. This system is simulated on a miniature, which is scaled to 1: 60. If the original parking space is 2.5m × 5.0m, then in this prototype, the parking space is 4.2cm × 8.4cm, as shown in Fig. 5.

III. results and dIscussIon
This section describes the tests and analyzes carried out on the realized system. The things that will be explained are the design of parking space prototypes, testing the accuracy of light intensity, testing the accuracy of vehicle colors, testing the number of vehicles, testing processing time, and testing noise resistance.

A. Testing the Effect of Light Intensity on Detection Accuracy
In this scenario, the testing aims to see the effect of light intensity on detection accuracy. Tests were carried out ten times for each intensity, from the lowest light intensity, 1 lux, to the brightest light intensity value. In the space where there are no parking cars, the minimum light intensity required is 3 lux, as shown in Fig. 6. For light with an intensity of 1 and 2 lux, detecting space cannot be done optimally.
Furthermore, testing is carried out on the condition of the parking space filled with cars. Based on testing with light intensity parameters using a lux meter with a variation of 3 lux, 15 lux, 30 lux, 60 lux, 120 lux, and 240 lux. This test is carried out 30 times for each value of light intensity. Figure 7 obtains an accuracy value of 100% at all light intensities due to the excellent denoising results and the final image after morphological image processing.
The difference in light intensity between 3 lux, 15 lux, 30 lux, 60 lux, 120 lux, and 240 lux, as shown in Fig. 8, gives different results. The markers do not produce square shapes when the light intensity on 3 lux, 15 lux, and 30 lux is the same as on 60 lux, 120 lux, and 240 lux. However, detection can still be done so that it still provides 100% accuracy. For optimal performance, 60 lux is the minimum recommended intensity.
Testing the threshold value in the binary image conversion process is also carried out to determine the optimal threshold value. The test results in Table 1 show that the best thresholding values for the red, green, and blue channels are 0.1, 0.1, and 0.4, respectively. This value provides information that there are vehicles, markers with   The adaptive threshold method is used to convert a single intensity image to a binary image. The threshold for each pixel uses the average intensity of the surrounding pixels. Comparing the adaptive thresholding method results and the thresholding method without the adaptive approach can be seen in Figure 8. Based on this image, the thresholding results on image A are more even than in image B.

B. Testing Car Color Variations on Accuracy
In this scenario, the car used in the test has different colors. The vehicle's tested colors were brown, yellow, blue, green, dark red, red, gray, white, and black. Each car was tested 10 times. This test aims to ascertain vehicles' effect with the color mentioned above variations on the marker when covered by these vehicles. Based on Table 2, the percentage of accuracy for each color is 100%. After the thresholding process, on several cars, as shown in Table 3, namely gray vehicles, white vehicles, and brown vehicles, only the edges are visible, which passes through the thresholding process so that most of the cars appear white. The morphological process can generate the vehicle with only visible edges.

C. Testing of Time Processing
The processing time starts from the initial image processing until it appears on the information board. Processing time is calculated using the stopwatch timer facility in Matlab. The test is carried out 10 times for each vehicle that fills parking spaces ranging from one vehicle to eight cars. Based on the results of testing the available parking space information system's processing time with a variation of the parking space filled with one vehicle to eight vehicles each of 10 tests, the average processing time is obtained as shown in Table 4. The average processing time for parking spaces filled with one vehicle is the longest average processing time, which is 1.64 seconds. In contrast, the shortest average processing time is parking spaces with 4 cars at 1.53 seconds. The variation in the average that does not determine each vehicle's processing time is a sign that the number of cars filling parking spaces does not affect processing time. Result 8, the average processing time is averaged again so that the overall average value is 1.59 seconds, with the shortest processing time is 1.43 seconds and the longest processing time is 1.94 seconds. It means that the system will update the information when a car is in/out in real-time with a processing time of around one second.

D. Discussion
A real-time parking occupancy information system has been implemented consisting of a camera, processing unit, and information display. This system will detect a car's  presence in the parking area based on image processing captured by the camera. A simple sign as a marker is made on the parking ground to simplify the detection process.
The proposed system generates a detection accuracy of 100% and can show the available car slots through the user interface. Compared to the previous work presented in studies [13][14][15], this system is lower cost and time in installation because it does not require hardware on both the car side and the parking slot. Another similar study as reported in [16][17][18][19][20], has proposed a smart parking system based on image processing using operation morphology. The morphological method is mostly used in this system by considering the computational cost but still able to generate high accuracy. When compared with previous similar studies, the proposed system in this work has been simulated and analyzed at different light intensities, the detection performance and the proposed system in this work have been supported by a reliable display device. This proposed system can save power resources; however, the currently developed system cannot be accessed online via a smartphone, so parking availability can only be accessed in the parking area via a monitor display. Moreover, this prototype system has not been tested in an environment relevant to car size variations and large parking areas. This experiment may require some adjustments, such as placement and number of cameras.

IV. conclusIon
This study has succeeded in designing an available parking space information system using image processing. Based on the test results, the light intensity of 3 lux, 15 lux, 30 lux, 60 lux, 120 lux, and 240 lux resulted in a percentage of accuracy of detection accuracy of 100%. In the test scenario with variations in vehicle color, the accuracy is 100%. The average total processing time is 1.59 seconds with the shortest processing time is 1.43 seconds, while the longest processing time is 1.94 seconds. This study uses simple image processing techniques based on morphology operation, including closing operations, dilation operations, and opening operations. This study's simulation is expected to be considered in real parking applications when considering the low-cost installation, computation, and fast processing. Since the proposed system is still being tested on a prototype scale, it is possible to adjust the camera installation's type and height  if implemented in real conditions. Moreover, on the application side, it is also possible for adjustments. reference