Auto Image Calibration for Vehicle Speed Measurement in the night

A purpose of my research is to do camera calibration for measuring the vehicle speed in the night. In order to do camera calibration for measurement of speed, some information of a situation are necessary. Generally, it is difficult to obtain these information from the picture taken in the night with camera. It is because the image taken in the night is not clear. Therefore, we developed auto image calibration for night. In my proposal, camera calibration uses the projective transformation. When the vehicle comes to road, we can see some information of the picture by a headlight of the vehicle. My proposal system gathers the necessary information from a movie including coming vehicle. Then, this system calculates a parameter of homography matrix by these information. Homography matrix is necessary for the projective transformation. By this parameter, we can obtain the homography matrix, and can perform the projective transformation. After finish the camera calibration using the projective transformation, we can measure the vehicle speed. In this paper, we show the method of how to do the camera calibration.


Introduction
Image processing is very useful for something such as detecting something and measuring something.Especially, traffic field having paid attention the image processing.It is because they need to detect the vehicle and measure the vehicle speed.If they know the condition of road always, when traffic congestion happen, we can prevent it soon.And they can know where the driver drive very fast.Now, in order to measure the vehicle speed, they are using the ORBIS such as Fig. 1.However, the ORBIS is very expensive and many ORBISs are keeping to get out of order.If they can measure the vehicle speed with only camera, the cost is very cheap.And the image processing can detect the vehicle.Therefore, image processing is paid attention by traffic field.
For detecting and measuring something, there is one of the most important processing.It is the camera calibration.In order to do camera calibration, some information of camera's situation such as a distance between the camera and road, location of the camera and the location of the road are necessary.Generally, it is easy to obtain these information from the picture in the daytime because the picture taken in the daytime is usually clear.However, in the night, it is very difficult to obtain these information because the picture taken in the night is not clear.Existing method usually use the expensive camera such as an infrared camera to take the clear image in the night.However, this method is high cost for running.Other method is that user input the information for camera calibration manually.However, the system using this method is not useful.Therefore, the purpose of my research is to develop the system of automatic camera calibration with only cheap camera in the night.
A new method used in my new system does not need the clear image taken in the night.Instead, this method gather many images of road automatically and create the road image from these images.This system obtain the information for camera calibration from this road image.If we use this system, we do not need to use the expensive camera and to input the information manually for camera calibration.

Method
There are three steps to obtain the parameter of homography.First step is to find the area which may include the broken line of road from the picture.Next step is to find the broken line from the found area.Final step is to calculate the parameter of homography from the information of the broken line.We explain each step in detail.

Find the area which may include the broken line
In this step, a few minutes movie taken in road is necessary.This movie include the scene which the vehicle go across.When the vehicle turn on the headlight, the picture of road is little clear in a moment.One of the scene image is Fig. 2. Then we can get the some information of road.Therefore, if we gather the some information from each scene of movie, and superimpose the all information gotten from each scene, a clear road image can be created.A following processing is to get the information from the scene.
(a) Calculating the HSV of image If the total of value  is less than a threshold, the processing is continued.
(b) Median processing to original image.Median image is showed 'A' and original image is showed 'B' in here.
(c) Edge processing to 'A' and 'B'.(e) Dilation and Erosion processing to the result of (C).This processing is for decease the noise.
(f) Labeling processing.This processing is for judge the line or other objects.If a number of pixel in each labeling area is more than 40, and a height of the labeling area is longer than a width of the labeling area, it is judged the line.Other area is deleted.
These (a)~(f) processing are repeated.And all result image are superimposed.In the processing (A), we can judge which scene is If the scene which have high brightness such as Fig. 3 is used in this processing, the final result image have many noise.By these processing, we are able to obtain the clear road image.The result image is Fig. 4. Next, it is to calculate the area which may include the broken line of road.These processing is follow: (a) Finding two white lines of road by labeling processing (b) Finding the object between two lines.
We can think that this object is the broken line.
(c) Calculating the area which may include the all broken line.By labeling processing, the coordinates of broken line can be obtained.These coordinates are showed in Fig. 4.Then, the line which connect some broken line of road can be calculate by a following equation.
By (, ), the area which may include the broken line can be obtained.The area is showed  in Fig. 4.

Find the broken line
In prior step, the area which may include is obtained.In this step, first processing is to calculate the HSV of all scene.Next processing is to do threshold processing of HSV.If threshold  can be adjusted best, what remain after this processing is only a part of the broken line.And then, all result of image is superimposed.By this superposition, only the broken line can be extracted.

Calculate the parameter of homography and Perform the Projective Transformation
For the image calibration, the projective transformation is performed to the load image.This processing can change the load image such as Fig. 5 to an image such as Fig. 6.In this processing, each coordinates  1 ~8 in Fig. 5 are changed to each coordinates  1 ~8 in Fig. 6.In order to perform this processing, we need to know the coordinates  1 ~8 and to calculate a homography matrix by  1 ~8 .

Simulation
The movie is 2 minutes.This movie was taken in the night, and rainy day.Therefore, the headlight of the vehicle was reflecting in road more than another day.And a location of this simulation is straight load because this new method can use in only straight load.This cannot use at curve load.However, when some machine measure the vehicle speed, the location is the straight load.Therefore, measurement system do not have to do camera calibration at curve load.Original image is used Fig. 2 in here.The result of step 1 is Fig. 7.The area which may include the broken line was able to be extracted.Next, the result of step 2 is Fig. 8.The broken line was able to be extracted.Finally, the result of the projective transformation is Fig. 9.The projective transformation was successful.Next, we considered the accuracy of this projective transformation.We did this processing to Fig. 10

Fig. 6 .
Fig. 6.The projective transformation and got the Fig. 11.If this projective transformation was successful, all broken line in Fig. 11 are some distance because the real distance of the broken line are same.We created the binarization of Fig. 11 and calculated each pixel number of the broken line.The result of binarization is Fig. 12 and the result of calculation is Table.
1.All pixel number of the broken line are almost same.Therefore, this projective transformation are successful.

Fig. 7 1 Fig. 8
Fig. 7 The area which may include the broken line of scene 1