Azure-Kinect-Sensor-SDK icon indicating copy to clipboard operation
Azure-Kinect-Sensor-SDK copied to clipboard

Guidance on unprojection and calibration to a fiducial

Open bnjff opened this issue 6 years ago • 1 comments

Hello, I'm having issues getting consistent 3D predictions from the two cameras. I would greatly appriciate if you could provide some guidance related to the quality of factory intrinsics, undistortion of the images, and the unprojection techniques.

The goal is first to calibrate two cameras to a charuco board, and then detect an object in both cameras and transform predictions to the common charuco frame. In the ideal world, the 3D coordinate predictions for the same physical point from two cameras will be very close.

Q1: Is it realistic to get a 1-2 mm accuracy in this application provided that cameras are about 0.5m from the object?

To get a better calibration to the charuco board, after getting an initial color-based transformation, we refine it using the 3d points. We 1) detect the corners of the charuco board, 2) unproject them to 3d, 3) transform them to the initial charuco frame 4) optimize the alignment between the predicted corner coordinates and the ground-truth corner coordinates in the charuco frame, and obtain the final transformation.

After computing this transformation for both cameras, the euclidean error for the same physical points (the same corners that were used to compute the transformation) observed by two cameras is 1-4mm, which is already pretty high. However, the points a little off the board result in a very large error on the order of centimeters. Manually calibrating the intrinsics seem to improve things somewhat but doesn't solve the issue.

Q2 There seems to be a big difference between the factory and manually-computed intrinsic parameters. Are factory intrinsics expected to be accurate or they should be recalibrated for an application requiring high accuracy? If yes, should the depth sensor be recalibrated too using the IR image? The extrinsics between the rgb and the depth sensor?

I have a feeling that part of the problem may be the way I unproject the points. Below is the procedure:

  • Obtain rgb and depth_to_rgb images and rgb_calibration using the ROS driver.
  • Undistort rgb and depth images using rgb intrinsics and distortion coefficients (using NN interpolation)
  • Pick the pixel coordinate of a physical point
  • Unproject the point using the pin-hole camera model

Q3 Does this straightforward unprojection approach look reasonable? I noticed that the SDK is using an iterative unprojection method. Is it expected to be significantly more accurate or handle inaccurate intrinsics? Do you know of a paper that discusses this technique?

For those experiments I used SDK v1.3.0 and the latest version of the ROS driver.

Thanks for your time and please let me know if there might be additional issues somewhere in the approach I described, aside from my questions.

bnjff avatar Dec 19 '19 01:12 bnjff

Q1: As far as expectations go 1-4mm sounds like a reasonable amount of depth error depending on the IR reflectance of the material and the distance from the camera. Q2: In general comparing the numeric values of lens models is not helpful. At factory calibration time there is validation to ensure that the depth and color camera calibrations produce consistent 3D results within the limits of the accuracy of the camera. Q3: This approach likely introduces additional error into your depth calculations since you are running the depth through a transform before placing in 3D space. I would recommend that you use the depth camera lens model for depth pixels rather than converting to the RGB space first.

We use the Brown-Conrady lens model.

cdedmonds avatar Dec 21 '19 23:12 cdedmonds