1 Reply Latest reply on Jul 10, 2018 4:02 PM by MartyG

    Real-time image acquisition for the range data

    MoA

      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,