View my account

rs2::frame_queue

Comments

1 comment

  • Zulkifli Halim

    Hello Yxliuwm,

    Thank you for contacting us.

     

    1. For queue.enqueue(), is the thread blocked or just overwrite the oldest frame when the queue is full?

    queue.enqueue() adds an object to the end of the Queue. When the queue becomes full, it will drop the newest frame which just arrived.

     

    2. For queue.poll_for_frame(), it will return immediately no matter there are frames or not in the queue?

    yes, Poll for frames will always return instantly. If you do use poll_for_frames you should manually decide when to put the CPU to sleep and for how long, otherwise you can end up using 100% of a single core.

     

    3. Can I use this queue to do synchronization for other non-realsense smart pointer class such as the Mat of OpenCV.

    It might not be supported. For your info, RealSense has an OpenCV-wrapper that demonstrates how to integrate Intel RealSense cameras with opencv in domain of computer-vision.

     

    Sincerely,

    Zulkifli Halim

     

    0
    Comment actions Permalink

Please sign in to leave a comment.