Programming examples

Here, you can find programming examples to make a fast integration of the IDS industrial cameras easier.

Please note that registration or login is required to download the programming examples. Registration on the IDS website is free and gives you access to many useful additional functions, and detailed information about our products.

Protecting your privacy when it comes to storing and processing your personal data is extremely important to us. The data we ask you to provide for registration will not be passed onto third parties; your details will only be used for our own information and to optimize our services.

Image Acquisition with the uEye image queue in C/C++

Image Acquisition with the uEye image queue in C/C++

This sample shows the basic idea of continuously capturing images without losing frames. A ring image buffer sequence with at least 3 buffers is used. These buffers are put into the image queue. Images are acquired into the buffer system. Using the image queue, the oldest buffer can always be fetched. The image buffer is automatically locked. After sucessfully processing the image data, the buffer is unlocked and put back into the queue to be re-used.

Collecting the image buffers is done in a detached thread. This thread is independent of the GUI interaction and allows collecting images without being interrupted.

Image Acquisition with the uEye image queue in .NET C#

Image Acquisition with the uEye image queue in .NET C#

This sample shows the basic idea of continuously capturing images using the uEye image queue. A ring image buffer system is used to capture a 1-second-video.

Using the image queue, the oldest buffer can always be fetched. The image buffer is automatically locked. After sucessfully processing the image data, the buffer is unlocked and put back into the queue to be re-used.

Collecting the image buffers is done in a detached worker thread. This thread is independent of the GUI interaction and allows collecting images without being interrupted.

Crop operations on software side (C/C++)

Crop operations on software side (C/C++)

This sample is based on the uEyeImageQueue demo. In the processing part of the image queue thread, you can run different types of crop operations. All these operations are executed digitally based on the images received in the host. The crop operations are not performed in the camera sensor.

In contrast to the hardware crop functions on the sensor, the software solution also allows odd scaling factors.

The demo shows you how to access and process the image data using C/C++ pointer operations. The different results for the crop operations can be visualized and compared easily.

Multicast mode for GigE uEye cameras

This programming example demonstrates how to generally configure the multicast mode of IDS GigE uEye cameras and how to use the multicast feature as client.

Besides initialization and memory management, these are the main uEye API functions which are used in this source code example: is_GetSensorInfo(), is_DeviceInfo(), and is_Multicast().

uEye .NET C# - GPIO with master and slave cameras

This sample shows how to synchronize the image acquisition of two cameras by using the PWM (pulse width modulation) output of the master camera. Both cameras (master and slave) are running in hardware triggered mode (rising edge) and wait for a trigger signal on their GPIO 1 as trigger input. The trigger signal is generated by the PWM output on the GPIO 2 of the master camera.

Thus, the image acquisition of both cameras is done simultaneously.

uEye .NET C# - Image sequences

This sample shows how to acquire images in DIB-mode and put them into a sequence of image buffers. The sequence consists out of 10 buffers. The sample shows how to allocate the buffers, set them as active and add them to a sequence.

Besides this the sample shows how to read out the list of sequence IDs, convert them to memory IDs and read out those buffers (5 of 10).

uEye .NET C# - Text on bitmap image

This sample shows how to acquire images in DIB-mode and convert an image from a previously defined image memory into a bitmap, how to copy it into another bitmap and how to draw text and a bitmap into the image. This is done using the .NET System.Drawing.Graphics class.