# Around View Monitoring-Based Vacant Parking Space Detection and Analysis
## 3 Algorithm to Detect Vacant Parking Spaces
### Space Occupancy Classification Stage
#### 3.3.1 Parking Space Feature Extraction  
Unlike traditional methods that only analyze the obstacle features within a parking space, the proposed method is a highly robust analysis that observes parking space features from two perspectives. The red area in Figure 14 represents the results of viewing the space from the perspective of an occupied space. The parking space contains many features of a vehicle, such as edges and symmetry. The green area in Figure 14 represents the results of viewing the space from the perspective of a vacant space. The parking space contains only features of the road, such as consistency in texture. By integrating both perspectives, the features within a parking space can be classified as road or obstacle. Road features were used to provide information regarding the possible vacancy of a parking space, and obstacle features were used to provide information regarding the possible occupancy of a parking space. Finally, these two types of information were integrated to determine whether a specific parking space is occupied. For road features, a region growing method was used to search for usable space within the parking space. For obstacle features, an edge detection method was used to determine whether a car is parked in the parking space. Figure 13: Divider line recognition. (**a**) Algorithm; (**b**) Results. (a) Vacant Space Detection Based on Region Growing Method  
One of the essential features of road is that all areas of the road have a similar texture. Therefore, we used the region growing method to search for paved areas within the parking space. Key parameters set within the region growing algorithm were initial positions of seed points, growth characteristics, and similarity threshold values. Firstly, we selected seed points (red crosses in Figure 15b) near two corner features in the parking space. Two seed points were selected to prevent a single seed point from randomly being located near a road stain, which would inhibit its growth. Next, we chose standard deviation as the growth characteristic instead of the more typical grayscale because grayscale often undergoes dramatic changes caused by lighting. In addition, when the car color is similar to the road color, overgrowth often occurs. In contrast, standard deviation produces more optimal growth in both of these situations. The standard deviation feature map is shown in Figure 15a. Finally, the similarity threshold values for region growing were dependent on lighting. The threshold values were lower for settings with dimmer lighting. Figure 15b shows the results after region growing. White areas indicate detected vacant spaces. To quantify road features into numerical data, we calculated the region growing ratio within the parking space using Equation (1). \[\text{Region growing ratio}=\frac{\text{Growing pixel numbers in the slot}}{\text{Total pixel numbers in the slot}}. \tag{1}\]  
Figure 14: Features of a parking space. Figure 15: Road feature extraction. (**a**) Standard deviation feature map; (**b**) Region growing results. Obstacle objects in parking spaces refer to cars. Features that indicate the existence of a car include symmetry, as well as complex line structures. However, objects in AVM images are distorted based on the angular relationship between a specific object and the center of the camera (e.g., the car in the first parking space in Figure 16). Therefore, symmetry is unsuitable for use as a feature. Instead, we chose Canny's edge detection approach [27] to extract edge features within the parking space. Although the field of vision of AVM systems only covers approximately half of the depth of a parking space, a vehicle typically occupies at least three-quarters of a parking space. Thus, the front of the vehicle, except in the case of motorcycles, is always clearly within the field of vision. In addition, the front of the vehicle always contains more edges than any other part of the vehicle. Therefore, we used the number of edges within a parking space as the obstacle feature.