Closed MrNash97 closed 5 years ago
Hi MrNash97,
Wonder if this can help you, if not checked yet?
https://github.com/IntelRealSense/librealsense/blob/master/wrappers/matlab/rosbag_example.m
Thanks!
I've tried that code. It works well with depth and RGB data. But, what I want to know is how to display the Infrared data. Can you help me with how to access the IR data? I only know how to access depth and RGB.
depth = fs.get_depth_frame();
This one is for depth
and
color = fs.get_color_frame();
This one is for RGB.
Thank you.
If the bag contains IR files, they should be streaming already. When no streams are explicitly specified to the config object for a bag file, all streams present are opened. fs.get_infrared_frame(0)
and fs.get_infrared_frame(1)
should allow you to grab the individual frames as they are read from the bag
@lramati Thank you, it's working. I want to ask one more thing. Is there any way to access the timestamp of each frame in Matlab? I need to synchronize the timing between IR and RGB data because it has different fps (even though I set the recording with the same fps).
Hi MrNash97,
You can refer to the timestamp functions defined in frame.m for how to get timestamp info:
https://github.com/IntelRealSense/librealsense/blob/master/wrappers/matlab/frame.m#L24 https://github.com/IntelRealSense/librealsense/blob/master/wrappers/matlab/frame.m#L27
Hope this can be helpful.
Thanks!
Thank you for your help. It seems that I must enable the frame metadata first to get what I wanted.
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 have recorded .bag file contain RBG and infrared (IR1 and IR2) data with my d435. I'm using rosbag_example.m to stream both, the RGB and infrared data. From that example, I was able to stream the RGB data but clueless with how to stream the infrared.
And one more thing, it seems the RGB and infrared data have different fps (I check it using realsense viewer). Is there any example of how to stream the data with the timestamp? So I can understand the data better.
Thankyou