The FrameSnapSink is a sink type used to grab a number frames from the video stream on demand.
This sink is useful in situations where the application only needs access to the image data of some of the images, for example as part of a snapshot operation or at regular intervals. Live video can still be displayed as it is received by the device. If the application needs to process all images, the FrameQueueSink is the preferred option.
A simple example is shown here:
FrameSnapSink sink = new FrameSnapSink(MediaSubtypes.RGB32); ICImagingControl1.Sink = sink; ICImagingControl1.LiveStart(); // fetch a single image IFrameQueueBuffer frame = sink.SnapSingle(TimeSpan.FromSeconds(5)); frame.SaveAsBitmap("test.bmp"); frame.SaveAsJpeg("test.jpg", 90); frame.SaveAsTiff("test.tiff");
The sink constructor FrameSnapSink is passed MediaSubtypes.RGB32 to specify that the sink wants to capture RGB32 color images.
The call to SnapSingle blocks until a new image is received from the video capture device, and returns that image in a newly allocated IFrameQueueBuffer.
Namespace: TIS.Imaging
Introduced in version 3.5
BaseSink
FrameSnapSink
Property | Description | ||
OutputFrameType | |||
Method | Description | ||
FrameSnapSink |
Creates a new FrameSnapSink instance. |
||
SnapSequence |
Waits for several images to arrive and then returns the result. |
||
SnapSingle |
Waits for a single image to arrive and then returns the result |
||
⋯
⋯ ⋯
Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.
Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE, MIPI interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.