roboticslab-uc3m / vision

Vision processing
https://robots.uc3m.es/vision/
11 stars 7 forks source link

Update RGBD camera config files #94

Open PeterBowman opened 5 years ago

PeterBowman commented 5 years ago

PR https://github.com/robotology/yarp/pull/1960 added a new required physFocalLength parameter to groups RGB_INTRINSIC_PARAMETERS and DEPTH_INTRINSIC_PARAMETERS. We should update share/sensors/conf/asus-xtion.ini. Featured in YARP 3.2.0.

PeterBowman commented 5 years ago

The EXTRINSIC_PARAMETERS group is optional, hence could be removed if not used. Note to self: reference current ASUS Xtion values (link) in the .ini file.

PeterBowman commented 5 years ago

Currently missing specs (ASUS Xtion Pro Live, ref):

PeterBowman commented 5 years ago

Sensor transform and depth accuracy estimations for Kinect 1, Kinect 2 and ASUS Xtion Pro Live: Filippo Basso, Emanuele Menegatti, and Alberto Pretto, "Robust Intrinsic and Extrinsic Calibration of RGB-D Cameras", 2018 (arxiv).

PeterBowman commented 5 years ago

Kinect 1 & Kinect 2 resolution, FOV and depth distance (thanks, @jgagom; https://github.com/roboticslab-uc3m/sign-language-papers/issues/19#issuecomment-479110680):

55423118-89a3d800-557d-11e9-8f69-f6826ce8e9f9

PeterBowman commented 5 years ago

Kinect intrinsics (includes distortion params) and extrinsic transform (ref):

# Calibration file 
# ---------------------------------------------------------
# Left camera (IR/Depth in Kinect) calibration parameters
[CAMERA_PARAMS_LEFT]
resolution = [640 488]
cx         = 314.649173
cy         = 240.160459
fx         = 572.882768
fy         = 542.739980
dist       = [-4.747169e-03 -4.357976e-03 0.000000e+00 0.000000e+00 0.000000e+00]    // The order is: [K1 K2 T1 T2 K3]

# Right camera (RGB in Kinect) calibration parameters
[CAMERA_PARAMS_RIGHT]
resolution = [640 480]
cx         = 322.515987
cy         = 259.055966
fx         = 521.179233
fy         = 493.033034
dist       = [5.858325e-02 3.856792e-02 0.000000e+00 0.000000e+00 0.000000e+00]    // The order is: [K1 K2 T1 T2 K3]

# Relative pose of the right camera wrt to the left camera:
# This assumes that both camera frames are such that +Z points
# forwards, and +X and +Y to the right and downwards.
[CAMERA_PARAMS_LEFT2RIGHT_POSE]
pose_quaternion      = [0.025575 -0.000609 -0.001462 0.999987 0.002038 0.004335 -0.001693]
# ---------------------------------------------------------

I guess this is the Kinect 1 sensor, but given resolution values look suspicious.

PeterBowman commented 5 years ago

Even moar params for both Kinects at Diana Pagliari and Livio Pinto, "Calibration of Kinect for Xbox One and Comparison between the Two Generations of Microsoft Sensors", 2015 (full text): resolution, distance, FOV, intrinsics (given in millimeters and pixels)...

PeterBowman commented 3 years ago

Commit https://github.com/roboticslab-uc3m/vision/commit/d8af84bce39f3d50b9330b1f93f6b4b5bb765dec unbreaks the ASUS Xtion for recent YARP releases.

PeterBowman commented 3 years ago

Kinect2 depth parameters as used in OpenCV's rgbd module samples (link):

namespace Kinect2Params
{
static const Size frameSize = Size(512, 424);
// approximate values, no guarantee to be correct
static const float focal = 366.1f;
static const float cx    = 258.2f;
static const float cy    = 204.f;
static const float k1    = 0.12f;
static const float k2    = -0.34f;
static const float k3    = 0.12f;
};  // namespace Kinect2Params