The FrameHandlerSink is the SinkType used to grab (copy) frames from the image stream. It replaces the deprecated FrameGrabberSink and contains a MemBufferCollection and optionally allows you to specify one or more IFrameFilters that are responsible for copying the image data to the buffers of the MemBufferCollection. The IFrameFilter implementation can perform user-defined transformations while copying the data, and they can intentionally drop unwanted frames. If no frame filter is registered, the frames are copied to the MemBufferCollection without being changed.
Frames are copied one after another to the MemBufferCollection, starting with the first buffer of the collection. When a frame is copied into the last buffer, the next frame is copied to the first buffer and so on.
The FrameHandlerSink can operate in snap mode, or in grab mode. The mode can be toggled by calling the method setSnapMode. In grab mode, frames are copied continuously to the MemBufferCollection, as soon as Grabber::startLive is called. A call to Grabber::stopLive ends the copy process. On the other hand, in snap mode, every call to FrameHandlerSink::snapImages or FrameHandlerSink::snapImagesAsync copies the specified number of frames to the MemBufferCollection. Grabber::startLive has to be called before any call to FrameHandlerSink::snapImages.
Creates a new FrameHandlerSink.
Returns a tCreateData structure, containing the information that was used to create this instance.
Returns the currently set list of IFrameFilters.
Returns the MemBuffer, in which the last frame was fully copied. Each restart of the sink sets the start of the MemBufferCollection to the first buffer. After stopping the sink, this function returns the last acquired frame until the sink is restarted.
Returns the current MemBufferCollection.
Returns the frame type of the sink. This is the frame type of the MemBufferCollection or the output frame type of the handler, when no MemBufferCollection is set.
This implementation of GrabberSinkType::getSinkType returns eFRAMEHANDLER_SINK.
Returns whether this FrameHandlerSink is currently in snap mode.
Sets a MemBufferCollection for this FrameHandlerSink.
Changes this sink's operating mode between Grab and Snap mode. In grab mode, all frames reaching the sink are presented to the frame filter or filter chain and then copied into the MemBufferCollection. After that, the frameReady event of the GrabberListener is called. In snap mode, snapImages or snapImagesAsync has to be called in order to trigger the image acquisition process.
Queues up a snap job, thus allowing a number of frames to be copied into the MemBufferCollection. The method returns when either the specified number of frames are snapped, or the timeout has occurred.
Queues up a snap job, thus copying a number of frames into the MemBufferCollection. The method returns immediately after queuing the job.
This structure describes the parameters that were used to create a FrameHandlerSink. You can access the tCreateData of a FrameHandlerSink by calling FrameHandlerSink::getCreateData, and passing it to FrameHandlerSink::create to create a similar FrameHandlerSink.
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.