# Around-View-Monitoring-Based Automatic Parking System Using Parking Line Detection
## 3 Proposed Method
### Parking Line Detection
#### 3.1.1 Parking Line Candidate Extraction Using the Hough Transform  
To find parking lines in an AVM image, it is better to extract the parking lines from the image converted to the top view [7]. Because the converted image provides the viewpoint looking down from above, it is more suitable than the original images from the cameras. In particular, in the top view image, the parking lines are straight lines, and a position in the top view image can be displayed as a relative distance from the vehicle. Therefore, in the proposed method, parking lines are detected from the top view.  
In top view images, the parking lines form rectangular shapes. Therefore, in a top view image, if there is a section where a vehicle can be parked, straight lines appear around its edges. To use this feature, parking lines are detected by locating the positions where straight lines intersect the rectangle [16].  
To detect a straight line, the linear components are first extracted from the AVM image using a line filter. This enables robust performance in various environments; for instance, weather and lighting conditions can vary in underground parking slots or outdoors [9].  
The mask of the line filter is depicted in Figure 2. This mask shape is used to filter the image in the \(x\) and \(y\) directions. In addition, because a parking dividing line has a rectangular shape, this filter is able to detect a parking line from any direction.  
Lines with a certain width are distinguished by the filter. In the top view image, the width of a parking line is the same regardless of its distance from the vehicle. Therefore, the image can be filtered without changing the width of the line filter according to the distance. Figure 3 shows the result of finding features using a line filter. Figure 3a shows the AVM image; Figure 3b shows the vertical line filter result; Figure 3c shows the horizontal line filter result; and Figure 3d shows the result of combining the vertical and horizontal line filter results.  
Linear components can be distinguished using the features found using the line filter. The proposed method obtains straight lines using the Hough transform, which represents a  
Figure 3: Line filter results: (a) AVM image, (b) vertical line filter results, (c) horizontal line filter results, and (d) combined results of (b,c).  
Figure 2: Line filter.  
straight line using parameters rho and theta through a coordinate system transformation [8] as follows:  
\[r=x\cos\theta+y\sin\theta. \tag{1}\]  
As shown in Equation (1), \((x,y)\) represents the position of a point in the image, \((r,\theta)\) represents the angle formed by a straight line with the distance from the origin. In Equation (1), a line is expressed as a straight-line component having a distance and an angle. Therefore, it is possible to detect the linear components formed by the most points.  
Parking lines are straight lines because it helps make parking easier for drivers. Accordingly, there are corners in the parking lines on the left and right, and the parking line can be determined using these corners. They play an important role in finding parking lines. Figure 4 shows an example of the corner detection of an image. Figure 4 shows the Hough transform results and Figure 4 shows the corner detection results.