Commit a87e6e66 authored by Lubosz Sarnecki's avatar Lubosz Sarnecki
Browse files

oh: Initialize VIVE distortion parameters with default values from my VIVE.

parent cdfe8b8d
......@@ -334,6 +334,50 @@ oh_device_create(ohmd_context *ctx,
if (quirk_video_distortion_vive) {
ohd->base.distortion.models |= XRT_DISTORTION_MODEL_VIVE;
ohd->base.distortion.preferred = XRT_DISTORTION_MODEL_VIVE;
// clang-format off
// These need to be aquired from the vive config
ohd->base.distortion.vive.aspect_x_over_y = 0.8999999761581421f;
ohd->base.distortion.vive.grow_for_undistort = 0.6000000238418579f;
ohd->base.distortion.vive.undistort_r2_cutoff[0] = 1.11622154712677f;
ohd->base.distortion.vive.undistort_r2_cutoff[1] = 1.101870775222778f;
ohd->base.distortion.vive.center[0][0] = 0.08946027017045266f;
ohd->base.distortion.vive.center[0][1] = -0.009002181016260827f;
ohd->base.distortion.vive.center[1][0] = -0.08933516629552526f;
ohd->base.distortion.vive.center[1][1] = -0.006014565287238661f;
// left
// green
ohd->base.distortion.vive.coefficients[0][0][0] = -0.188236068524731f;
ohd->base.distortion.vive.coefficients[0][0][1] = -0.221086205321053f;
ohd->base.distortion.vive.coefficients[0][0][2] = -0.2537849057915209f;
// blue
ohd->base.distortion.vive.coefficients[0][1][0] = -0.07316590815739493f;
ohd->base.distortion.vive.coefficients[0][1][1] = -0.02332400789561968f;
ohd->base.distortion.vive.coefficients[0][1][2] = 0.02469959434698275f;
// red
ohd->base.distortion.vive.coefficients[0][2][0] = -0.02223805567703767f;
ohd->base.distortion.vive.coefficients[0][2][1] = -0.04931309279533211f;
ohd->base.distortion.vive.coefficients[0][2][2] = -0.07862881939243466f;
// right
// green
ohd->base.distortion.vive.coefficients[1][0][0] = -0.1906209981894497f;
ohd->base.distortion.vive.coefficients[1][0][1] = -0.2248896677207884f;
ohd->base.distortion.vive.coefficients[1][0][2] = -0.2721364516782803f;
// blue
ohd->base.distortion.vive.coefficients[1][1][0] = -0.07346071902951497f;
ohd->base.distortion.vive.coefficients[1][1][1] = -0.02189527566250131f;
ohd->base.distortion.vive.coefficients[1][1][2] = 0.0581378652359256f;
// red
ohd->base.distortion.vive.coefficients[1][2][0] = -0.01755850332081247f;
ohd->base.distortion.vive.coefficients[1][2][1] = -0.04517245633373419f;
ohd->base.distortion.vive.coefficients[1][2][2] = -0.0928909347763f;
// clang-format on
}
if (quirk_video_distortion_none) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment