New Vehicle Speed Measurement System with Image Processing

This research proposes a new vehicle speed measuring system based on image processing technique. Generally, in order to detect the vehicle from image taken in dark circumstance, expensive high-performance camera is needed. However, this system needs only a cheap general camera, like digital camera or the camera mounted on smartphones. Thereby, this system uses as speed gun. By controlling the shutter speed of camera, a bright line which comes from the headlamp of a moving vehicle is appeared in the picture. Moreover, from even the image taken from the slant, the vehicle speed can be measured with a process of projective transformation. In this work, we developed an algorithm depend on this feature. Experiment result shows a reasonable measuring value.


Introduction
Since the transport facilities were developed, traffic accident have become serious problem (1) .In order to solve these problems, an automatic speed violation control device has been applied on the road.This system is called ORBIS in Japan.This system use loop coil or radar-based system.However, these method has a drawback that misdetection occurs in some certain situations.As other problem, in some city of Japan, about half of devises are fault.Moreover, fault devises have been leaving without repair (2) because these system require high deployment costs and maintenance cost.Speed gun is a device to measure the speed.This device uses the radar-based method.However, it is difficult to use this device without some expert knowledge.
In this situation, recently, image processing based vehicle speed measuring techniques are developed actively.Image processing give some advantage.For example, when measurement speed have few error, image processing can helps the analysis of the cause of the error.But image processing based speed measuring system also have problems.Especially for a dark circumstance, the pictures cannot be taken clearly and the measuring accuracy becomes low.
We attempted the development of a new vehicle speed measurement system with general camera.As described above, it is impossible to take a clear and a sharp picture with the low profile camera in the dark circumstance.Accordingly, our system uses the headlight of moving vehicle.First, this system take a picture of the moving vehicle by the setting the shutter speed.The shutter speed depend of environment.Because the camera is fixed and the vehicle is moving, the headlight of vehicle observed in the picture becomes a light line.Next, this light line is extracted from the picture.Our system performed a projective transformation against optional area of road in order to calculate the real length of the light line.Then, a distance of this optional area must be known.We can obtain the vehicle speed by this real length and shutter speed.What we need is only the general camera like digital camera or the camera mounted smartphone.Such a construction can yield a low cost system.Moreover, this system can substituted for speed gun.

Measurement System
The process of a measurement system for dark circumstance is as follows: 1) Install the camera above a road 2) Measure a distance of an optional area.
3) Set the shutter speed 4) Input the information of measurement area 5) Take the moving vehicle 6) Extract the light line from picture 7) Calculate the vehicle speed by length of line and shutter speed The system structure is Fig. 1. Figure .2 is example.The optional area is first decided manually.For example, the optional area is show in Fig. 2. Before taking the vehicle, the distance information of the optional area is necessary.

Method of extraction and calculation
In this research, we developed automatic threshold decision function.Calculation of the real distance of the light line First, decision of threshold is necessary.Some light areas can be extracted from the image with this threshold.These light areas include the light line.Next process is to perform projective transformation from the optional area.Finally, for picking up the light line from these areas, the process is labeling process.In this section, we explain about these process with sample1 in Fig. 2.
(a) Calculate a histogram of the image and its weighted average histogram As we known, the light line has a higher brightness value than other area of the picture.Therefore, we inspect the Gaussian weighted histogram from Point A to the left side and detect an area where the change of differential value become small.Then decide the luminance value there as a threshold value.
(c) Projective transformation In order to calculate the real distance of the light line, projective transformation with an optional area is necessary.By this process, we can take the moving vehicle from a slant."Before projective transformation" in Fig. 5 is the optional area.For this projective transformation, homography matrix is calculated.Projective transformation by homography is a following equation (5) .
These coordinates are show in "Before projective transformation" of Fig. 5.These points are homogeneous coordinates before transformation.The distance of optional area is h[m] in Fig. 5.These coordinates after transformation are as follow: where  ℎ is a pixel of width in picture,  ℎℎ is a pixel of height in picture.By these information, homography matrix Η can be calculated.Thereby, the optional area can transform to "after projective transformation" in Fig. 5. Then if a distance of optional area is measured, h[m] of height of projective transformation image can be obtained.Moreover, if the length of the light line can be calculated, a real length of the line can be (d) Llabelling process Labelling processing is performed against the result image of projective transformation.Among some labeling area, a line area is decided to the light line.Finally, form the length of the light line and the shutter speed, the vehicle speed can be obtained.

Simulation
We show several simulations with this system.Using samples are Fig. 2, Fig. 7 and Fig. 10. Figure .10 was show by iPhone.In apple of iPhone, there are some apples which can control shutter speed artificially.The results of binarization are show in Fig. 6, Fig. 8 and Fig. 11.The results of projective transformation are show in Fig. 6, Fig. 9 and Fig. 12.In the results of binarization and projective transformation, there are the extracted areas including the light line.In the results of projective transformation, the light line were pick up.These light lines are show green.Table .1 shows the measurement results.In these simulations, we took all images in highway.Accordingly, we were not able to obtain the value to compare with the measurement speed.

Conclusions
In this research, we proposed a new system for vehicle speed measurement.This system can use in the situation like the camera is not high profile and the setting point is at slant of moving vehicle.The development method in this research is especially for night environment using.This system could yields a low cost and portable speed measuring equipment.However, we have not confirmed the accurate simulation.In the future, we would like to inspect the accuracy of measurement speed.Furthermore, we will develop the vehicle measurement system with the general camera mounted on smartphone.We hope it could contribute to reducing the fatal car accident.We plan to make a system for the daytime.

Fig. 6 .
Fig. 6.Binarization of Sample1 The processing of light line extraction is as follows: