• Accuracy Issues with Distance Measurement Using OAK-D-Lite

I am currently using the OAK-D-Lite camera for distance measurement of objects using spatialCoordinates. However, I am experiencing significant discrepancies between the measured values and the actual distances. From checking the calibration data, it appears that everything is set to factory defaults.

Could anyone advise on how to improve the accuracy of distance measurements with this model? Are there specific calibration steps I should follow, or settings that can be adjusted to reduce these discrepancies? Any advice or recommendations would be greatly appreciated.

Thank you!

    houmam
    Why do that? We have onboard stereo engine that does the same thing.
    Make sure you get intrinsics for your current resolution, also recheck the undistortion part - all coefficients should be used - we used the brown-conrady model + prism + lens tilt.

    Thanks,
    Jaka

    I don’t understand you well. I haven’t use the reprojetionmatrix to calculate the distance. I have used also intrinsics in another code but i still had a significant difference. Could you please provide me with the code with what you exactly mean. Thank you

      8 days later

      MXID: 184430107179011300

      calibration_reader:

      {

          "batchName": "",

          "batchTime": 0,

          "boardConf": "",

          "boardCustom": "",

          "boardName": "OAK-D-LITE",

          "boardOptions": 0,

          "boardRev": "R1M1E3",

          "cameraData": [

              [

                  1,

                  {

                      "cameraType": 0,

                      "distortionCoeff": [

                          -7.598700046539307,

                          4.12037467956543,

                          -0.0016203843988478184,

                          0.001308034174144268,

                          88.25011444091797,

                          -7.602977752685547,

                          4.180993556976318,

                          87.9820785522461,

                          0.0,

                          0.0,

                          0.0,

                          0.0,

                          0.0,

                          0.0

                      ],

                      "extrinsics": {

                          "rotationMatrix": [

                              [

                                  0.9995226860046387,

                                  -0.004209341015666723,

                                  -0.030604496598243713

                              ],

                              [

                                  0.003992774523794651,

                                  0.999966561794281,

                                  -0.007133955601602793

                              ],

                              [

                                  0.030633503571152687,

                                  0.007008354179561138,

                                  0.9995061159133911

                              ]

                          ],

                          "specTranslation": {

                              "x": -7.5,

                              "y": 0.0,

                              "z": 0.0

                          },

                          "toCameraSocket": 2,

                          "translation": {

                              "x": -7.488437175750732,

                              "y": -0.19271370768547058,

                              "z": 0.02270856313407421

                          }

                      },

                      "height": 480,

                      "intrinsicMatrix": [

                          [

                              453.6262512207031,

                              0.0,

                              343.323486328125

                          ],

                          [

                              0.0,

                              453.6262512207031,

                              242.0719451904297

                          ],

                          [

                              0.0,

                              0.0,

                              1.0

                          ]

                      ],

                      "lensPosition": 0,

                      "specHfovDeg": 72.9000015258789,

                      "width": 640

                  }

              ],

              [

                  2,

                  {

                      "cameraType": 0,

                      "distortionCoeff": [

                          -8.716520309448242,

                          26.22773551940918,

                          -0.0030596929136663675,

                          -0.0002458873495925218,

                          -23.54348373413086,

                          -8.718385696411133,

                          26.234407424926758,

                          -23.54959487915039,

                          0.0,

                          0.0,

                          0.0,

                          0.0,

                          0.0,

                          0.0

                      ],

                      "extrinsics": {

                          "rotationMatrix": [

                              [

                                  0.9998490810394287,

                                  0.015936100855469704,

                                  0.006921960972249508

                              ],

                              [

                                  -0.015934595838189125,

                                  0.9998729825019836,

                                  -0.00027246723766438663

                              ],

                              [

                                  -0.0069254240952432156,

                                  0.00016212747141253203,

                                  0.9999759793281555

                              ]

                          ],

                          "specTranslation": {

                              "x": 3.75,

                              "y": 0.0,

                              "z": 0.0

                          },

                          "toCameraSocket": 0,

                          "translation": {

                              "x": 3.7727956771850586,

                              "y": 0.06467039883136749,

                              "z": -0.32481420040130615

                          }

                      },

                      "height": 480,

                      "intrinsicMatrix": [

                          [

                              451.05206298828125,

                              0.0,

                              332.4398193359375

                          ],

                          [

                              0.0,

                              451.05206298828125,

                              255.8579559326172

                          ],

                          [

                              0.0,

                              0.0,

                              1.0

                          ]

                      ],

                      "lensPosition": 0,

                      "specHfovDeg": 72.9000015258789,

                      "width": 640

                  }

              ],

              [

                  0,

                  {

                      "cameraType": 0,

                      "distortionCoeff": [

                          22.81800651550293,

                          75.34269714355469,

                          -0.0014442295068874955,

                          0.0013911178102716804,

                          16.983684539794922,

                          23.06888198852539,

                          69.75896453857422,

                          25.427997589111328,

                          0.0,

                          0.0,

                          0.0,

                          0.0,

                          0.0,

                          0.0

                      ],

                      "extrinsics": {

                          "rotationMatrix": [

                              [

                                  0.0,

                                  0.0,

                                  0.0

                              ],

                              [

                                  0.0,

                                  0.0,

                                  0.0

                              ],

                              [

                                  0.0,

                                  0.0,

                                  0.0

                              ]

                          ],

                          "specTranslation": {

                              "x": -0.0,

                              "y": -0.0,

                              "z": -0.0

                          },

                          "toCameraSocket": -1,

                          "translation": {

                              "x": 0.0,

                              "y": 0.0,

                              "z": 0.0

                          }

                      },

                      "height": 2160,

                      "intrinsicMatrix": [

                          [

                              2960.29736328125,

                              0.0,

                              1852.9124755859375

                          ],

                          [

                              0.0,

                              2960.29736328125,

                              1129.3759765625

                          ],

                          [

                              0.0,

                              0.0,

                              1.0

                          ]

                      ],

                      "lensPosition": 0,

                      "specHfovDeg": 68.7938003540039,

                      "width": 3840

                  }

              ]

          ],

          "deviceName": "",

          "hardwareConf": "",

          "housingExtrinsics": {

              "rotationMatrix": [],

              "specTranslation": {

                  "x": 0.0,

                  "y": 0.0,

                  "z": 0.0

              },

              "toCameraSocket": -1,

              "translation": {

                  "x": 0.0,

                  "y": 0.0,

                  "z": 0.0

              }

          },

          "imuExtrinsics": {

              "rotationMatrix": [

                  [

                      0.0,

                      0.0,

                      0.0

                  ],

                  [

                      0.0,

                      0.0,

                      0.0

                  ],

                  [

                      0.0,

                      0.0,

                      0.0

                  ]

              ],

              "specTranslation": {

                  "x": 0.0,

                  "y": 0.0,

                  "z": 0.0

              },

              "toCameraSocket": -1,

              "translation": {

                  "x": 0.0,

                  "y": 0.0,

                  "z": 0.0

              }

          },

          "miscellaneousData": [],

          "productName": "",

          "stereoEnableDistortionCorrection": false,

          "stereoRectificationData": {

              "leftCameraSocket": 1,

              "rectifiedRotationLeft": [

                  [

                      0.9999738335609436,

                      0.0065476056188344955,

                      0.0030778548680245876

                  ],

                  [

                      -0.006536826025694609,

                      0.9999725222587585,

                      -0.003499371465295553

                  ],

                  [

                      -0.0031006827484816313,

                      0.0034791603684425354,

                      0.9999891519546509

                  ]

              ],

              "rectifiedRotationRight": [

                  [

                      0.9993748068809509,

                      0.01051810011267662,

                      0.033754926174879074

                  ],

                  [

                      -0.010635835118591785,

                      0.9999379515647888,

                      0.0033102722372859716

                  ],

                  [

                      -0.033718012273311615,

                      -0.0036672144196927547,

                      0.9994246363639832

                  ]

              ],

              "rightCameraSocket": 2

          },

          "stereoUseSpecTranslation": true,

          "version": 6,

          "verticalCameraSocket": -1

      }