6. Camera calibration effect evaluation

1. Reprojection error

The distance between the detected corners of the 2D image and the projected points of the real-world 3D points. Use the internal and external parameters and distortion parameters of the camera obtained by calibration to project the points in the three-dimensional world to obtain the two-dimensional corner points in the pixel pixel coordinate system, and then calculate the mean square error (RMS) with the corner points of the two-dimensional image detected by the algorithm, generally An average reprojection error of less than 1 pixel is acceptable (depending on algorithm requirements). Calculate the reprojection error of each image, and filter out images with large errors.

2. Internal reference perturbation

Verification principle:

During calibration, all rotation vectors, translation vectors and pixel coordinates of reprojection points of the calibration plate relative to the camera are saved. Carry out simulation during calibration verification, assuming that there is a virtual camera whose internal participation calibration results are consistent, and the position of the virtual calibration plate is photographed to obtain a series of projection points. At this time, the internal parameters of the camera are disturbed, and the new rotation and translation are recalculated using solvePnP. And get the reprojection error of the new projected point. If the new reprojection error is larger than the reprojection error obtained by calibration, it means that the calibration error is smaller than the given disturbance value, that is, the calibration is passed. Otherwise, it will not pass.

operation method

Since the real internal parameters cannot be known and the calibrated internal parameters always have errors, a disturbance experiment is used to ensure that the errors of the calibrated principal point and focal length are controlled below the specified threshold percentage. The specific method is to take the disturbance of the principal point cx as an example:

  • Step 1: Using the input internal reference, 2D corner points, and 3D target points, calculate the external reference T
  • Step 2: Using the calibrated internal reference and external reference T, reproject the 3D point to the image to obtain repro_corner_1, repro_corner_1 and the corner point det_corner detected on the image can calculate the reprojection error error_1
  • Step 3: Assuming that the calibrated internal and external parameters are completely error-free, use repro_corner_1 as the gt_corner for the subsequent disturbance test
  • Step 3: Perturb cx in the internal reference, uniformly sample several times within -0.3 % ~ 0.3 %, for example, the maximum disturbance amount is 0.3 %, that is, cx' after disturbance at this time = cx * (1 + 0.3%)
  • Step 4: For each disturbance, use 3D points, internal parameters after disturbance, and gt_corner to calculate the new_T of each picture
  • Step 5: Calculate the reprojection corner repro_corner_2 using new_T, the internal reference after disturbance, and 3D points, and calculate the reprojection error error_2 with gt_corner. When the disturbance is 0, error_2 is theoretically 0; the greater the disturbance, the greater the disturbance_repro_error
  • Step 6: If error_2 > error_1 appears during the disturbance from 0% to 0.3%, it means that the maximum error of internal reference calibration is within 0.3%

3. Image effect after distortion correction (linearity)

Use the calibrated internal reference to dedistort the image and the detected corners. Taking a checkerboard target as an example, each corner has two straight lines passing through, which are the horizontal direction and the vertical direction on the target, respectively. After the straight line above, calculate the distance from the point to the two straight lines as the straightness error, and calculate the average straightness error of all corner points.

Note: The legend is a schematic diagram, and the specific situation depends on the calibration target

4. Triangulation

The solution was proposed by Mobileye, and the specific solution is as follows:

4.1 Scheme principle

First, the ME internal parameters include the following parameters:

  • Focal Length
  • Principle Point
  • Distortion center COD
  • Distortion Model Coefficient

The triangulation verification target is as follows, the target contains 1 corner point, and the distance between the target and the entrance pupil of the lens is ~20m.

The schematic diagram of the test scheme is as follows:

  • D_between is the actual distance between the upper corner points of the two targets, which is required to be ~10m (±1m)
  • Z_right (or Z_top), Z_left (or Z_bottom) is the distance between the entrance pupil of the camera and the target, and the requirement is ~20m (±1m)
  • The target and camera must be aligned horizontally, with an error of no more than ±5cm
  • The camera must be fixed on a rigid body support to ensure the stability of the test
  • The measurement error of D_between, Z_right (or Z_top), Z_left (or Z_bottom) is required to be less than 2mm

 By rotating or tilting the camera, obtain the following sets of images, including 9 sets of horizontal images and 7 sets of vertical images

 D_between must ensure the measurement accuracy, and it only needs to be measured once during the test, because this value is fixed.

Z_right (or Z_top), Z_left (or Z_bottom) need to be re-measured every time you shoot.

For each picture, the coordinates of two corner points can be obtained through an algorithm, and the measured distance d_between of these two corner points can be calculated through the triangular relationship, and the relative error between the actual distance D_between can be obtained.

Tooling error sources:

  • Measurement error of the distance between the entrance pupil and the corner point
  • Measurement error of the distance between two corner points
  • corner detection error

Take a 52°1.3Mp camera as an example:

D_between=10m±2mm, measurement error is ±0.02%

Z_left=20m±2mm, measurement error is ±0.01%

Z_right =20m±2mm, measurement error is ±0.01%

Corner detection error=±0.1pixel, there are two corners, so the relative error of the two corners is ±0.2pixel, assuming half image width is 600pixel, then the corner detection error is ±0.2/600=0.03%

Considering all the above factors, the total measurement error is ±0.07%

Verification process

  • fixed camera
  • Adjust the camera so that the target is at position1
  • Measure the distance Z from the entrance pupil to the corner point
  • capture image
  • Repeat the above steps to get all 16 pictures
  • Calculate the d_between obtained for each shooting, and calculate the relative error with D_between.

The accuracy requirements required by Mobileye are as follows:

The relative error between d_between and D_between requires less than 0.15%

-0.15%<Epair=(D_between-d_between)/D_between<0.15%

The difference between all relative errors is less than 0.25%

Emax = max Epair - min Epair <0.25%

 Of course, triangulation is mainly for small hole models, not for fisheye camera

 

Guess you like

Origin blog.csdn.net/csucmee502/article/details/129931173