Language:.NET C#/Visual Basic

## Opening and Handling Devices

The following programming examples show how you can use IC Imaging Control to open single and multiple devices. IC Imaging Control offers a built-in dialog for this purpose.

Open Device

Short source code snippet that illustrates how to open a device and display its live video stream, using the shipped dialog box.

Open with Shipped Dialog Box

Short source code snippet that illustrates how to open a device, using the shipped dialog box.

Open Multiple Devices

This is a brief coding example that illustrates how to open multiple devices and display their live image data streams simultaneously.

List Available Devices

Short source code snippet that illustrates how to list all video capture devices that are installed on a system and available to IC Imaging Control.

Read the Serial Number of a Video Capture Device

Sample code to read the serial number of a video capture device.

Use Built-In Property Dialog Boxes

Short code snippet that illustrates how to modify device properties using the property dialog box that ship with IC Imaging Control.

Modify Device Properties

This source code snippet illustrates how video capture device properties can be modified.

Save and Restore Device Properties

This short source code snippet illustrates how to save and restore device properties with IC Imaging Control.

## Live Display

The following programming examples show how you can use IC Imaging Control to display a live video in a window, to display a full screen video, to scale an image data stream and to create an overlay of live videos with graphics (e.g. cross-hairs or clock).

Resize Live Video to a Window

This source code snippet illustrates how to resize a live video stream to fit a window.

Full Screen Video Display

This programming example illustrates how to display a full screen live video.

Movable Crosshair on an Overlay

Short source code snippet that illustrates how to overlay an image data stream with movable crosshair.

## Frame Filter

The following programming examples show how you can use a frame filter in IC Imaging Control.

Mark Underexposed and Overexposed Pixels - Part 1

This source code snippet illustrates how to mark underexposed and overexposes pixels, using a ready-to-use filter in IC Imaging Control.

Mark Underexposed and Overexposed Pixels - Part 2

This snippet extents the first part, by showing how to programmatically control the parameters that visualize underexposed and overexposed pixels.

## Image Acquisition

These programming examples show how to use IC Imaging Control to acquire single images and save them as BMP or JPG files and how to acquire sequences of single images and save them as automatically enumerated BMP or JPG files.

Acquiring an Image

Short source code snippet that illustrates how to snap and display a single image using IC Imaging Control.

Saving an Image (BMP)

Short source code snippet that illustrates how to freeze an image data stream and save the frozen image as a BMP file.

Saving an Image (JPEG) to File

Short code snippet that illustrates how to freeze an image data stream and save the frozen image as a JPEG to file.

Save a Sequence of Single Images

Short code snippet that illustrates how to save the single images of an image data stream as BMP files (consecutively numbered image sequence).

Image and AVI Capture

This programming example (VB.NET) shows how to capture AVI files and JPEG images using IC Imaging Control simultaneously.

Iterating Through A Captured Image Sequence

This C# programming example shows how the last two seconds leading up to an unknown event can be captured to an image sequence.

## Video Acquisition

These programming examples show how you can use IC Imaging Control to create a list all codecs which are available on your computer, to show the property page of these codecs as well as acquire image data streams and save them as an AVI file.

List All Codecs on a System

Brief source code snippet that illustrates how to list all available codecs that are installed on a system.

Codec Property Page

Short source code snippet that illustrates how to modify the properties of a codec using IC Imaging Control.

Saving an AVI File

Short source code snippet that illustrates how to save an image data stream as an AVI file.

Save a Time-Limited AVI File

Short source code snippet that illustrates how to save an image data stream as a time-limited AVI file.

Image and AVI Capture

This programming example (VB.NET) shows how to capture AVI files and JPEG images using IC Imaging Control simultaneously.

## Image Processing

The following programming examples show how to use IC Imaging Control to access image data, to enhance the contrast of an image and to realize a binarization.

Accessing Image Data

Short source code snippet that illustrates how to access image data using IC Imaging Control.

Contrast Enhancement - Part 1

Programming example that illustrates how to enhance the contrast of a live video stream with the IC Imaging Control Frame Filter technology.

Contrast Enhancement - Part 2

Programming example that extends the first part by illustrating how to control the parameters for the contrast enhancement frame filter with customized controls.

Contrast Enhancement - Part 3

Programming example that illustrates how to implement contrast enhancement directly in the program.

Simple Binarization

Short code snippet to implement the binarization of a graylevel image, using a fixed threshold.

Finding a Laser Point

This C# programming example illustrates how to locate a laser point in a live video.