-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to convert uint8 data captured by Depth to the correct 'mono16'? #13542
Comments
Hi @wenmingxiaohuo RealSense depth data is not 8-bit. It is 16-bit uint16_t. |
You are very welcome. Thanks for sharing your code! |
Thanks, but I'm still a little confused. |
Was the bag file recorded in ROS and you are attempting to read it using the librealsense SDK, please? If it is a ROS bag then it will be difficult to use with librealsense because there are differences between the rosbag format of ROS and librealsense's SDK-bag format, as advised at #3020 (comment) 8-bit to 16-bit conversion is not usually something that is done with RealSense depth data, but the non-RealSense link below might provide some ideas about how to do it. https://stackoverflow.com/questions/52183191/convert-uint8-t-array-to-uint16-t |
Ok thanks for the answer, I see what you mean. Also in response to your reply there is a small question, 'D:\RecordData_D435\20241125_111919.bag' is the data captured using the D435, how can I tell if this bag file is a ROG bag file? |
Sorry, I have other things to take care of, so please just leave a message at your leisure. Thank you for every answer, bye! |
A quick way to test whether a bag file might be a ROS bag is to drag and drop the file into the center panel of the RealSense Viewer tool if you have access to that tool. If there is an error message instead of the bag starting to play automatically then there is a good chance that it is a rosbag instead of an SDK-bag. |
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
<Describe your issue / question / feature request / etc..>
The text was updated successfully, but these errors were encountered: