dji-sdk / Onboard-SDK-ROS

Official ROS packages for DJI onboard SDK.
443 stars 309 forks source link

Help interpreting depth images #258

Closed CTTCGeoLab closed 3 years ago

CTTCGeoLab commented 5 years ago

Hi, I am subscribing via ROS to the following topic /dji_sdk/stereo_240p_front_depth_images corresponding to the stereo disparity map from the front-facing camera of M210 in 240x320 resolution.

The images acquired are in MONO8 format and it can be seen how the intensity values changes in function of the distance. The problem is that there is no information associated about how to interpret the pixel values in order to estimate distances to objects. There is no evident correlation between the values and the distances.

In addition the SDK does not provide a camera_info topic associated so it is not possible to generate pointclouds coming from this information.

dji-sdk[bot] commented 5 years ago

Hi, there are two options for you to ask for help:

  1. Post your issues on StackOverflow: https://stackoverflow.com/questions/tagged/dji-sdk, the community can help you.

  2. Report your issues to dev@dji.com, as it's our official channel for developers to request DJI Developer Support now.

For DJI Developer Support, we have the following three tiers:

snakehaihai commented 5 years ago

Follow either opencv or ros version of the camera calibration process. Then get the intrinsic then generate the Q matrix. Then use the opencv reproject to 3D function.

stereo calib https://sourishghosh.com/2016/stereo-calibration-cpp-opencv/

http://wiki.ros.org/camera_calibration

Getting Q matrix https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#stereorectify

Reproj https://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#reprojectimageto3d