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
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Required Info
Camera Model
{ R200 / F200 / SR300 / ZR300 / D400 }
Firmware Version
(Open RealSense Viewer --> Click info)
Operating System & Version
{Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS
Kernel Version (Linux Only)
(e.g. 4.14.13)
Platform
PC/Raspberry Pi/ NVIDIA Jetson / etc..
SDK Version
{ legacy / 2.. }
Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment
{Robot/Smartphone/VR/AR/others }
Issue Description
Hi, I saved .raw format depth images and color images from realsense viewer, then use rs2::software_device to reconstruct pointclouds. The code below was working well on .png format depth images, so mabey when I reading .raw depth images, something happend? Could anyone help me about this issue?
Read raw depth image function:
cv::Mat read_raw(std::string file_path, int w, int h)
{
FILE* fp = NULL;
fp = fopen(file_path.c_str(), "rb+");
unsigned char* data = (unsigned char*)malloc(w * h * sizeof(unsigned char));
fread(data, sizeof(unsigned char), w * h, fp);
cv::Mat img;
int bufLen = w * h;
img.create(h, w, CV_16UC1);
memcpy(img.data, data, bufLen * sizeof(unsigned char));
return img;
}
Hi @Li-Yidong There are not many references available about reading depth from a .raw file with C++ code. #2231 (comment) and #2200 (comment) may be helpful discussions if you have not seen them already.
#2231 (comment) provides advice about aligning a depth .raw and a color .png by using software_device.
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
Hi, I saved
.raw
format depth images and color images from realsense viewer, then users2::software_device
to reconstruct pointclouds. The code below was working well on.png
format depth images, so mabey when I reading.raw
depth images, something happend? Could anyone help me about this issue?Read raw depth image function:
Reconstruct function:
main function:
The text was updated successfully, but these errors were encountered: