• English
  • Deutsch

IC Imaging Control .NET

ICImagingControl.LivePrepare Method

ICImagingControl.LivePrepare Method

This method tries to setup the image stream by connecting the device with the display and the sink and inserting frame filters and overlays.
Public void LivePrepare();
Return Value:

If the image stream could not have been prepared, an exception is thrown.


LivePrepare prepares the image stream but does not start the live video and also does not allocate bandwidth on the used bus (FireWire or USB). Therefore this method is suitable in an environment with more than one video capture device. Subsequent starts of the live video by a call to LiveStart are much faster than LiveStart without a previous LivePrepare call.

A prepared and started live stream can be stopped and switched back to prepared state by a call to LiveSuspend.

A call to LiveStop clears the prepared live stream.

No operations which may change the layout of the video stream are permitted after LivePrepare was called. These operations are:


Introduced in version 3.1


This example shows to use some IC Imaging Controls in an array and open some video capture devices. The image streams are prepared right after the video capture devices have been opened.

In a simulated processing loop MemorySnapImage is executed in sequence on each IC Imaging Control. This loop runs relatively fast, because the live streams for each video capture have already been prepared.

// Create ICImagingControl instances for each connected video capture device. int CameraCount = 2; TIS.Imaging.ICImagingControl[] IC = new ICImagingControl[CameraCount]; // Open the video capture devices and prepare the live video stream for( int Camera = 0; Camera < CameraCount; Camera++ ) { IC[Camera] = new ICImagingControl(); IC[Camera].ShowDeviceSettingsDialog(); try { // Try to prepare the image stream. IC[Camera].LivePrepare(); } catch( ICException Ex ) { MessageBox.Show(Ex.Message, "LivePrepare Error"); } } // Now do some processing, e.g. snap an image. This loop simulates // 10 times image processing for each camera in sequence. for( int i = 0; i < 10; i++ ) { for( int Camera = 0; Camera < CameraCount; Camera++ ) { if( IC[Camera].IsLivePrepared ) { try { IC[Camera].MemorySnapImage(1000); // Show the snapped image in a PictureBox. pictureBox1.Image = IC[Camera].ImageActiveBuffer.Bitmap; pictureBox1.Update(); } catch( ICException Ex ) { MessageBox.Show(Ex.Message, "MemorySnapImage Error"); } } } } // At the end of the application the prepared live video streams should be stopped. for( int Camera = 0; Camera < CameraCount; Camera++ ) { IC[Camera].LiveStop(); }
See also: ICImagingControl, ICImagingControl.LiveSuspend, ICImagingControl.LiveStart, ICImagingControl.LiveStop, ICImagingControl.LiveVideoRunning, ICImagingControl.IsLivePrepared

<< 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, 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.

ISO 9001:2015 certified MVTEC | Edge AI + Vision Alliance | EMVA

Contact us