- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using D415 Camera and I try to get RAW stream from each cam (rgb, ir-left, ir-right).
I read this http://https//www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/Intel-RealSense-D40-Series-Datasheet.pdf documents, and I know how to get data stream for each camera. like below code.
(RGB - BGRA8, BGR8, Y16 ... / Infrared left&right - Y16, Y8)
sensors = device.query_sensors();
stereoSensor = sensors[0];
stereoSensor.open(stream_profile);
stereoSensor.start([&](rs2::frame f) {m_ir2_FrameQueue.enqueue(f); });
But I want RAW-Stream, not as formatted(Y16, Y8, RGB8... etc) data.
how can i do this?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The link below has a script with a list of image formats on lines 54 to 74. RAW10 is referred to by the term RS2_FORMAT_RAW10.
https://github.com/IntelRealSense/librealsense/blob/5e73f7bb906a3cbec8ae43e888f182cc56c18692/include/librealsense2/h/rs_sensor.h# L55 librealsense/rs_sensor.h at 5e73f7bb906a3cbec8ae43e888f182cc56c18692 · IntelRealSense/librealsense · GitHub
My research indicates that the instructions would look something like this:
RAW10 COLOR
{ RS2_STREAM_COLOR, RS2_FORMAT_RAW10, width, height, 0 },
RAW10 INFRARED
{ RS2_STREAM_INFRARED, RS2_FORMAT_RAW10, width, height, 0 },
RAW10 DEPTH
{ RS2_STREAM_DEPTH, RS2_FORMAT_RAW10, width, height, 0 },
More complex use of these instructions can be found in the script below, from line 635 onwards down to the end of the script.
https://github.com/IntelRealSense/librealsense/blob/master/src/image.cpp librealsense/image.cpp at master · IntelRealSense/librealsense · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NO, the first answer is not the solution. Even though RS2_FORMAT_RAW10 is specified in rs2_format, the following code throws an exception. (which marked X)
- config cfg;
- cfg.enable_device(dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER));
- //cfg.enable_stream(RS2_STREAM_INFRARED, 1, 1920, 1080, RS2_FORMAT_RAW16, 0); X
- //cfg.enable_stream(RS2_STREAM_INFRARED, 1, 1920, 1080, RS2_FORMAT_RAW10); X
- //cfg.enable_stream(RS2_STREAM_INFRARED, 1920, 1080, RS2_FORMAT_RAW10); X
- //cfg.enable_stream(RS2_STREAM_COLOR, 1920, 1080, RS2_FORMAT_RAW10); X
- //cfg.enable_stream(RS2_STREAM_COLOR, 1920, 1080, RS2_FORMAT_RAW16); O
- //cfg.enable_stream(RS2_STREAM_INFRARED, 1920, 1080, RS2_FORMAT_RAW16); X
- pipeline pipe;
- pipeline_profile profile = pipe.start(cfg);
- frameset frames = pipe.wait_for_frames();
In my research, Sensor has there own unique stream format which is predetermined.
Color Stream - RAW16/Y16/BGRA8/RGBA8/BGR8/RGB8/YUYV (*and also only FHD resolution can use RAW16 )
Infrared Stream 0 - UYVY/Y16/BGRA8/RGBA8/BGR8/RGB8
Infrared Stream 1&2 - Y16/Y8 (* Y16 only can use in [FHD resolution X 25,15 fps] and [960x540 X 25,15 fps])
Depth Stream - Z16 only
Maybe your second answer could be a solution, but there is very little sample code....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello njsnacker,
The RAW format is not exposed to end users. To view all supported stream formats for each sensor use the command:
rs-enumerate-devices -m
We have submitted this request for support to the engineering team but we cannot say if and when it will be implemented.
Regards,
Jesus
Intel Customer Support
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page