- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I was testing with the D415 camera to find out how long it took, via code, to access the camera device and capture a single frame.
When testing using the code snippet below, I noticed that it actually took a second or so to do this.
Do RealSense cameras normally take this long to run code like this and is there a faster way to access the camera and take a frame using code (aside from dropping the number of frames that it waits for when stabilizing)?
Thanks in advance!
// Declare RealSense pipeline, encapsulating the actual device and sensors
rs2::pipeline c_pipe;
//Set the configurations
rs2::config c_cfg;
c_cfg.enable_device(serial_no);
//Changes in the resolution of the stream
c_cfg.enable_stream(RS2_STREAM_COLOR, 848, 480, RS2_FORMAT_BGR8, 30);
// Start streaming with the defined configurations
c_pipe.start(c_cfg);
//Declaration of frameset
rs2::frameset data;
//Stablize frames
for (int i = 0; i < 30; i++) {
data = c_pipe.wait_for_frames();
}
//Get frame
rs2::frame colour = data.get_color_frame();
- Tags:
- Intel® RealSense
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I went over your code and could not see any obvious problems.
The SDK documentation's section on latency may give some useful insight.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page