A Method of Measuring Distances between Cars Using Vehicle Black Box Images

Stereo cameras that can make stereoscopic images using two cameras as with human eyes can measure distances quite accurately. Single cameras, however, have limitations in accurately measuring distances to objects. In this paper, a method of measuring distances between cars by extracting car number plates from vehicle black box images is proposed. For accurate distance measurement, distances calculated by analyzing and extracting car number plates captured in black box images were compared to actually measured distances to identify error values in order to verify the calculated distances. Through the experiments, it can be seen that the proposed method is useful in measuring vehicles’ relative locations using black box images. The proposed method of measuring distances between cars using black box images uses lens view angle information and car number plate size information.


Introduction
As economic scales and the scope of people's activities increase, traffic accidents are occurring unceasingly due to a greater number of cars on the road and severe traffic congestion.Although preventing accidents is the best solution, accurately investigating and analyzing the causes of accidents that have already occurred is also very important.In addition, cases where the position of the inflictor conflicts with the position of the victim occur frequently, and vehicle black boxes are sometimes helpful in solving such problems [1].However, the distances between cars shown in images recorded in black boxes are different from actual distances between cars, making it difficult to measure actual distances.Among methods of measuring distances between cameras and moving subjects, those methods that use stereo cameras are best known.In these methods, distances are measured by finding points of convergence in two images taken by two cameras installed parallel to each other [2].Although expensive black boxes installed with stereo cameras have been recently released, most vehicle black boxes use cameras that have a single lens.For this reason, methods of measuring distances between cars from general images recorded in black boxes are necessary.Vehicle black box images taken using single cameras are used as decisive evidential materials to quickly clarify who is responsible for the accident, thereby reducing dispute-related expenses [3].Black boxes that use wide-angle lenses produce exaggerated perspectives, posing difficulties in measuring actual distances [4].Distances between cars are sometimes estimated by extracting car number plates from images and comparing them with car number plate images with actual distance information [5].Car number plates with defined sizes by country are among the best subjects for measuring distances between cars.In this paper, we propose a method of measuring distances between cars by comparing the sizes of car number plates detected from images with the sizes of actual car numbers using stored car number plate information and camera view angle information.Although existing methods can measure distances between cars only when images have been taken using stereo cameras or other special equipment, the proposed method enables us to measure distances using images taken with single cameras and stored in black boxes if only camera view angle information and car number plate size information are available.

Related works
2.1 Vehicle black boxes' lens view angles Vehicle black boxes record accidents before and after collisions to provide information necessary to figure out the circumstances of accidents; the accidents are generally analyzed based on the recorded images.These black box image records play a crucial role in comprehending the circumstances of traffic accidents when the cause cannot be easily determined because of conflicting accounts between the inflictor and the victim.Although the picture quality of images stored in black boxes varies depending on product performance, most products released recently provide HD-grade picture quality exceeding 2 million pixels.View angles (or angles of field) used for vehicle black boxes mean the sizes of opposite angles as shown in Figure 1.Although wider fields of image taking can be secured when view angles are wider because the distance between points A and B is longer, as shown in Figure 1-(b), image distortions are larger compared to Figure 1-(a), so that the differences between actual distances and distances seen from images are larger.Although wider fields of image taking can be secured when view angles are wider, there are greater differences between actual distances and distances seen in images due to image distortions.Car number plates used in Korea have three characteristics as follows, which can be used as information for extracting car number plate areas.First, although the colors of number plate areas and letters vary according to the purposes of use of cars, in black-and-white images, car number plates have contrasting light and shade such as bright backgrounds and dark letters or dark backgrounds and bright letters.That is, the colors of letter areas and those of background areas on car number plates are clearly distinguishable.Second, the widths and heights of car number plates have ratios such as 2:1, 2.16:1, and 4.73:1.Third, number plates are mostly located at the center bottom of cars [7]. Figure 2 below shows schematized car number plates by size.This study proposes a method of detecting car number plate areas and calculating distances using the size (width, length) values of the detected car number plates.Calculations for car number plate detection can be composed complicatedly depending on distances between cars and cameras, angles, light and shade, and the complexity of backgrounds.As area detection methods, studies of edge information detection methods have been conducted, using the characteristics of number plates for which the ratios of vertical edges inside of them are higher than those outside of them; as well as methods using color information obtained by changing the color images of car number plates into light and shade images [8] [9].In addition, studies are being expanded from methods using only one type of information to methods that use more than one type of information in order to enhance detection performance; such methods include using edge information and color information, those using edge information and morphological information, and those using color information and light and shade information [10].
In this study, analysis of car number plates distorted according to camera angles was limitedly applied because the method is limited to cars located in front of or behind a car when the car is moving, and the locations of cameras attached to cars do not differ widely among cars.

Distance measurement
The width of each number plate detected from images has a value similar to one of the number plate size values (2H, 2.16H, and 4.73H) mentioned in section 2. By comparing the sizes of number plates appearing on images and the sizes of actual number plates, critical values (C) according to view angles can be shown as per Table 2 below, based on actually measured distances.The critical values were actually measured with minimum allowable error ranges (r) and were calculated considering the distance between the black box and the front bumper and the height of the number plate on the rear bumper of the car ahead.the distance, the distance between an arbitrary point on the left side and an arbitrary point on the right side was actually measured, and the distance on the image was compared to the number plate size that appeared on the image.As the heights of black box cameras and the heights of car number plates of cars ahead vary according to car types, the experiment focused on distances between cars rather than camera heights and car bumper heights.
In the experiment, images of a car in the same location taken using black boxes with diverse view angles were analyzed.Distances to the number plates extracted from the image were measured using the expressions presented earlier, and the error values as the differences between the distances measured as such and actual distances at individual view angles were derived to verify the accuracy of the distances calculated using the presented expressions.Table 3 shows the actual distances between cars, the calculated distances, and the mean error ranges for differences between the actual distances and the calculated distances by view angle.According to the results of the experiment, mean errors of 25.70cm, 44.41cm, 26.54cm, and 21.20cm were shown in images taken by black boxes with view angles of 120°, 130°, 144°, and 152°, respectively.Based on this experiment, the outlines of number plates could be extracted from running cars' images as shown in Figure 3 and distances between cars could be calculated allowing error ranges using the relationship between the width of the number plate corresponding to the ratio between the width and length of the stored car number plate and the actual measurement.As the width of the car number plate appearing on the image as a result of car number plate detection was 11.78cm and the kind of number plate has a reference value of 2H, the distance calculated using expression (1) was approximately 4.49m.By applying the error range (25.70cm) in relation to actual distances, the distance between the cars could be calculated to be in a range of 423.3cm ~ 474.7cm.

Figure 3. Detection of number plates
As such, if four sizes (10cm, 8cm, 6cm, and 4cm) of number plates detected from images obtained through black boxes having a view angle of 120° are assumed, distances between cars allowing an error range can be calculated as shown in Table 4 from the car number plate sizes appearing on black box images given the fact that the mean error of the experimental results mentioned earlier was 25.70cm.

Conclusion
The proposed technique to measure distances between cars based on black box images uses single cameras that can measure the distances using lens view angle information and car number plate size information.First, car number plate areas were extracted from images taken by vehicle black boxes and a distance-measuring technique was proposed considering the sizes of the extracted car number plates and the sizes of the view angles of cameras installed in black boxes.Because the sizes of car number plates are fixed even when car sizes are different, experiments were conducted considering number plates of three sizes.The differences between distances detected from images and actual distances were shown to be between -63.54cm and 52.17cm.When the size of number plates was 2H, the mean error range was shown to be 25.70cm.The resultant values estimated in the experiments may vary a little depending on the sizes of number

Figure 2 .
Figure 2. Size attributes of car number plates

Table 1
below shows those view angles that are the most frequently used by manufacturers [6].

Table 1 .
Lens view angles by manufacturer

Table 3 .
Comparison between the measured distances and the actual distances (unit: cm)

Table 4 .
Distance measurement through car number plate detection (unit: cm)