orbbec / OrbbecSDK

Orbbec SDK C/C++ base core lib
https://www.orbbec3d.com/
Other
97 stars 17 forks source link

depth to color space mapping problem #81

Open y1XbLg3 opened 5 months ago

y1XbLg3 commented 5 months ago

【Module】Orbbec Femto Bolt 【SDK Type】OrbbecSDK 【SDK Version】1.9.4 【Operating Platform】Windows10 【Programming Language】C++ 【Problem Description】 Version 1.9.4 finally provided the depth to color space mapping interface ob::CoordinateTransformHelper::calibration2dTo2d, but the coordinate deviation using this interface seems quite large, and I am not sure if it's due to incorrect usage. As there are no examples for the new interface in the Example section, I implemented a test based on my own understanding and found it incorrect. Currently, the coordinate deviation appears too large, here is the code, please check it, or could you provide some Example code: 【Additional Materials】 float depth = ((ushort)m_DepthImage.data)[nIndex] m_valueScale; OBPoint2f point2d; caliParam = pipe->getCalibrationParam(config); ob::CoordinateTransformHelper::calibration2dTo2d(caliParam, point, depth, OBSensorType::OB_SENSOR_DEPTH, OBSensorType::OB_SENSOR_COLOR, &point2d);

zhonghong322 commented 4 months ago

https://github.com/orbbec/OrbbecSDK/blob/main/examples/cpp/Sample-Transformation/Transformation.cpp In this sample, depth to color 2D conversion and color to depth 2D conversion samples are added