- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried the following commands, but both figures are just from the same (left) camera. I like to get y16 from both left and right:
% Make Pipeline object to manage streaming
pipe = realsense.pipeline();
%enable the IR streams
cfg = realsense.config();
cfg.enable_stream(realsense.stream.infrared, realsense.format.y16) %configure the an unrectified stream
%cfg.enable_stream(realsense.stream.infrared, realsense.format.y16) %configure the an unrectified stream
% Start streaming all streams
profile = pipe.start(cfg);
%in order to get this to work, frameset.m needs to be corrected. all
%instancces of int64_t needs to be changed to int64 in that file.
% Get streaming device's name
dev = profile.get_device();
name = dev.get_info(realsense.camera_info.name);
% Get frames. We discard the first couple to allow
% the camera time to settle
for i = 1:5
fs = pipe.wait_for_frames();
end
frameCount =0;
while frameCount < 50
frameCount = frameCount+1;
fs = pipe.wait_for_frames();
ir1 = fs.get_infrared_frame(0);
ir2 = fs.get_infrared_frame(1);
irdata1 = ir1.get_data();
irdata2 = ir2.get_data();
img1 = reshape(irdata1, 1280, 800);
img2 = reshape(irdata2, 1280, 800);
figure(1)
imshow(img1)
figure(2)
imshow(img2)
end
% Stop streaming
pipe.stop();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure what the programming syntax would be if you wanted to write the instruction for use in the MATLAB wrapper. In general though, if you want to stream left and right then you should give the streams index numbers (e.g 1 for left and 2 for right). Here's a C++ example:
https://github.com/IntelRealSense/librealsense/issues/1140#issuecomment-364816438
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure what the programming syntax would be if you wanted to write the instruction for use in the MATLAB wrapper. In general though, if you want to stream left and right then you should give the streams index numbers (e.g 1 for left and 2 for right). Here's a C++ example:
https://github.com/IntelRealSense/librealsense/issues/1140#issuecomment-364816438
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@MartyG Brilliant, thanks! The corresponding Matlab wrapper syntax for configuring two Y16 streams are:
cfg = realsense.config();
cfg.enable_stream(realsense.stream.infrared, 1, realsense.format.y16)
cfg.enable_stream(realsense.stream.infrared, 2, realsense.format.y16)
@ElizaD_Intel Thanks for your reply but the link appears to be broken. I also could not find that thread by searching for it. But MartyGs answer solved it for me!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page