View my account

D435 Get frame and save image very dark

Comments

1 comment

  • MartyG

    Hi Ziheye  When the stream is started with auto-exposure enabled it can take several frames for the exposure to settle down, which may result in the first few frames have incorrect exposure.  This can be avoided by skipping the first several frames and then capturing the next one after the skip.

     

    The 'for' code for the skip mechanism only requires a small number of lines and should be placed immediately after the pipeline start instruction.  For example:

    C++

    pipe.start(cfg);

    // Camera warmup - dropping several first frames to let auto-exposure stabilize
    rs2::frameset frames;
    for(int i = 0; i < 30; i++)
    {
    // Wait for all configured streams to produce a frame
    frames = pipe.wait_for_frames();
    }

     

    Python

    profile = pipe.start(cfg)
    # Skip 5 first frames to give the Auto-Exposure time to adjust
    for i in range(5):
    pipe.wait_for_frames()
    0
    Comment actions Permalink

Please sign in to leave a comment.