Unified Calibration Method for Millimeter-Wave Radar and Machine Vision

Firstly, the camera and millimeter-wave radar are separately calibrated, then the joint calibration between the camera and the millimeter-wave radar is carried out. Finally, a fusion model based on camera and millimeter-wave radar is built to detect pedestrians. The test results show that the millimeter-wave radar and camera with the calibration of the target have high measurement accuracy and can provide reliable data for the vehicle passive safety system. Keywords— Automotive safety; millimeter-wave radar; joint calibration Introduction The millimeter wave radar has high detection accuracy and strong environmental adaptability, and is widely used in automobile assisted driving collision avoidance systems. However, the millimeter wave radar has a low azimuth resolution and cannot accurately locate obstacles. In view of this, the literature [1, 2, 3, 4] uses the method of millimeter wave radar and CCD camera information fusion, using the high spatial resolution of the CCD camera to compensate for the low azimuth resolution of the millimeter wave radar, thus achieving two advantage information of the person is complementary and complementary. Many scholars at home and abroad have conducted research on sensor information fusion and have achieved many good results. The vehicle detection method based on vision and laser radar proposed by Lili Huang et al. has good reliability and can be applied in traffic monitoring and highway cruise test . In the fusion system, the lidar uses the feature clustering model to estimate the possible location of the vehicle, and converts the information acquired by the lidar into image coordinate information to form different regions of interest. Finally, the region of interest is determined based on the Adaboost method; Shanghai Jiao tong University uses the camera and lidar sensor to realize the detection and tracking of the vehicle in the field of view. Using the vehicle distance information acquired by the laser radar, the camera acquires the vehicle characteristic information of the image and verifies the vehicle presence. The combined method of Kalman filtering and particle wave is used to track the vehicle and solve the problem of vehicle tracking loss during sharp turns . The Key Project of Tianjin Natural Science Foundation of China(16JCZDJC38200) Tianjin Science and Technology Innovation Platform Project (16PTGCCX00150) In this paper, the millimeter wave radar and camera are used to acquire the external environment information, then the two data are merged to detected the pedestrian area in the image, which improves the reliability of pedestrian detection and can overcome these disadvantages, such as small amount of information and low reliability. I. SENSOR CALIBRATION A. Camera calibration The model of the camera selected in this paper is UNIC-301, as shown in Figure 1, and its performance parameters are shown in Table 1. In order to ensure that the installation angle of the camera meets the requirements, it is necessary to know the internal and external parameters of the camera before performing camera calibration. Firstly, the internal parameters of the camera are calibrated. The calibration methods of the camera mainly include the optimization calibration method, the camera transformation matrix calibration method, and the Zhang Zhengyou calibration method. Among them, the Zhang Zhengyou calibration method is simple, adaptable and accurate in the camera calibration process. Is one of the most commonly used camera calibration methods , so this article also uses Zhang Zhengyou calibration method for camera calibration.

The millimeter wave radar has high detection accuracy and strong environmental adaptability, and is widely used in automobile assisted driving collision avoidance systems. However, the millimeter wave radar has a low azimuth resolution and cannot accurately locate obstacles. In view of this, the literature [1,2,3,4] uses the method of millimeter wave radar and CCD camera information fusion, using the high spatial resolution of the CCD camera to compensate for the low azimuth resolution of the millimeter wave radar, thus achieving two advantage information of the person is complementary and complementary. Many scholars at home and abroad have conducted research on sensor information fusion and have achieved many good results. The vehicle detection method based on vision and laser radar proposed by Lili Huang et al. has good reliability and can be applied in traffic monitoring and highway cruise test [5] . In the fusion system, the lidar uses the feature clustering model to estimate the possible location of the vehicle, and converts the information acquired by the lidar into image coordinate information to form different regions of interest. Finally, the region of interest is determined based on the Adaboost method; Shanghai Jiao tong University uses the camera and lidar sensor to realize the detection and tracking of the vehicle in the field of view. Using the vehicle distance information acquired by the laser radar, the camera acquires the vehicle characteristic information of the image and verifies the vehicle presence. The combined method of Kalman filtering and particle wave is used to track the vehicle and solve the problem of vehicle tracking loss during sharp turns [6] . In this paper, the millimeter wave radar and camera are used to acquire the external environment information, then the two data are merged to detected the pedestrian area in the image, which improves the reliability of pedestrian detection and can overcome these disadvantages, such as small amount of information and low reliability.

A. Camera calibration
The model of the camera selected in this paper is UNIC-301, as shown in Figure 1, and its performance parameters are shown in Table 1. In order to ensure that the installation angle of the camera meets the requirements, it is necessary to know the internal and external parameters of the camera before performing camera calibration. Firstly, the internal parameters of the camera are calibrated. The calibration methods of the camera mainly include the optimization calibration method, the camera transformation matrix calibration method, and the Zhang Zhengyou calibration method. Among them, the Zhang Zhengyou calibration method is simple, adaptable and accurate in the camera calibration process. Is one of the most commonly used camera calibration methods [7] , so this article also uses Zhang Zhengyou calibration method for camera calibration.  Based on the calibration principle of Zhang Zhengyou, the MATLAB calibration toolbox can be used to complete the calibration simply, accurately and efficiently, and generate the parameters needed to fuse the model. Camera calibration requires the selection of a suitable calibration object, usually using a regular rule board such as a checkerboard because the flat checkerboard mode is easier to handle. First, the internal parameters of the camera are calibrated. The checkerboard with a square of 9×6 is selected, and the side of the square is 3cm×3cm. In order to construct a three-dimensional scene, the hand board is transformed into various directions to obtain a checkerboard image. 20 gamut grayscale images of different orientations were taken by the CCD camera, as shown in Figure 2, and entered into the MATLAB calibration toolbox. Figure 3 shows very intuitively the 3D position of the 20 checkerboard plan relative to the camera plane.
Through calibration, the camera's internal parameter matrix and distortion coefficient vector are respectively: Internal parameter matrix: Second, calibrate the external parameters of the camera. The external parameters of the camera are composed of a rotation matrix R and a translation vector T, which are determined according to the relative positions of the selected world coordinate system and the camera coordinate system, and the world coordinate systems at different positions correspond to different camera external parameters. The origin of the default world coordinate system of the MATLAB calibration toolbox is the first corner of the checkerboard that the user clicks on using a certain calibration image.
By calibration, the camera's rotation matrix and translation vector are:  Millimeter-wave radars need to be installed to ensure that their horizontal angle, yaw angle and pitch angle meet the installation requirements. The horizontal angle and the pitch angle can be measured by tools such as angle gauges and weights, and the radar installation mechanism can be adjusted to meet the angle requirements of the radar installation.
In order to make the normal vector of the millimeterwave radar plane parallel to the longitudinal symmetry plane of the vehicle, rod-shaped obstacles with small crosssectional area are placed at 5m and 10m directly in front of the vehicle as the target of millimeter-wave radar detection. In the process of calibrating the yaw angle, the radar yaw angle is adjusted by the adjustment mechanism at the same step size each time, and the lateral distances of the two obstacles placed directly in front are measured, respectively, as d1 and d2, according to the formula (1) Calculate the yaw angle calibration factor k. When the adjustment mechanism is adjusted such that k takes a minimum value, the normal vector of the radar detection surface is considered to be parallel to the longitudinal symmetry plane of the vehicle.

A. Spatial fusion
A point in the space detected by the millimeter-wave radar is accurately projected onto a point in the image plane acquired by the camera, involving a millimeter-wave radar coordinate system, a world coordinate system, a camera coordinate system, an image coordinate system, and a pixel coordinate system conversion between coordinate systems. The conversion relationship between them is shown in Figure 5. The relative positional relationship between the millimeter-wave radar coordinate system, the world coordinate system and the camera coordinate system is shown in Figure 6. In Figure 6, the millimeter-wave radar coordinate system is OfXfYfZf, the world coordinate system is ObXbYbZb, the camera coordinate system is OuXuYuZu, the YOZ planes of the three coordinate systems coincide, the XOY planes are parallel to each other, and the world coordinate system coincides with the XOZ plane of the camera coordinate system. And parallel to the XOZ plane of the radar coordinate system. Z0 and Z1 are the distances between the radar coordinate system and the camera coordinate system, the camera coordinate system and the world coordinate system in the Z-axis direction, and H is the distance between the radar coordinate system and the camera coordinate system and the world coordinate system in the Y-axis direction.
Since the millimeter wave radar and the camera are installed at a relatively fixed position, the conversion relationship between the radar coordinate system P(R, a) and the camera coordinate system P (Xu, Yu, Zu) can be obtained: Convert to matrix form as: Assuming that the camera model is an ideal linear pinhole model, according to the conversion relationship between the camera coordinate system and the image coordinate system, the image coordinates P(x, y) before the distortion correction of the P point can be obtained: Due to the distortion of the camera lens, the image captured by the camera deviates from the real image.
Therefore, the image coordinates need to be corrected for distortion, and the image coordinates P(x , ,y , ) after distortion are obtained: After obtaining these information of the distance R and the angle α about the target by the millimeter-wave radar, using the internal parameters such as the camera focal length, the principal point coordinate, and the distortion parameter obtained by the above, and calculating according to the above formula, the projection coordinates of the target in the image can be obtained. Thereby, the conversion of the radar coordinate system P(R, a) to the pixel coordinate system P(u , , v , ) is realized.

B. Time fusion
In the actual road environment detection process, the environmental information at different times is different due to vehicle movement and environmental changes, especially for high-speed sports vehicles, the instantaneous time difference may lead to different environmental information, so different sensors are required to detect. The environmental information to be obtained must be at the same time for spatial data fusion. The environmental information detected by each sensor is based on the current time information, and data acquisition is performed at different sampling frequencies on the time axis. Therefore, data collected by different sensors at the same time is extracted for fusion, and the sampling interval is completed. It may be short to ensure the real-time and validity of the detected data. The equations are an exception to the prescribed specifications of this template. You will need to determine whether or not your equation should be typed using either the Times New Roman or the Symbol font (please no other font). To create multileveled equations, it may be necessary to treat the equation as a graphic and insert it into the text after your paper is styled.
The millimeter-wave radar used in this paper has a sampling frequency of 25 Hz, that is, 40 frames of radar data is acquired per second, and the data interval is 25ms per frame. The camera shooting frame rate is 30 fps, that is, 30 frames of image data per second are acquired, and the data time per frame is 33.3ms. In this paper, time-data fusion is performed in a backward compatible manner based on a sensor with a long sampling period. For example, the time node is set every 100ms. When the millimeter-wave radar acquires the target data message at the time node, the image information of the current time is simultaneously acquired, and the spatial data fusion is performed by the coordinate transformation, thereby completing data fusion among the millimeter-wave radar and camera data at the moment. Realizing the synchronization of radar and camera data in time. The fusion process in time is shown in Figure 7.

III. TEST VERIFICATION
Since the millimeter wave radar and the camera can independently measure the relative positional relationship between the target and the workshop, and the target position detected by the millimeter wave radar can be converted into the pixel coordinate system by the equation (6), the target recognition and the like jobs can be performed. Therefore, during the test verification, the measurement data obtained by the millimeter wave radar and the camera will be compared with the actual data. The forward distance of the car collision prediction system is much closer than the forward distance of the car active safety system such as the adaptive cruise system. The horizontal distance of attention is limited to the lane of the vehicle. Therefore, this article selects pedestrians within 30m in front of the car and 2m in the left and right as the detection target. The measured data and actual data of the two types of sensors are shown in Table 2 The camera measurements in Table 2 are the data obtained after the conversion of the ranging model. It can be seen from the table that the longitudinal distance error of the two kinds of sensor measurement targets in the test area is within 0.6m, and the measurement error of the camera in the test area within 20m is small, in the test area between 20~30m, the radar measurement error is small. The main reason is that the actual spatial distance corresponding to the unit pixel when the camera measures the distant target becomes large, so the actual spatial measurement error due to the pixel calculation error in the process of image measurement becomes large. The lateral distance measurement error of both sensors is within 0.15m. The angular resolution of the millimeter wave radar is not high, and the lateral distance measurement error is larger than the camera. The radar has an average of longitudinal and lateral errors over the entire test range.

IV. IN CONCLUSION
In this paper, the installation angle of the vehicle's millimeter wave radar and camera is calibrated, and the internal and external parameters of the camera are calibrated, and the three coordinate axes of the radar projection coordinate system and the camera projection coordinate system are unified by locating the longitudinal symmetry plane of the vehicle as the calibration reference.A joint calibration of the millimeter wave radar and the camera is realized.