IC Imaging Control C++

Frame sink concepts

Frame sink concepts

This chapter describes the concepts behind the sink classes provided by the library.


The class library contains 4 major frame sinks.

  • FrameNotificationSink is the most bare bones sink, but allows the fastest access to the image data.
  • FrameQueueSink provides a copying sink that contains 2 queues to allow catch-up operations.
  • FrameSnapSink provides a simple sink if you want to occasionally get 1 or more images from the current image stream.
  • FrameHandlerSink this is a legacy sink type.


If you need a stream of images to do operations on, this is a easy and efficient way to get that. The FrameNotificationSinkListener::frameReceived provides access to the images in the image stream. This image can now be copyied to the actual destination needed.

Because the FrameNotificationSinkListener::frameReceived callback gets called in the thread context of the driver, frames get dropped when you take too much time for your operation (or your thread gets scheduled out). Most drivers implement some buffering, but you cannot control the buffering done by the driver itself, so you can easily drop several frames when you are not keeping up.

So when you must either see every frame in a image stream or must look into the past better use the FrameQueueSink.


If you need a constant un-interrupted stream of images and to have to get (almost) all frames. You should use the FrameQueueSink. This sink contains 2 queues of FrameQueueBuffers to buffer variance in execution time of your algorithms.

The FrameQueueSink with its FrameQueueBuffer derived frames allows you to hold onto a buffer until you do not need it anymore. And you can return this buffer via FrameQueueSink::queueBuffer back into the sink itself. The amount of FrameQueueBuffers available controls the amount of time your operation can lag behind the image stream before the FrameQueueSink drops images.


The FrameSnapSink can be used to get simple access to the next N frames.

<< Technical Articles

Get in touch with us

About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us