View my account

Strange FPS when enable both color and depth streams

Comments

9 comments

  • MartyG

    If the align process is being done before post-processing in your script, Intel recommend that the align is applied after post-processing.  Doing so reduces aliasing.

    There is also a relationship between FPS speed and the exposure value.

    https://github.com/IntelRealSense/librealsense/issues/1957#issuecomment-400715579 

    0
    Comment actions Permalink
  • Satsuna1352

    Thanks for your reply, but my fps is set to 60, so the required minimum exposure time is 1000ms/60fps = 16.6ms

    And I've already set the exposure value to 78(=7.8ms).

    I think the exposure value is quite enough for 60fps. 

    The main problem confusing me is that the time difference is unstable when I enable color and depth stream at the same time, just as the 3rd picture shows.

    0
    Comment actions Permalink
  • MartyG

    When streaming both depth and color at the same time, stability can be increased by introducing latency, by setting the "frame queue capacity" to a value of '2'.  

    https://github.com/IntelRealSense/librealsense/wiki/Frame-Buffering-Management-in-RealSense-SDK-2.0#latency-vs-performance 

    0
    Comment actions Permalink
  • Evgeni Raikhel

    The 3rd image is a manifestation of Realsense cameras feature called "internal sync".

    In general Depth and RGB sensors operate each with its own clock. In many use-cases though it is envisaged  that the frame pairs will be temporally coherent to allow for inter-frame inference, such as point cloud and frames alignment (registration),especially when capturing dynamic scenes.

    When D400 RGBand Depth sensors are set to the same FPS and the actual exposure does not exceed the frame period, then RGB sensor internally acts as Master and at the beginning of each frame it sends HW pulse to the Depth (Slave) sensor to start Depth generation as well. This results in Depth and RGB frames being captured simultaneously (timestamp offset < 1msec) as exhibited in the plot

    0
    Comment actions Permalink
  • Satsuna1352

    Hello MartyG, 

    I've read the article you posted, but I don't know how to check/change frame_queue capacity in python.

    It seems that frame_queue object does the same thing as pipeline object?

    Is there any example code I can take for reference?

     

    Hello Evgeni Raikhel,

    The time difference of the 3rd image is not between depth and color frames.

    I enable color and depth stream at the same time, but only record color frame's timestamp.

    As the image below shows, you can see the 237th and 238th color frames have the same timestamps.

    0
    Comment actions Permalink
  • MartyG

    I hope the discussion in the link below on frame queue size, which includes a link to sample code referencing frame queue size and some advice from Dorodnic the RealSense SDK Manager, will be of help to you in answering your questions on this subject.

    https://github.com/IntelRealSense/librealsense/issues/5041 

    0
    Comment actions Permalink
  • Evgeni Raikhel

    Hello Satsuna, I'm sorry for misinterpreting the data as it wasn't clear that it represents only the RGB stream.

     

     

    The call for

    frames = pipeline.wait_for_frames()

    produces synchronized bundles of frames named "rs2::framesets". And the repeating timestamps for RGB frames are due to of Host-side syncer deciding to reuse the same RGB frame in two (or more) consecutive framesets based on the timestamp differences.

    https://github.com/IntelRealSense/librealsense/issues/5107

    0
    Comment actions Permalink
  • Satsuna1352

    Sorry for my late reply,

    I used

    sensor.get_option(rs.option.frames_queue_size)

    to check the frames_queue_size and it returned 16.

    Therefore, I used

    sensor.set_option(rs.option.frames_queue_size, 2)

    to set the frames_queue_size to 2.

    but there are still many 0-second time differences.

    I'm not sure if the two terms frame queue capacity (on 11/6) and frame queue size (on 11/14) you mentioned are the same.

    0
    Comment actions Permalink
  • MartyG

    Queue size and queue capacity are the same thing.  The 'capacity' parameter describes the queue size, as confirmed in the SDK's frame buffering documentation.

    https://github.com/IntelRealSense/librealsense/wiki/Frame-Buffering-Management-in-RealSense-SDK-2.0#latency-vs-performance 

    0
    Comment actions Permalink

Please sign in to leave a comment.