Items with no label
3335 Discussions

Real-time image acquisition for the range data

MAbdo2
New Contributor I
1,001 Views

I looked at the (limited) documentation that pertains to using callbacks for image acquisition, but need some help.

The aim is to improve my current image acquisition implementation to capture the range/depth images more efficiently. I would like to achieve a real-time behavior. In other words, I want to capture every range image that the sensor outputs. For the purpose of the discussion, assume that there is no processing involved, and the aim is just to capture the images into my buffers.

At present, I have an infinite loop that executes rs2::pipeline::wait_for_frames(timeout). Using this approach, I am getting around 25 fps on the average; the PC does not run any other application, and is not processing the images, just acquiring and copying the captured image into my (previously-allocated) buffer.

I am particularly interested in an approach that would yield the following:

- 30 fps range/depth (1280 x 720 resolution) image capture; No need to capture the color or IR images

- Asynchronous image capture whereby (somehow) the SDK automatically runs/calls a Callback function that I provide. Here, "automatically" means that "I don't want to spin a thread with an infinite loop to wait for a frame ..."

if there any way to achieve what I am looking for? If so, tips or snippets of code are appreciated?

Thanks,

0 Kudos
1 Solution
MartyG
Honored Contributor III
110 Views

There was a somewhat similar case last month where a user wanted to save all frames as PNG images. I thought that a 'for loop' might be the way to go.

View solution in original post

0 Kudos
1 Reply
MartyG
Honored Contributor III
111 Views

There was a somewhat similar case last month where a user wanted to save all frames as PNG images. I thought that a 'for loop' might be the way to go.

0 Kudos
Reply