IC Imaging Control .NET

ICImagingControl.MemorySnapImageSequence Method

ICImagingControl.MemorySnapImageSequence Method

This method captures a sequence of still images from a live video stream and stores the images in a list of internal buffers. The images can be saved to individual files using the ICImagingControl.MemorySaveImageSequence method.
Syntax:
[VB.NET]
Public Sub MemorySnapImageSequence(ImageCount As Integer) Public Sub MemorySnapImageSequence(ImageCount As Integer , timeoutInMs As Integer)
[C#]
public void MemorySnapImageSequence(int ImageCount); public void MemorySnapImageSequence(int ImageCount, int timeoutInMs);
Parameter Description
ImageCount

Specifies number of images to be captured.

timeoutInMs

Specifies the snap timeout value in milliseconds.

Remarks:

When LiveCaptureContinuous is true, MemorySnapImageSequence throws a ICException with the error code NotAvailableOutsideSnapMode.

Sample:

The following code snippet shows how to snap 10 images from the video live stream using a timeout of 3000ms. The snapped images will be shown in a PictureBox:

[VB.NET]
' Use 10 image buffers. IcImagingControl1.ImageRingBufferSize = 10 IcImagingControl1.LiveStart() Try ' Snap 5 images using a timeout of 3000ms. IcImagingControl1.MemorySnapImageSequence(10, 3000) ' Show the snapped images in a PictureBox. For Each Img As TIS.Imaging.ImageBuffer In IcImagingControl1.ImageBuffers PictureBox1.Image = Img.Bitmap PictureBox1.Update() System.Threading.Thread.Sleep(1000) Next Catch Ex As ICException MessageBox.Show(Ex.Message) End Try IcImagingControl1.LiveStop()
[C#]
// Use 10 image buffers. ICImagingControl1.ImageRingBufferSize = 10; ICImagingControl1.LiveStart(); try { // Use a timeout of 3000ms. ICImagingControl1.MemorySnapImageSequence(10,3000); // Show the snapped images in a PictureBox. foreach (TIS.Imaging.ImageBuffer Img in ICImagingControl1.ImageBuffers) { pictureBox1.Image = Img.Bitmap; pictureBox1.Update(); System.Threading.Thread.Sleep(1000); } } catch (ICException Ex) { MessageBox.Show(Ex.Message, "MemorySnapImage Error"); } ICImagingControl1.LiveStop();
See also: ICImagingControl, ICImagingControl.MemorySaveImageSequence, ICImagingControl.ImageRingBufferSize

<< ICImagingControl

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