VolumetricCapture icon indicating copy to clipboard operation
VolumetricCapture copied to clipboard

Getting camera extrinsics

Open mhudnell opened this issue 6 years ago • 5 comments

I'm trying to load in the camera extrinsics that are given by the volumetric_capture.exe calibration (using v3.0). I found the .extrinsics files located in volumetric_capture\Data\Calibrations\20-04-14-15-08-05\. However I noticed the extrinsics in the file are slightly different from what is output in the volumetric_capture.exe console.

Example console extrinsics: extrinsics_terminal

Example d4150.extrinsics file contents:

0.0124787 -0.999791 0.016157
-0.23122 0.0128353 0.972817
-0.972821 -0.0158753 -0.231011
-71.0407 -1803.81 494.83

Which is correct / what is the intended way for me to load camera extrinsics? I'm using multiview-player.exe to generate calibrated clouds with multiview-player.exe -f d4150.cdv --pcloud --is_pcloud_calibrated, how does it know where to find the extrinsics, is it stored in the .cdv?

mhudnell avatar Apr 24 '20 15:04 mhudnell

The extrinsics pose of each viewpoint is indeed stored in the .cdv.

Should you want to use the *.extrinsics text file:

  • It starts with the rotation matrix in row major format
  • Then the translation parts follows in millimeters

The pose reported in the console is after conversion to meters, and flipping the y-z axis for correct upright rendering (given that the structure has z-up, while we want to render according to the sensor's y-up)

zokin avatar Apr 24 '20 15:04 zokin

thanks! that cleared it up

mhudnell avatar Apr 24 '20 16:04 mhudnell

@zokin hi, apologies for maybe a simple / obvious question, but are the *.extrinsic files relative to the depth camera? If I want to get the pointcloud (output from multiview_player.exe with options --pcloud --is_pcloud_calibrated) in the coordinates of the color camera, do I need to apply the "Color Depth Rotation" and "Color Depth Translation" transformations from the device_repository.json?

mhudnell avatar Apr 30 '20 02:04 mhudnell

The *.extrinsics files are transform the depth-derived points from the local coordinate system of each sensor to the common/global one, as defined by the calibration structure.

The calibrated point cloud is thus defined on the global coordinate system. In order to transform it to the local sensor coordinate system, you need to apply the inverse transformation (of the matrix as defined in the *.extrinsics files).

As you correctly assumed, this is at the original of the depth camera, as the calibration process only uses the depth maps, and no color information.

After you transform it to the depth origin, you need to apply the depth to color transformation, in order to transform the pcloud at the color camera's original / coordinate system.

Hope that helps, also take into account that if you are using the previous release, the was an error in the keys, the transform is actually the depth to color rotation/translation, and not the color to depth ones as indicated by the keys.

zokin avatar Apr 30 '20 06:04 zokin

thanks you, that was very helpful, I managed to transform it correctly to color cam's coordinate system.

mhudnell avatar May 01 '20 21:05 mhudnell