Article Preview
Top2. Parking Spaces Detection Algorithm
To analysis the Parking on-site images, we concluded that the image has these characteristics: vehicle has various size and shapes, spaces themselves can be disturbed by many environmental factors (such as sunlight intensity, rain and snow, shadows, surface water stains, etc.), restrictions on camera placement and other reasons such as the block between spaces. In response to these characteristics, we propose a mathematical based on the image, edge and other characteristics identification method to detect each individual parking space (Tsai, Hsieh, & Fan, 2005).
In order to obtain a higher recognition rate, we propose three parameters, namely variance, correlation and edge point density (Deng, Jiang, & Wei, 2006). These three parameters are the exemplification of mathematical, image and edge characteristics, in order to reflect the parking spaces between cars and no car. The specific detection of the following steps:
2.1. Step 1
Select a background image with the requirements: less interference, no apparent obstacles, water stains, no obvious shadow coverage, read the image and convert it into grayscale.
2.2. Step 2
Set the border coordinates of the image to test, the purpose is to intercept the information contains only the image of parking spaces under test. The implementation are as following: we get the resolution of the YUV image 720 × 576, including six parking spaces, one of them will as a test. This test car parking space is the part of interested in the whole image, our aim is to retain the original scope of the test information on car parking space, and set other parts of the pixels to zero, we can draw a four polygon edges of parking spaces, retain the four edges surrounded Polygon area information, and set other parts to zero, and then delete all zero rows and columns, and finally obtain the smallest rectangle containing the polygon spaces, which is the image we want to deal with; parking information Image shown in Figure 1.
Figure 1. Under test image and back image after cut off
2.3. Step 3
To obtain the background of parking spaces that be tested, cut the background image frame that selected using the same method in step 2, save the value of the background image into the background image pixel array.