Results 1 to 4 of 4

Thread: Ring Buffer, Dropped frames

  1. #1
    Join Date
    Apr 2017
    Posts
    2

    Ring Buffer, Dropped frames

    Hi,

    I am using a DFK22AUC03 with the C++ SDK on Windows 10. There are still a few things that I don't understand using the SDK.

    I have played around with the "Callback" example, which I understand as it is. But suppose that you tweak it and set:

    - the ring buffer has room for 1 image
    - we are in snap mode
    - the camera runs at 30 images per seconds
    - the listener (frameReady) needs 1 second to process
    - you ask for 60 images using pSink->snapImages(60);

    My understanding is that once the first image is ready, we call the frameReady function. My guess is that while this function is running, the buffer containing this image is locked. As a consequence, there is no way to save the images coming from the camera, and as a consequence, images should be dropped.
    But, calling grabber.getCountOfFramesDropped() gives me 0 even though grabber.isCountOfFramesDroppedAvailable() is true. Even more strange grabber.getCountOfFramesNotDropped() also returns 0.

    Could you please clarify on what's going on? When do we drop frames?

  2. #2
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,818

    Re: Ring Buffer, Dropped frames

    Hello

    If grabber.getCountOfFramesDropped() is supported by the device, it lets you know, the number of frames dropped by the driver. Not by the SDK.
    Best regards
    Stefan
    IC Imaging Control Support

  3. #3
    Join Date
    Apr 2017
    Posts
    2

    Re: Ring Buffer, Dropped frames

    Quote Originally Posted by Stefan Geissler View Post
    Hello
    If grabber.getCountOfFramesDropped() is supported by the device, it lets you know, the number of frames dropped by the driver. Not by the SDK.
    Thanks for the clarification, even though I don't quite understand how the information travels from the sensor to the ring buffer in the SDK. It would be nice to have such a thing in the documentation.

    But I also don't understand why .getCountOfFramesNotDropped() also returns 0.

  4. #4
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,818

    Re: Ring Buffer, Dropped frames

    The image travels from the camera to the USB controller. The USB controller saves the image into allocated memory via DMA on the computer. Then the USB controller notifies the driver about the new image. The driver takes the image, if it is ok, and forwards it to the DirectShow pipeline for making necessary stuff, e.g. color space transform. That is the part that runs in the SDK too.

    If frame ready is not called for a frame, then this does not necessarily mean, the camera and driver lost a frame. Therefore no frame drop.
    Best regards
    Stefan
    IC Imaging Control Support

Similar Threads

  1. Delete Ring Buffer
    By Paul Scholz in forum IC Imaging Control .NET
    Replies: 1
    Last Post: April 14, 2014, 10:14:39
  2. Getting number of frames dropped & captured.
    By timmoth in forum IC Imaging Control .NET
    Replies: 7
    Last Post: December 21, 2012, 08:24:07
  3. saved image & ring buffer
    By meltemii in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: May 24, 2011, 16:20:30
  4. Dropped Frames
    By glennpierce in forum IC Imaging Control C++ Class Library
    Replies: 3
    Last Post: February 9, 2007, 08:16:11
  5. frames being dropped
    By Unregistered in forum IC Imaging Control ActiveX
    Replies: 1
    Last Post: January 28, 2003, 12:19:45

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •