You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like #5546 (comment) ,I have saved depth image by cv::Mat matDepth(cv::Size(imgWidth,imgHeight) , CV_16UC1 , (void *)depth.get_data() , cv::Mat::AUTO_STEP)
However I have no idea how to get actual distance from saved imgs through cv::imread.
In rs_sensor.h, RS2_FORMAT_Z16 , /**< 16-bit linear depth values. **The depth is meters is equal to depth scale * pixel value**. */
So, is that means I just need to use cv::imread and multiply a depth scale factor? If so, how can I get the scale factor?
The text was updated successfully, but these errors were encountered:
Hi @fwf-lernen The C++ script in the link below, as part of a discussion on retrieving depth values from a PNG image with imread, may be useful to you:
However, when RealSense depth data is saved as a PNG, most of the depth information is lost. It is therefore better if possible to save the data as a .raw format image file that preserves the depth detail. The link below provides scripting for retrieving depth information from a .raw file.
Instead of obtaining the depth information from a PNG image, there is also the option of converting the cv::mat back into a RealSense rs2::frame, as described in the link below.
Issue Description
Like #5546 (comment) ,I have saved depth image by
cv::Mat matDepth(cv::Size(imgWidth,imgHeight) , CV_16UC1 , (void *)depth.get_data() , cv::Mat::AUTO_STEP)
However I have no idea how to get actual distance from saved imgs through cv::imread.
In rs_sensor.h,
RS2_FORMAT_Z16 , /**< 16-bit linear depth values. **The depth is meters is equal to depth scale * pixel value**. */
So, is that means I just need to use cv::imread and multiply a depth scale factor? If so, how can I get the scale factor?
The text was updated successfully, but these errors were encountered: