This chapter shows the most important functions of the uEye API for integrating your camera into your own applications. You will find comprehensive lists of the API functions, sorted by task, in the How To Proceed chapter.
The uEye SimpleLive and uEye SimpleAcquire C++ programming samples included in the SDK illustrate the steps described below.
For information on required include files (uEye API and header) see section Programming Notes.

|
Select a display mode
The uEye API provides two different modes you can use to display the camera's images on the PC. To quickly show a live image under Windows, it is easiest to use the Direct3D mode. This mode has the advantage that no image memory has to be allocated, and that image capture is handled by the driver. Call is_SetDisplayMode() to select the display mode. You can then customize the Direct3D mode by using is_DirectRenderer().
For advanced users:
You can also access the image data directly by selecting the Bitmap (DIB) mode. To use DIB mode, you first have to allocate one or more memories by using is_AllocImageMem(), add them to a memory sequence, if required, and then activate a memory with is_SetImageMem() before each image capture. To show the image on-screen, call the is_RenderBitmap() function after each completed image capture. From the events or messages you can see when an image is available for display.
Under Linux:
The display functions of the uEye API are not available under Linux. You need to allocate and activate the relevant image memory as described above. The application then displays the image data via the Linux function library used.
|
|

|
Capture images
Recording live images with the uEye is very simple. Just call the is_CaptureVideo() function and the camera captures the live images at the default frame rate. To capture single frames, use the is_FreezeVideo() function. Every uEye camera of course also provides different trigger modes for image capture. Use is_SetExternalTrigger() to activate the desired mode before starting the image capture.
|
|

|
Save an image
Use the is_SaveImageEx() function to save the current image as a BMP or JPEG file. To save a specific image, it is better to use the Snap function (single frame mode) than the Live function (continuous mode).
|
|

|
Close the camera
When you want to exit your application, close the camera with is_ExitCamera(). The camera and the allocated memory are automatically released. All previously set camera parameters will be lost, however. So, if you want to save specific settings, use the is_SaveParameters() function before closing the camera. The next time you start the application, you can simply load the settings again by using is_LoadParameters().
|
|