Ueye Programming Manual
Ueye Programming Manual
Content
Content
1 Introduction
1.1 1.2 1.3 1.4 Preface Copyright Trademarks Contacting us
10
10 10 10 11
2 Welcome
2.1 2.2 About this Manual What is New in this Version?
12
13 14
3 Quick-Start 4 Programming
4.1 4.2 4.3 4.4 4.5 4.6 Programming in C / C++ Programming in C# Programming in Visual Basic Programming in Delphi Programming with ActiveX Thread Programming
15 17
17 18 18 19 19 19
5 Function Blocks
5.1 Image Capture
Open and Close Camera Image Capture Image Pre-processing Memory and Sequences Event / Message Handling Saving and Loading Images Capturing AVIs
20
20
5.2
Camera Control
Read out Camera Information Setting and Getting Parameters Automatic Image Control
26
Content
Input / Output Control I2C Functions Reading from and Writing to the EEPROM GigE uEye Functions
5.3
Image Display
31
6 Flowcharts
6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 Capturing a Single Frame Allocating Memory Capturing a Frame Sequence Displaying Images Events and Messages Inputs / Outputs (Trigger / Flash) Changing Camera Settings Capturing AVIs
33
34 36 38 40 41 44 46 48
7 Description of Functions
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13 7.14 7.15 is_AddToSequence is_AllocImageMem is_CameraStatus is_CaptureVideo is_ClearSequence is_ConvertImage is_CopyImageMem is_CopyImageMemLines is_DirectRenderer is_DisableEvent is_EnableAutoExit is_EnableEvent is_EnableHdr is_EnableMessage is_ExitCamera
49
50 51 53 55 57 58 59 60 61 67 68 69 70 71 73
3
Content
7.16 7.17 7.18 7.19 7.20 7.21 7.22 7.23 7.24 7.25 7.26 7.27 7.28 7.29 7.30 7.31 7.32 7.33 7.34 7.35 7.36 7.37 7.38 7.39 7.40 7.41 7.42 7.43 7.44
is_ExitEvent is_ForceTrigger is_FreeImageMem is_FreezeVideo is_GetActiveImageMem is_GetActSeqBuf is_GetAutoInfo is_GetBusSpeed is_GetCameraInfo is_GetCameraList is_GetCameraLUT is_GetCameraType is_GetCaptureErrorInfo is_GetColorConverter is_GetColorDepth is_GetComportNumber is_GetDLLVersion is_GetError is_GetDuration is_GetEthDeviceInfo is_GetExposureRange is_GetFramesPerSecond is_GetFrameTimeRange is_GetGlobalFlashDelays is_GetHdrKneepointInfo is_GetHdrKneepoints is_GetHdrMode is_GetImageHistogram is_GetImageInfo
Content
7.45 7.46 7.47 7.48 7.49 7.50 7.51 7.52 7.53 7.54 7.55 7.56 7.57 7.58 7.59 7.60 7.61 7.62 7.63 7.64 7.65 7.66 7.67 7.68 7.69 7.70 7.71 7.72 7.73
is_GetImageMem is_GetImageMemPitch is_GetNumberOfCameras is_GetOsVersion is_GetPixelClockRange is_GetSensorScalerInfo is_GetSensorInfo is_GetSupportedTestImages is_GetTestImageValueRange is_GetTimeout is_GetUsedBandwidth is_GetVsyncCount is_HasVideoStarted is_InitCamera is_InitEvent is_InquireImageMem is_IsVideoFinish is_LoadBadPixelCorrectionTable is_LoadImage is_LoadImageMem is_LoadParameters is_LockSeqBuf is_ReadEEPROM is_ReadI2C is_RenderBitmap is_ResetCaptureErrorInfo is_ResetToDefault is_SaveBadPixelCorrectionTable is_SaveImage
121 122 123 124 125 126 127 129 131 132 133 134 135 136 139 141 142 143 144 145 146 147 148 149 150 152 153 154 155
Content
7.74 7.75 7.76 7.77 7.78 7.79 7.80 7.81 7.82 7.83 7.84 7.85 7.86 7.87 7.88 7.89 7.90 7.91 7.92 7.93 7.94 7.95 7.96 7.97 7.98 7.99
is_SaveImageEx is_SaveImageMem is_SaveImageMemEx is_SaveParameters is_SetAllocatedImageMem is_SetAOI is_SetAutoCfgIpSetup is_SetAutoParameter is_SetBadPixelCorrection is_SetBadPixelCorrectionTable is_SetBinning is_SetBlCompensation is_SetCameraID is_SetCameraLUT is_SetColorConverter is_SetColorCorrection is_SetColorMode is_SetConvertParam is_SetDisplayMode is_SetDisplayPos is_SetEdgeEnhancement is_SetErrorReport is_SetExposureTime is_SetExternalTrigger is_SetFlashDelay is_SetFlashStrobe
156 158 159 161 162 164 166 168 174 175 177 179 181 182 185 187 189 191 193 195 196 197 198 200 202 204 206 208 209
Content
7.103 is_SetGlobalShutter 7.104 is_SetHardwareGain 7.105 is_SetHardwareGamma 7.106 is_SetHdrKneepoints 7.107 is_SetHWGainFactor 7.108 is_SetImageMem 7.109 is_SetImagePos 7.110 is_SetIO 7.111 is_SetIOMask 7.112 is_SetLED 7.113 is_SetOptimalCameraTiming 7.114 is_SetPacketFilter 7.115 is_SetPixelClock 7.116 is_SetPersistentIpCfg 7.117 is_SetRopEffect 7.118 is_SetSaturation 7.119 is_SetSensorScaler 7.120 is_SetSensorTestImage 7.121 is_SetStarterFirmware 7.122 is_SetSubSampling 7.123 is_SetTimeout 7.124 is_SetTriggerCounter 7.125 is_SetTriggerDelay 7.126 is_StopLiveVideo 7.127 is_UnlockSeqBuf 7.128 is_WaitEvent 7.129 is_WriteEEPROM 7.130 is_WriteI2C
210 211 213 214 216 218 219 222 223 225 226 228 229 231 233 234 235 237 238 240 242 243 244 245 246 247 248 249
250
7
Content
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 8.11 8.12 8.13 8.14 8.15 8.16 8.17 8.18 8.19
isavi_AddFrame isavi_CloseAVI isavi_DisableEvent isavi_EnableEvent isavi_ExitAVI isavi_ExitEvent isavi_GetAVIFileName isavi_GetAVISize isavi_GetnCompressedFrames isavi_GetnLostFrames isavi_InitAVI isavi_InitEvent isavi_OpenAVI isavi_ResetFrameCounters isavi_SetFrameRate isavi_SetImageQuality isavi_SetImageSize isavi_StartAVI isavi_StopAVI
251 252 253 254 255 256 257 258 259 260 261 262 264 265 266 267 268 270 271
9 Obsolete Functions
9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 9.9 is_DisableDDOverlay is_EnableDDOverlay is_GetDC is_GetDDOvlSurface is_HideDDOverlay is_LockDDMem is_LockDDOverlayMem is_PrepareStealVideo is_ReleaseDC
272
274 275 276 277 278 279 280 281 282
Content
9.10 9.11 9.12 9.13 9.14 9.15 9.16 9.17 9.18 9.19 9.20
is_SetBayerConversion is_SetDDUpdateTime is_SetHwnd is_SetImageAOI is_SetImageSize is_SetKeyColor is_ShowDDOverlay is_StealVideo is_UnlockDDMem is_UnlockDDOverlayMem is_UpdateDisplay
283 284 285 286 287 289 291 292 293 294 295
10 Appendix
10.1 10.2 10.3 10.4 10.5 10.6 Colour and Memory Formats uEye Parameter File (INI File) Complete List of All Return Values Linux Functions Compatibility with FALCON Functions History of API Functions
296
296 297 302 305 308 310
1
1.1
Introduction
Preface
IDS Imaging Development Systems GmbH has taken every possible care in drawing up this manual. We however assume no liability for the content, completeness or quality of the information contained therein. The content of this manual is regularly updated and adapted to reflect the current status of the software. We furthermore do not guarantee that this product will function without errors, even if the stated specifications are adhered to. Under no circumstances can we guarantee that a particular objective can be achieved with the purchase of this product. Insofar as permitted under statutory regulations, we assume no liability for direct damage, indirect damage or damages suffered by third parties resulting from the purchase of this product. In no event shall any liability exceed the purchase price of the product. We would like to remind you that the contents of this operating manual do not constitute part of any previous or existing agreement, commitment or legal relationship, or an alteration thereof. All obligations of IDS Imaging Development Systems GmbH result from the respective contract of sale, which also includes the complete and exclusively applicable warranty regulations. These contractual warranty regulations are neither extended nor limited by the information contained in this operating manual. Should you require further information on this device, or encounter specific problems that are not discussed in sufficient detail in the operating manual, please contact your specialised dealer or system installer. All rights reserved. This manual may not be reproduced, transmitted or translated to another language, either as a whole or in parts, without the prior written permission of IDS Imaging Development Systems GmbH. Status: July 2009
1.2
Copyright
IDS Imaging Development Systems GmbH. All rights reserved. IDS Imaging Development Systems GmbH herewith grants the purchaser the right to use the software.
1.3
Trademarks
IDS Imaging Development Systems and uEye are registered trademarks of IDS Imaging Development Systems GmbH. IBM PC is a registered trademark of International Business Machines Corporation. Microsoft and Windows are trademarks or registered trademarks of Microsoft Corporation. All other products or company names mentioned in this manual are used solely for purposes of identification or description and may be trademarks or registered trademarks of the respective owners.
10
1. 4 Introduction.Contacting us
1.4
Contacting us
Visit our web site http://www.ids-imaging.com where you will find all the latest drivers and information about our software and hardware products. The latest uEye driver is available on our website http:// www.ids-imaging.com. Please contact your local IDS distributors for first level support in your language. For a list of IDS distributors worldwide please go to our website and follow the Support link.
Address:
11
Welcome
Thank you for purchasing a uEye camera from IDS Imaging Development Systems GmbH. The uEye Software Development Kit (SDK) For your uEye camera, a comprehensive software package is available for download. In addition to the drivers, the uEye Software Development Kit (SDK) includes the uEye Camera Manager, the uEye Demo and the uEye API programming interface for creating your own uEye programs under Windows 2000, XP and Vista (32-bit) as well as Linux. Numerous demo applications make it easy for you to get started with uEye programming. Current Software The current version of the uEye SDK is available as a free download at http://www.ueyesetup.com. For information on how to install the software and connect the camera, please refer to the uEye User Manual. Enjoy your new uEye camera! Getting Started Please read the next few chapters. They will give you a quick overview of what is new in this software version and quickly get you started with uEye programming.
12
2.1
At a glance These boxes show the contents of very long chapters at a glance and provide links to the sub-sections.
This symbol indicates interactive graphics. When you click on an active area in a graphic, a chapter containing additional information on that area opens automatically Links to other chapters are underlined in the text.
13
2.2
The new API function replaces the exisiting DirectDraw functions entirely. With this function, you can display and Function Blocks: Image Display scale images with overlay data flicker free. In addition, bitmap images can be used as overlay. Query additional image information such as a timestamp of the image capture. Query duration of some uEye driver processes (e.g. camera firmware update). Image scaling in the UI-149x/549x series sensors. The automatic image controls have been extended: Configurable hysteresis control Internal image controls of UI-122x/522x sensor supported Firmware update on camera initialisation The GigE uEye SE camera firmware can be update during initialisation. is_InitCamera() (see also the Firmware and Camera Start-up chapter in the uEye User Manual) is_GetImageInfo() is_GetDuration() is_GetSensorScalerInfo() is_SetSensorScaler() is_SetAutoParameter() Function Blocks: Automatic Image Control
New information in the manual uEye Quick-Start This chapter explains in a nutshell how to write your own uEye application. Function Blocks This manual section was revised and now provides an overview of most uEye API functions sorted by tasks List of obsolete uEye API functions and recommended alternatives.
Function Blocks
Obsolete Functions
The functions is_SetWhiteBalance() and is_SetWhiteBalanceMultipliers() have been replaced entirely by is_SetAutoParameter() and are no longer supported by the uEye API.
14
3. Quick-Start.
Quick-Start
The uEye API offers you over 150 commands with which you can access all the parameters and functions of your uEye camera. As complicated as that may sound, it is really quite easy to get your first own uEye program up and running in a short time. Just follow the six main steps outlined in this quick start guide. Open (initialize) the camera Connect your uEye camera with the PC. If you are using a GigE uEye, open the uEye Camera Manager first and assign an IP address before connecting the camera. For detailed information on installing the camera and using the uEye Camera Manager, see the uEye User Manual. The is_InitCamera() function initializes the uEye camera. The camera is assigned a unique handle through which it is accessed in subsequent function calls.
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.
15
Adjust the frame rate, brightness and colors All function calls with which you can change camera settings start with is_Set. To change the frame rate, for example, you call is_SetFrameRate(). Image brightness is adjusted through the exposure time set with is_SetExposureTime(). You can also implement automatic control of image brightness and other parameters by using is_SetAutoParameter(). If you are using a color camera, you should activate color correction in order to achieve rich vibrant colors for on-screen display (is_SetColorCorrection()). To adapt a color camera to the ambient light conditions, it is essential to carry out white balancing. This is also done using the is_SetAutoParameter() function.
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(). You will find comprehensive lists of the API functions, sorted by task, in the Function Blocks chapter. The uEye SimpleLive and uEye SimpleAcquire C++ programming samples included in the SDK illustrate the steps described above.
16
4. Programming.
Programming Notes
Apart from camera-specific functions, the uEye SDK is almost identical with the SDK for the FALCON and EAGLE frame grabbers from IDS. The Compatibility with FALCON Functions chapter includes a list of functions from the FALCON SDK which are not supported by the uEye camera.
Notes on parameter validity Functions that refer to an initialized camera have the camera handle HIDS hCam as the first parameter. All parameters that are set using these functions remain valid for as long as the handle is valid, that is, until you close the corresponding camera or exit the program. The next time you open the camera, it is initialized with the defaults again. The uEye.h header file The uEye.h header file contains all the definitions and constants needed for the uEye API. You will find this file in the directory C:\Program Files\IDS\uEye\Develop\include after installation of the uEye drivers.
4.1
Programming in C / C++
For programming with the uEye API, we suggest that you use the C / C++ programming language. This programming language offers efficient access to all functions of the uEye API. Enabling access to image memory contents through pointers, C / C++ is especially suitable for image processing applications. Most of the uEye sample programs were created in Microsoft Visual Studio using the C++ programming language. Required Files In order to access the uEye API, make sure to include the following files in your project: Header file: uEye.h Lib file: uEye_api.lib Function library (DLL): uEye_Api.dll In order to access the uEye AVI functions, make sure to include the following files in your project: Header file: uEye_tools.h Lib file: uEye_tools.lib Function library (DLL): uEye_tools.dll In order to access the uEye DirectShow functions, make sure to include the following files in your project: Header file: uEyeCaptureInterface.h DirectShow interface: uEyecapture.ax
We suggest that you keep the function libraries (DLL, AX and OCX files) in the default directory. Under Windows, these files reside in C:\Windows\System32\ after the installation. Copying these files to other locations may result in version conflicts.
17
4.2
Programming in C#
We suggest to use the C# programming language for the creation of visualisation applications. While it is possible to access image memory contents, doing so is more tedious than in C/C++ due to the 'managed code'. To access image memory contents in C#, you can use 'unsafe code' or the 'Marshall class'. Some system-level functions, such as Windows event handling, can be integrated using the Windows API. The uEye SDK includes sample programs for programming with Microsoft Visual Studio in the C# programming language. Required Files In order to access the uEye API in C#, make sure to include the following files in your project: Header file: uEye.cs Function library (DLL): uEye_Api.dll In order to access the uEye AVI functions in C#, make sure to include the following files in your project: Header file: uEye_tools.cs Function library (DLL): uEye_tools.dll
We suggest that you keep the function libraries (DLL, AX and OCX files) in the default directory. Under Windows, these files reside in C:\Windows\System32\ after the installation. Copying these files to other locations may result in version conflicts.
4.3
To use functions of the uEye API in Visual Basic 6, you must replace the is_<function_name> prefix by the iss_<function_name> prefix. The function parameters and return values are identical.
In VB.Net, the VB6 header files cannot be used. Compared to VB6, fundamental modifications of variable types have been introduced for VB.Net. There is only limited access to structures. We suggest to use the uEye ActiveX component when programming in VB.Net.
Visual Basic 6 does not support the use of uEye API events. We recommend using a newer version of Visual Basic.
Required Files In order to access the uEye API in VB6, make sure to include the following files in your project: Header file: uEye.bas Function library (DLL): uEye_Api.dll
18
In order to access the uEye AVI functions in VB6, make sure to include the following files in your project: Header file: uEye_tools.bas Function library (DLL): uEye_tools.dll
We suggest that you keep the function libraries (DLL, AX and OCX files) in the default directory. Under Windows, these files reside in C:\Windows\System32\ after the installation. Copying these files to other locations may result in version conflicts.
4.4
Programming in Delphi
The uEye SDK does not provide direct integration of the uEye API for the Delphi programming language. In order to use the uEye API in Delphi, you need to create separate header files. We suggest to use the uEye ActiveX component (see also Programming with ActiveX) when programming in Delphi.
We suggest that you keep the function libraries (DLL, AX and OCX files) in the default directory. Under Windows, these files reside in C:\Windows\System32\ after the installation. Copying these files to other locations may result in version conflicts.
4.5
4.6
Thread Programming
In general, the uEye API is thread-safe. This means that the uEye API can be accessed by multiple threads simultaneously. Simultaneous attempts to call the same function are recognised and prevented by the driver.
We recommend that you call the following functions only from a single thread in order to avoid unpredictable behaviour of the application.
19
5
5.1
5.1.1
Function Blocks
Image Capture
Open and Close Camera
is_InitCamera() is_ExitCamera() is_SetCameraID() Hardware initialisation Closes the camera and releases the created image memory. Sets a new camera ID.
5.1.2
Image Capture
Freerun Mode In freerun mode, the camera sensor captures one image after another at the set frame rate. Exposure of the current image and readout/transfer of the previous image data are performed simultaneously. This allows the maximum camera frame rate to be achieved. The frame rate and the exposure time can be set separately. The captured images can be transferred one by one or continuously to the PC. If trigger mode is active, you need to disable it with is_SetExternalTrigger() before activating freerun mode. Single frame mode (snap mode) When is_FreezeVideo() is called, the next image exposed by the sensor is transferred. You cannot use the uEye flash outputs in this mode. Continuous mode (live mode) When is_CaptureVideo() is called, images are captured and transferred continuously. You can use the uEye flash outputs. Trigger Mode In trigger mode, the sensor is on standby and starts exposing on receipt of a trigger signal. A trigger event can be initiated by a software command (software trigger) or by an electrical signal via the cameras digital input (hardware trigger). For the specifications of the electrical trigger signals, see the Specifications: Electrical Specifications chapter in the uEye User Manual. The trigger mode is selected using is_SetExternalTrigger(). Software trigger mode When this mode is enabled, calling is_FreezeVideo() immediately triggers the capture of an image and then transfers the image to the PC. If is_CaptureVideo() is called, the triggering of image capture and the transfer of images are performed continuously. Hardware trigger mode When this mode is enabled, calling is_FreezeVideo() makes the camera ready for triggering just once. When the camera receives an electrical trigger signal, one image is captured and transferred. If you call is_CaptureVideo(), the camera is made ready for triggering continuously. An image is captured and transferred each time an electrical trigger signal is received; the camera is then ready for triggering again (recommended procedure). Freerun synchronisation In this mode, cameras running in freerun mode (live mode, see above) can be synchronized with an external trigger signal. The cameras still remain in freerun mode. The trigger signal stops and restarts the current image capture process. You can use this mode to synchronise multiple cameras that you are operating in the fast live mode. Not all camera models support this mode (see is_SetExternalTrigger()).
20
In trigger mode, the maximum frame rate is lower than in freerun mode because the sensors expose and transfer sequentially. The possible frame rate in trigger mode depends on the exposure time. Example: At the maximum exposure time, the frame rate is about half as high as in freerun mode; at the minimum exposure time, the frame rate is about the same.
is_SetExternalTrigger (OFF) (live mode) is_CaptureVideo() is_SetExternalTrigger Software (SOFTWARE) is_CaptureVideo() Continuous is_SetExternalTrigger Hardware (e.g. HI_LO) is_CaptureVideo() is_SetExternalTrigger Freerun sync. (e.g. HI_LO_SYNC) is_CaptureVideo()
Off
Freely selectable Depending on exposure time and trigger delay Depending on exposure time and trigger delay Freely selectable
is_SetExternalTrigger (OFF) (snap mode) is_FreezeVideo() is_SetExternalTrigger Single frame Software (SOFTWARE) is_FreezeVideo() is_SetExternalTrigger Hardware (e.g. HI_LO) is_FreezeVideo()
Off
Freely selectable Depending on exposure time and trigger delay Depending on exposure time and trigger delay
21
Timeout Values for Image Capture When you call is_FreezeVideo() or is_CaptureVideo(), the timeout value for the image capture is determined from the Wait parameter. If no image arrives within this timeout period, a timeout error message is issued. Under Windows, a dialogue box is displayed if you have enabled error reports (see is_SetErrorReport()). Information on the error cause can be queried using is_GetCaptureErrorInfo(). The following table shows the effect of the Wait parameter depending on the image capture mode:
Parameter Wait IS_DONT_WAIT IS_WAIT Image capture mode Function returns Timeout for 1st image Timeout for subsequent images1) API default or user-defined value3) API default or user-defined value3) API default or user-defined value3) Calculated internally by API 2) Calculated internally by API 2) Calculated internally by API 2)
Time t
Time t
Calculated internally by API 2) Calculated internally by API 2)
IS_DONT_WAIT Freerun/SW Immediately trigger IS_WAIT Freerun/SW When 1st image in trigger memory Freerun/SW When 1st image in trigger memory
Time t
Time t
1) 2)
Only with continuous image capture using is_CaptureVideo() The timeout is calculated from the exposure time setting, the image transfer time (depending on the pixel clock) and the optional trigger delay (see is_SetTriggerDelay()); it is at least 40 ms. The default value of the uEye API is 60 s. User-defined values can be set using the is_SetTimeout() function.
3)
Function List is_CaptureVideo() is_FreezeVideo() is_ForceTrigger() is_HasVideoStarted() is_IsVideoFinish() is_SetSensorTestImage() is_StopLiveVideo() Captures a live video. Captures an image and writes it to the active image memory. Simulates a trigger signal in hardware trigger mode. Returns whether the capture process has been started or not. Returns whether the capture process has been terminated or not. Enables test image output from sensor (all cameras). Terminates the capturing process (live video or single frame).
5.1.3
Image Pre-processing
Bayer Conversion is_ConvertImage() is_GetColorConverter() Converts a Bayer raw image into the desired output format Returns the currently set Bayer conversion mode
22
is_SetBayerConversion() is_SetColorConverter()
Sets the algorithm for Bayer conversion Sets the algorithm for Bayer conversion in the camera (GigE uEye HE cameras only)
Look-Up-Table (LUT) functions is_GetCameraLUT() is_SetCameraLUT() is_GetImageHistogram() Read out current hardware LUT Activate/deactivate hardware LUT Computes a histogram for the image buffer passed to the function
5.1.4
23
5.1.5
Events in Live Mode (3 Image Sequence) The following figure shows the time sequence when triggering the IS_FRAME and IS_SEQUENCE events. The camera is set to live mode using is_CaptureVideo() so that it continuously captures frames. The IS_FRAME event is set once pre-processing (e.g. colour conversion) is complete and a finished image is available in the user memory. The IS_SEQUENCE event is set after one cycle of a storing sequence has been completed (see also is_AddToSequence()).
Figure 2: Events in live mode *) Optional function. The start time and duration of the flash signal are defined by the Flash delay and Duration parameters (see is_SetFlashDelay()).
24
Function List is_DisableEvent() is_EnableEvent() is_EnableMessage() is_ExitEvent() is_InitEvent() is_EnableAutoExit() Disables a single event object. Enables a single event object. Turns the Windows messages on / off. Closes the event handler. Initialises the event handler. Automatically releases the camera resources when the camera is disconnected from the PC.
5.1.6
5.1.7
Capturing AVIs
Initialisation isavi_InitAVI() isavi_ExitAVI() AVI File Functions isavi_OpenAVI() isavi_CloseAVI() isavi_GetAVIFileName() isavi_StartAVI() isavi_StopAVI() isavi_AddFrame() Opens an AVI file for capturing. Closes an AVI file. Returns the name of the current AVI file. Starts image compression. Stops image compression. Adds a compressed image to the AVI file. Initialises the uEye AVI interface. Terminates and closes the uEye AVI interface.
25
Setting / Getting Global Parameters isavi_SetFrameRate() isavi_SetImageQuality() isavi_GetAVISize() isavi_SetImageSize() Sets the frame rate of the AVI video. Sets the compression level / image quality of the AVI video. Returns the size of the current AVI file. Sets the size and offset of the input image memory.
isavi_GetnCompressedFrames() Returns the number of frames in the current AVI file. isavi_GetnLostFrames() isavi_ResetFrameCounters() Event Handling isavi_DisableEvent() isavi_EnableEvent() isavi_ExitEvent() isavi_InitEvent() Disables a uEye AVI event. Enables a uEye AVI-Event. Turns off uEye AVI event handling. Turns on uEye AVI event handling. Returns the number of frames that have been discarded so far. Resets the counters for discarded and saved frames to 0.
5.2
5.2.1
Camera Control
Read out Camera Information
is_CameraStatus() is_GetAutoInfo() is_GetCameraList() is_GetCameraType() is_GetCaptureErrorInfo() is_GetDLLVersion() is_GetError() is_GetNumberOfCameras() is_GetOsVersion() is_GetUsedbandwidth() is_GetVsyncCount() is_SetErrorReport() Returns the event counters and other information. Enables standby mode. Returns status information on the auto features. Returns information on all connected cameras. Returns the camera type. Displays information on errors that have occurred. Returns the version of the ueye_api.dll. Displays errors that have occurred. Determines the number of cameras connected to the system. Returns the operating system version. Returns the bus bandwidth (in Mbit/s) currently used by all initialised or selected cameras. Returns the VSYNC counter. It will be incremented by 1 each time the sensor starts capturing an image. Enables / disables dialogue messages for error output.
5.2.2
26
Determines the desktop colour mode set in the graphics card. Returns the adjustable exposure range. Returns the current frame rate in live mode. Returns the adjustable frame rate range. Returns the adjustable pixel clock range. Returns the user-defined timeout values. Loads and applies the camera parameters. Resets the camera parameters to its default values. Saves the current camera parameters. Sets the size and position of an area of interest (AOI) or of a reference AOI for auto imaging functions. Enables / disables automatic imaging functions. Turns hot pixel correction on / off. Sets the binning modes. Turns black level correction on / off. Selects Bayer conversion mode. Sets colour correction. Selects a colour mode. Conversion parameters for raw Bayer conversion. Selection of the display mode. Sets edge enhancement. Sets the exposure time. Sets the frame rate. Sets additional sensor hardware gain boost. Sets the gamma value (digital post-processing). Enables / disables the Global Start shutter. Enables the sensor hardware gain. Sets the sensor gamma control. Sets the sensor hardware gain factor. Defines the position and size of an area of interest (AOI). Defines the position of an AOI. Defines the size of an AOI. Turns the camera LED on / off. Sets the pixel clock frequency. Makes real-time geometry changes to an image (Rop = raster operation) Sets the image saturation (digital post-processing). Enables test image output from sensor.
is_LoadBadPixelCorrectionTable() Loads a user-defined hot pixel list from a file. is_LoadParameters() is_ResetToDefault()
is_SaveBadPixelCorrectionTable() Saves the current, user-defined hot pixel list. is_SaveParameters() is_SetAOI() is_SetAutoParameter() is_SetBadPixelCorrection()
is_SetBadPixelCorrectionTable() Enables a user-defined hot pixel list. is_SetBinning() is_SetBlCompensation() is_SetColorConverter() is_SetColorCorrection() is_SetColorMode() is_SetConvertParam() is_SetDisplayMode() is_SetEdgeEnhancement() is_SetExposureTime() is_SetFrameRate() is_SetGainBoost() is_SetGamma() is_SetGlobalShutter() is_SetHardwareGain() is_SetHardwareGamma() is_SetHWGainFactor() is_SetImageAOI() is_SetImagePos() is_SetImageSize() is_SetLED() is_SetPixelClock() is_SetRopEffect() is_SetSaturation() is_SetSensorTestImage()
27
is_SetSubSampling() is_SetTimeout()
5.2.3
28
5. 2 Function Blocks.Camera Control speed (100%) causes a little attenuation for a fast-responding control and vice versa. The control functions for average brightness and for colour rendering use separate speeds. In trigger mode, every image is evaluated. Setting the speed control to 0 disables the adjustment functionality. In trigger mode, every frame is evaluated for automatic control. The freerun mode skips a number of frames by default because in that mode, changes to the image parameters only become effective after one or more image captures (see also the Applying New Parameters chapter in the uEye Programming Manual). With the Sk ip Frames parameter, you can select how many frames should be skipped in freerun mode (default: 4). This parameter strongly influences the control speed. Choosing small values can destabilize the automatic control. Hysteresis The automatic control feature uses a hysteresis function for stabilization. On reaching the setpoint, control is temporarily disabled. It is reactivated when the actual value drops below (setpoint hysteresis value) or exceeds (setpoint + hysteresis value). If the hysteresis value is increased, the achieved target value is maintained for a longer time in case of lighting changes. This makes the automatic control more sluggish, but can be useful in some situations.
5.2.4
Toggles the colour of the status LED for the USB uEye SE camera series.
Sets the trigger signal delay time.
5.2.5
I2C Functions
is_ReadI2C() is_WriteI2C() Reads data via the I2C bus. Writes data via the I2C bus.
5.2.6
29
5.2.7
Functions for Accessing the RS-232 Interface (only GigE uEye HE series) The GigE uEye HE has a serial interface which can be accessed from the PC through a virtual COM port (please also refer to the Serial Interface section in the Camera Basics chapter of the uEye User Manual). The Windows API provides all necessary functions for a COM port-based communication. The three Windows API commands listed in the table below are sufficient to perform a basic COM communication. You can use additional Windows API functions to further configure the COM port. The uEyeComportDemo.exe COM port demo program which is supplied in C++ source code with the uEye SDK shows how to use these functions. CreateFile() Windows API function. You can use this function to initialise the specified communication resource in this case, the virtual COM port. The function returns a handle for accessing the port. Windows API function. You can use this function to write data to the port identified by the handle returned by CreateFile(). Windows API function. You can use this function to read data from the port identified by the handle returned by CreateFile(). uEye SDK function. Retrieves the currently set COM port number of the camera.
WriteFile()
ReadFile()
is_GetComportNumber()
30
5.3
Image Display
The uEye driver provides different modes for displaying the captured images on Windows systems. We recommend using the Bitmap mode or the Direct3D functions, depending on your specific application. The desired mode can be set using the is_SetDisplayMode() function. The DirectDraw Back Buffer and DirectDraw Overlay Surface display modes are obsolete. Please use the Direct3D functions instead (see also Obsolete Functions).
1. Bitmap mode (Device Independent Bitmap, DIB) In Bitmap mode, images captured by the uEye are written to the random access memory of the PC. Programming the image display is up to the user. The application software uses the is_RenderBitmap() function to initiate the image display by the graphics card. This may result in a slightly higher CPU load as compared to the Direct3D display. The advantage of Bitmap mode is that it is compatible with all graphics cards and that image data in the memory is directly accessible. Programming of overlay functions is up to the user. Since the operating system controls the image display, the image may be completely or partly overlapped by other windows and dialog boxes.
2. Direct3D mode (only under Windows with DirectX) In this mode, the uEye driver writes the image data to the invisible area of the graphics card. This process runs automatically and does not have to be controlled by the application software. It requires an installed Direct3D driver, sufficient memory on the graphics card and Direct3D function support by the graphics card. For this purpose, graphics cards generally provide better performance than graphics chips integrated on the mainboard. In Direct3D mode, the CPU load may be lower than in Bitmap mode. You can display overlay data and also scale the video image. The Direct3D mode and the overlay functions can be configured using the is_DirectRenderer() API function.
31
Comparison of the display modes The following table illustrates the major differences between the display modes: Bitmap mode Graphics card requirements Operating system Programming effort Low. No special graphics hardware required. Runs on all systems. Windows, Linux Direct3D mode High. Graphics card has to support Direct3D. Does not run on all systems. Only Windows with DirectX
Greater. Memory management, event Low. Memory management, event handling and display performed by the handling and display performed by application. DirectX. Slightly increased by copying of data. Low. Display performed by graphics card. Not available. A simple overlay can be Integrated. Complex overlays can be programmed by the user. displayed without flicker. Direct access possible. Image data already provided in user memory. Possible using Steal Mode. Single images can be copied to the user memory.
Function List is_RenderBitmap() is_SetDisplayMode() is_SetDisplayPos() Outputs the contents of the active image memory to a window. Selection of the display mode. Enables offsetting the image output inside the window.
32
6. Flowcharts.
Flowcharts
This chapter features workflows for important camera functions. The charts are structured as follows:
Click the function blocks in the flowcharts to open the corresponding chapter of this manual.
33
6.1
Figure 6: Capturing a single frame using the uEye (continued on next page)
34
35
6.2
Allocating Memory
36
6. 2 Flowcharts.Allocating Memory
37
6.3
38
39
6.4
Displaying Images
40
6.5
41
42
43
6.6
44
45
6.7
46
47
6.8
Capturing AVIs
48
7. Description of Functions.
Description of Functions
To integrate the uEye cameras into your own programs, you can use the functions and parameters provided by the uEye SDK. These are described in this chapter. The descriptions are listed alphabetically by function and are structured as follows:
This table shows the availability of the function. For both Windows and Linux the table shows which uEye camera series supports the function. Syntax Prototype of the function from the ueye.h header file Description Description of the function with cross-references to related functions Input Parameters Description of the function parameters including their value ranges Return Value Description and value range of the return value. If a function returns the IS_NO_SUCCESS (-1) value, you can get information on the error from the is_GetError() function. Related Functions List with similar or related SDK functions Code Sample For some functions, C++ programming samples are have been added. Sample Programs Some descriptions include references to uEye SDK sample programs. When you install the uEye software, the demo applications are copied to the C:\Programs\IDS\uEye\Samples directory. The associated source code can be found under C:\Programs\IDS\uEye\Develop\Source. All sample programs are described in the uEye Samples Manual.
49
7.1
is_AddToSequence
INT is_AddToSequence (HIDS hCam, char* pcImgMem, INT nID) Description is_AddToSequence() adds an image memory to the list of image memories used for ring buffering. The image memory must have been previously requested using is_AllocImageMem(). Using the is_SetAllocatedImageMem() function, you can set a memory that has been allocated before as image memory. Image memories that are used for ring buffering must all have been allocated with the same colour depth (bits per pixel). Input Parameters hCam pcMem nID Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_SetImageMem() is_SetAllocatedImageMem() Sample Programs uEyeSequence (C++) Function executed successfully General error message Camera handle Pointer to image memory Image memory ID
50
7. 2 Description of Functions.is_AllocImageMem
7.2
is_AllocImageMem
INT is_AllocImageMem (HIDS hCam, INT width, INT height, INT bitspixel, char** ppcImgMem, INT* pid) Description is_AllocImageMem() allocates an image memory for an image having its dimensions defined by width and height and its colour depth defined by bitspixel. The memory size is at least: size = [width * ((bitspixel + 1) / 8) + adjust] * height (for details on adjust, see below) The line increment is calculated as: line = width * [(bitspixel + 1) lineinc adjust adjust = line + adjust. = 0, if line can be divided by 4 without remainder = 4 - rest(line / 4), if line cannot be divided by 4 without remainder
/ 8]
To read out the line increment, you can use the is_GetImgMemPitch() function. The starting address of the memory area is returned in ppcImgMem. pid returns an ID for the allocated memory. A newly allocated memory is not directly active, i.e. digitised images will not be stored immediately in this new memory. It must first be made active using is_SetImageMem(). The returned pointer must be write-protected and may not be altered because it will be used for all further ImageMem functions. To release the memory, you can use is_FreeImageMem().
In case the operating system is short of physical memory, today's OS versions swap individual areas of the RAM that have not been used for some time out to the slower hard disk. This can slow down image capture if more image memory has been allocated than can be provided by the RAM at a time.
51
Input Parameters hCam width height bitspixel Camera handle Image width Image height Image colour depth (bits per pixel). RGB16 and RGB15 require the same amount of memory, but can be distinguished by the bitspixel parameter. ppcImgMem pid Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_FreeImageMem() is_AddToSequence() is_SetImageMem() is_SetAllocatedImageMem() is_GetColorDepth() is_GetImgMemPitch() Sample Programs uEyeRotationDemo (C++) Function executed successfully General error message Returns the pointer to the memory starting address Returns the ID of this memory
52
7. 3 Description of Functions.is_CameraStatus
7.3
is_CameraStatus
ULONG is_CameraStatus (HIDS hCam, INT nInfo, ULONG ulValue) Description Using is_CameraStatus(), you can query and partly set various status information and settings. Input Parameters hCam nInfo IS_FIFO_OVR_CNT IS_SEQUENCE_CNT Number of FIFO overruns. Is increased if image data gets lost because the USB bus is congested. Returns the sequence count. For is_CaptureVideo(), this parameter is set to 0. Each time the sequence buffer (image counter) changes, the counter is increased by 1. Returns the number of sequence buffers. Returns the camera's internal count of external trigger events. Returns the number of unprocessed trigger signals. Is reset to 0 after each call. Returns the last image capture error, e.g. after a 'transfer failed' event. For a list of all possible error events, see is_GetCaptureErrorInfo(). Indicates whether parameter set 1 including camera settings is present on the camera (read-only). See also is_SaveParameters(). Return values: TRUE Parameter set 1 present FALSE Parameter set 1 not present IS_PARAMETER_SET_2 Indicates whether parameter set 2 including camera settings is present on the camera (read-only). See also is_SaveParameters(). Return values: TRUE Parameter set 2 present FALSE Parameter set 2 not present IS_STANDBY Sets the camera to standby mode. Return values: TRUE Camera changes to standby mode FALSE The camera changes to freerun mode IS_STANDBY_SUPPORTED Queries whether the camera supports standby mode (readCamera handle
IS_PARAMETER_SET_1
53
only). Return values: TRUE The camera supports standby mode FALSE The camera does not support standby mode ulValue IS_GET_STATUS Return Values IS_SUCCESS IS_NO_SUCCESS Returns the information specified by nInfo. When used with IS_LAST_CAPTURE_ERROR Function executed successfully General error message Only if ulValue = IS_GET_STATUS Returns the last image capture error. For a list of all possible error events, see is_GetCaptureErrorInfo(). Returns the information specified by nInfo.
54
7. 4 Description of Functions.is_CaptureVideo
7.4
is_CaptureVideo
INT is_CaptureVideo (HIDS hCam, INT Wait) Description is_CaptureVideo() digitises video images in real time and transfers the images to an allocated image memory or, if Direct3D is used, to the graphics card. The image data (DIB mode) is stored in the memory created using is_AllocImageMem() and designated as active image memory using is_SetImageMem(). Using is_GetImageMem(), you can query the memory address. If ring buffering is used, the image capturing function cycles through all image memories used for storing the images of a capture sequence in an endless loop. Sequence memories locked by is_LockSeqBuf() will be skipped. If the last available sequence memory has been filled, the sequence event or message will be triggered. Capturing always starts with the first element of the sequence. For further information on the image capture modes of the uEye camera, see the Function Blocks: Image Capture section. Input Parameters hCam Wait IS_DONT_WAIT IS_WAIT Time t IS_GET_LIVE Return Values IS_SUCCESS IS_NO_SUCCESS When used with IS_GET_LIVE Related Functions is_FreezeVideo() is_StopLiveVideo() is_SetExternalTrigger() is_ForceTrigger() is_SetTimeout() is_GetCaptureErrorInfo() Function executed successfully General error message TRUE if live capture is enabled Timeout value for image capture (see also the Function Blocks: Timeout Values for Image Capture section) Returns if live capture is enabled. Camera handle
55
Sample Programs SimpleLive (C++) uEyeC# Demo (C#) uEye VB Simple Demo (VB6)
56
7. 5 Description of Functions.is_ClearSequence
7.5
is_ClearSequence
INT is_ClearSequence (HIDS hCam) Description is_ClearSequence() removes all image memories from the sequence list that were added using is_AddToSequence(). After a call of is_ClearSequence(), there is no more active image memory. To make an image memory the active memory, call is_SetImageMem(). Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AddToSequence() is_FreeImageMem() is_SetImageMem() Function executed successfully General error message Camera handle
57
7.6
is_ConvertImage
INT is_ConvertImage(HIDS hCam, char* pcSource, INT nIDSource, char** ppcDest, INT* nIDDest, INT* reserved) Description is_ConvertImage() converts a raw Bayer image to the desired format. This conversion is done in the PC. You can use is_SetConvertParam() to define the conversion settings. Input Parameters hCam pcSource nIDSource ppcDest Camera handle Pointer to the input image Memory ID of the input image Pointer to the output image In case a NULL value is passed, a new memory is allocated internally. nIDDest reserved Memory ID of the output image Reserved. NULL must be passed here.
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetConvertParam() is_SetColorMode() is_SetBayerConversion() Function executed successfully General error message
58
7. 7 Description of Functions.is_CopyImageMem
7.7
is_CopyImageMem
INT is_CopyImageMem (HIDS hCam, char* pcSource, INT nID, char* pcDest) Description is_CopyImageMem() copies the contents of the image memory described by pcSource and nID to the memory area to whose starting address pcDest points.
The allocated memory must be large enough to accommodate the entire image in its current format (bits per pixel).
Input Parameters hCam pcSource nID pcDest Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_SetAllocatedImageMem() Function executed successfully General error message Camera handle Pointer to the image memory ID of this image memory Pointer to the destination memory to copy the image to
59
7.8
is_CopyImageMemLines
INT is_CopyImageMemLines (HIDS hCam, char* pcSource, INT nID, INT nLines, char* pcDest) Description is_CopyImageMemLines() copies the contents of the image memory described by pcSource and nID to the memory area to whose starting address pcDest points. The function only copies the number of lines indicated by nLines.
The allocated memory must be large enough to accommodate the entire image in its current format (bits per pixel).
Input Parameters hCam pcSource nID nLines pcDest Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_SetAllocatedImageMem() Function executed successfully General error message Camera handle Pointer to the image memory ID of this image memory Number of lines to be copied Pointer to the destination memory to copy the image to
60
7. 9 Description of Functions.is_DirectRenderer
7.9
is_DirectRenderer
INT is_DirectRenderer (HIDS hCam, UINT nMode, void* pParam, UINT nSize) Description is_DirectRenderer() provides a set of advanced rendering functions and allows inserting overlay data into the camera's live image without flicker. The graphics card functions of the Direct3D library are supported under Windows.
To use the Direct3D functionality, the appropriate version of the Microsoft DirectX Runtime has to be installed in your PC. When you are using high-resolution cameras, the maximum texture size supported by the graphics card should be at least 4096 x 4096 pixels. You can check the maximum texture size by reading out the D3D_GET_MAX_OVERLAY_SIZE parameter. The Direct3D mode automatically uses the Windows Desktop color depth setting for the display. Please also read the notes on graphics cards which are provided in the System Requirements chapter of the uEye User Manual.
Input Parameters hCam nMode DR_GET_OVERLAY_DC Returns the device context (DC) handle to the overlay area of the graphics card. More details: In Direct3D mode, the DR_GET_OVERLAY_DC mode returns the device context (DC) handle of the overlay area. Using this handle, it is possible to access the overlay using the Windows GDI functionality. Thus, all Windows graphics commands (e.g. Line, Circle, Rectangle, TextOut) are available. To transfer the drawn elements to the overlay, release the DC handle by calling DR_RELEASE_OVERLAY_DC. - Code sample DR_RELEASE_OVERLAY_DC Releases the device context (DC) handle. More details: Using DR_RELEASE_OVERLAY_DC, you can release the DC handle and update the overlay data. - Code sample DR_GET_MAX_OVERLAY_SIZE DR_SET_OVERLAY_SIZE DR_SET_OVERLAY_POSITION DR_GET_OVERLAY_KEY_COLOR Returns the width x and height y of the maximum overlay area supported by the graphics card. Code sample Defines the size of the overlay area (default: current camera image size). Code sample Defines the position of the overlay area. Code sample Returns the RGB values of the current key color (default: black). Code sample Camera handle
61
DR_SET_OVERLAY_KEY_COLOR
Defines the RGB values of the key color. More detailsThe key color specifies where the camera image will be visible in the overlay area. For example: if you fill the complete overlay with the key color, the whole camera image will be visible. If you fill part of the overlay with a different color, the camera image will be covered by the overlay in those places. The key color has no effect in semi-transparent mode! - Code sample Enables overlay display on top of the current camera image. Code sample Disables overlay display. Code sample Enables real-time scaling of the image to the size of the display window. Code sample Disables real-time scaling. Code sample
DR_ENABLE Enables a semi-transparent display of the overlay area. More _SEMI_TRANSPARENT_OVERLAY detailsIn semi-transparent mode, the values of the camera image and the overlay data are added up for each pixel. Since black has the value 0, the complete camera image will be visible if the overlay is black; if the overlay is white, only the overlay will be visible. With all other colors, the camera image will be visible with the overlay superimposed. The key color has no effect in semi-transparent mode! - Code sample DR_DISABLE Disables the semi-transparent display of the overlay area. _SEMI_TRANSPARENT_OVERLAY Code sample DR_SET_VSYNC_AUTO Enables synchronization of the image display with the monitor's image rendering. The image is displayed upon the monitor's next VSYNC signal. Code sample Disables image display synchronization. The image is displayed immediately. Code sample Enables synchronization of the image display with a monitor pixel row specified by the user. More details: When displaying very large camera images, the auto-VSYNC function might not always optimally synchronize image rendering. In this case, you can eliminate flicker by manually setting a suitable position for synchronization. The position needs to be determined individually, based on the camera type and the graphics card. - Code sample Returns the minimum and maximum row position for DR_SET_USER_SYNC. Code sample
DR_SET_VSYNC_OFF DR_SET_USER_SYNC
DR_GET_USER _SYNC_POSITION_RANGE
DR_LOAD_OVERLAY_FROM_FILE Loads a bitmap image (*.BMP file) into the overlay area. If the bitmap image is larger than the overlay area, the bitmap image is clipped. Code sample DR_CLEAR_OVERLAY DR_STEAL_NEXT_FRAME Deletes the data of the overlay area by filling it with black color. Code sample Copies the next image to the active user memory (Steal function). More details - Code sample
Using the pParam parameter, you specify when the function should ret
62
7. 9 Description of Functions.is_DirectRenderer
The function waits until the image save is complete. The function returns immediately.
Defines the color format for the Steal function. More details Code sample For a list of all available color formats, see the function description for is_SetColorMode(). The default is IS_CM_BGRA8_PACKED (RGB 32).
DR_GET_STEAL_FORMAT DR_SET_HWND DR_CHECK_COMPATIBILITY pParam nSize Return Values IS_SUCCESS IS_NO_SUCCESS When used with DR_CHECK_COMPATIBILITY
Returns the color format setting for the Steal function. Code sample Sets a new window handle for image output in Direct3D. Code sample Returns whether the graphics card supports the uEye Direct3D functions. Code sample void-type pointer to a data object or an array of objects (depending on the mode selected using nMode). Size (in bytes) of the data object or array.
Function executed successfully General error message IS_DR_DEVICE_CAPS_INSUFFICIENT The graphics hardware does not fully support the uEye Direct3D functions
Related Functions is_SetDisplayMode() is_SetColorMode() is_SetImageMem() is_RenderBitmap() Code Samples //-----------------------------------// DC-Handle //-----------------------------------// Get DC handle for Overlay HDC hDC; is_DirectRenderer (hCam, DR_GET_OVERLAY_DC, (void*)&hDC, sizeof (hDC)); // Release DC handle is_DirectRenderer (hCam, DR_RELEASE_OVERLAY_DC, NULL, NULL); //-----------------------------------// Size of overlay //------------------------------------
63
// Query maximum size of overlay area UINT OverlaySize[2]; is_DirectRenderer (hCam, DR_GET_MAX_OVERLAY_SIZE, (void*)OverlaySize, sizeof(OverlaySize)); INT nWidth = OverlaySize[0]; INT nHeight = OverlaySize[1]; // Set size of overlay area UINT Size[2]; Size[0] = 100; Size[1] = 120; is_DirectRenderer (hCam, DR_SET_OVERLAY_SIZE, (void*)Size, sizeof (Size)); // Set position of overlay area UINT Position[2]; Position[0] = 20; Position[1] = 0; is_DirectRenderer (hCam, DR_SET_OVERLAY_POSITION, void*)Position, sizeof (Position)); //-----------------------------------// Key color //-----------------------------------// Get current key color UINT OverlayKeyColor[3]; is_DirectRenderer (hCam, DR_GET_OVERLAY_KEY_COLOR, (void*)OverlayKeyColor, sizeof(OverlayKeyColor)); INT nRed = OverlayKeyColor[0]; INT nGreen = OverlayKeyColor[1]; INT nBlue = OverlayKeyColor[2]; // Set new key color OverlayKeyColor[0] = GetRValue(m_rgbKeyColor); OverlayKeyColor[1] = GetGValue(m_rgbKeyColor); OverlayKeyColor[2] = GetBValue(m_rgbKeyColor); is_DirectRenderer (hCam, DR_SET_OVERLAY_KEY_COLOR, (void*)OverlayKeyColor, sizeof(OverlayKeyColor)); //-----------------------------------// Display //-----------------------------------// Show overlay is_DirectRenderer (hCam, DR_SHOW_OVERLAY, NULL, NULL); // Hide overlay is_DirectRenderer (hCam, DR_HIDE_OVERLAY, NULL, NULL); //-----------------------------------// Scaling //------------------------------------
64
7. 9 Description of Functions.is_DirectRenderer
// Enable scaling is_DirectRenderer (hCam, DR_ENABLE_SCALING, NULL, NULL); // Disable scaling is_DirectRenderer (hCam, DR_DISABLE_SCALING, NULL, NULL); //-----------------------------------// Transparency //-----------------------------------// Enable semi-transparent overlay is_DirectRenderer (hCam, DR_ENABLE_SEMI_TRANSPARENT_OVERLAY, NULL, NULL); // Disable semi-transparent overlay is_DirectRenderer (hCam, DR_DISABLE_SEMI_TRANSPARENT_OVERLAY, NULL, NULL); //-----------------------------------// Synchronization //-----------------------------------// Enable auto-synchronization is_DirectRenderer (hCam, DR_SET_VSYNC_AUTO, NULL, NULL); // User defined synchronization: Query range and set position UINT UserSync[2]; is_DirectRenderer (hCam, DR_GET_USER_SYNC_POSITION_RANGE, (void*)UserSync, sizeof (UserSync)); INT Min = UserSync[0]; INT Max = UserSync[1]; INT SyncPosition = 400; is_DirectRenderer (hCam, DR_SET_USER_SYNC, void*)&SyncPosition, sizeof (SyncPosition)); // Disable synchronization is_DirectRenderer (hCam, DR_SET_VSYNC_OFF, NULL, NULL); //-----------------------------------// BMP file //-----------------------------------// Load overlay from BMP file is_DirectRenderer (hCam, DR_LOAD_OVERLAY_FROM_FILE, (void*)c:\test.bmp, NULL); //-----------------------------------// Delete overlay //-----------------------------------// Delete overlay area is_DirectRenderer (hCam, DR_CLEAR_OVERLAY, NULL, NULL); //-----------------------------------// Steal mode
65
Programming Manual uEye Software Development Kit V3.40 //-----------------------------------// Get and set color mode for image to be copied INT nColorMode; is_DirectRenderer (hCam, DR_GET_STEAL_FORMAT, (void*)&nColorMode, sizeof (nColorMode)); nColorMode = IS_CM_MONO8; is_DirectRenderer (hCam, DR_SET_STEAL_FORMAT, void*)&nColorMode, sizeof (nColorMode)); // Copy image with function returning immediately INT nwait = IS_DONT_WAIT; is_DirectRenderer(hCam, DR_STEAL_NEXT_FRAME, (void*)&wait, sizeof (wait)); //-----------------------------------// Handle to window //-----------------------------------// Set new window handle for image display is_DirectRenderer (hCam, DR_SET_HWND, (void*)&hWnd, sizeof (hWnd));
//-----------------------------------// Compatibility //-----------------------------------// Check graphics card compatibility INT nRet = is_DirectRenderer (hCam, DR_CHECK_COMPATIBILITY, NULL, NULL); if (nRet == IS_DR_DEVICE_CAPS_INSUFFICIENT ) // Graphics card does not support Direct3D Sample Programs uEyeDirectRenderer uEyeSteal
66
7. 10 Description of Functions.is_DisableEvent
7.10
is_DisableEvent
INT is_DisableEvent (HIDS hCam, INT which) Description Using is_DisableEvent(), you disable the event indicated here. The event (e.g. image capture completed) will usually still occur, but will no longer trigger an event signal. Disabled events are no longer signaled to the application. You can re-enable the desired event using is_EnableEvent(). See also is_InitEvent(). Input Parameters hCam which Camera handle ID of the event to be disabled. See also is_InitEvent().
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_EnableEvent() is_ExitEvent() is_InitEvent() Function executed successfully General error message
67
7.11
is_EnableAutoExit
INT is_EnableAutoExit (HIDS hCam, INT nMode) Description is_EnableAutoExit() enables automatic closing of the camera handle after a camera has been removed on-the-fly. Upon closing of the handle, the entire memory allocated by the driver will be released. Input Parameters hCam nMode IS_ENABLE_AUTO_EXIT IS_DISABLE_AUTO_EXIT IS_GET_AUTO_EXIT_ENABLED Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_AUTO_EXIT_ENABLED Related Functions is_ExitCamera() Function executed successfully General error message Enables automatic closing. Disables automatic closing. Returns the current setting. Camera handle
68
7. 12 Description of Functions.is_EnableEvent
7.12
is_EnableEvent
INT is_EnableEvent (HIDS hCam, INT which) Description Using is_EnableEvent(), you release an event object initialized with is_InitEvent().. Following the release, the event messages for the created event object are enabled. Input Parameters hCam which Camera handle ID of the event to be released. See also is_InitEvent().
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_InitEvent() is_ExitEvent() is_DisableEvent() is_WaitEvent() Sample Programs SimpleLive (C++) uEyeEvent (C++) Function executed successfully General error message
69
7.13
is_EnableHdr
INT is_EnableHdr (HIDS hCam, INT Enable) Description Some sensors support HDR (High Dynamic Range) mode. You can use the is_EnableHdr() function to enable / disable it. To set the knee points of the HDR curve, you can use the is_SetHdrKneepoints() function. For further information on HDR mode, please refer to the Properties section of the uEye Demo chapter in the uEye User Manual.
Input Parameters hCam Enable IS_ENABLE_HDR IS_DISABLE_HDR Return Values IS_SUCCESS Function executed successfully This value is also returned in case an unsupported sensor type and IS_DISABLE_HDR are used. General error message In case an unsupported sensor type and IS_ENABLE_HDR are used. Enables HDR mode. Disables HDR mode. Camera handle
IS_NO_SUCCESS IS_NOT_SUPPORTED
Related Functions is_GetHdrMode() is_SetHdrKneepoints() is_GetHdrKneepointInfo() is_GetHdrKneepoints() Sample Programs uEyeC# Hdr Demo (C#)
70
7. 14 Description of Functions.is_EnableMessage
7.14
is_EnableMessage
INT is_EnableMessage (HIDS hCam, INT which, HWND hWnd) Description Using is_EnableMessage(), you can enable Windows messages. If a particular event occurs, the messages are sent to the application. Each message is structured as follows: Message: wParam: lParam: IS_UEYE_MESSAGE Event (see table) uEye camera handle associated with the message
Input Parameters hCam which IS_FRAME IS_SEQUENCE IS_TRANSFER_FAILED IS_TRIGGER Camera handle ID of the message to be enabled/disabled A new image is available. The sequence is completed. An error occurred during the data transfer. An image which was captured following the arrival of a trigger has been transferred completely. This is the earliest possible moment for a new capturing process. The image must then be post-processed by the driver and is available after the IS_FRAME message has occurred. A camera initialised with is_InitCamera() was disconnected. A camera initialised with is_InitCamera() and disconnected afterwards was reconnected. A new camera was connected. A camera was removed. Automatic white balance control is completed (only if this control was started using the IS_SET_AUTO_WB_ONCE function).
IS_AUTOBRIGHTNESS_FINISHED Automatic brightness control is completed (only if this control was started using the IS_SET_AUTO_BRIGHTNESS_ONCE function). hWnd Application window for receiving the message NULL disables the message designated by the which parameter.
71
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_InitEvent() Function executed successfully General error message
72
7. 15 Description of Functions.is_ExitCamera
7.15
is_ExitCamera
INT is_ExitCamera (HIDS hCam) Description is_ExitCamera() disables the hCam camera handle and releases the data structures and memory areas taken up by the uEye camera. Image memory allocated using the is_AllocImageMem() function which has not been released yet is automatically released.
We recommend that you call the following functions only from a single thread in order to avoid unpredictable behaviour of the application.
Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_InitCamera() is_EnableAutoExit() Function executed successfully General error message Camera handle
73
7.16
is_ExitEvent
INT is_ExitEvent (HIDS hCam, INT which) Description is_ExitEvent() deletes an existing event object. After an event has been deleted, you can no longer enable it by calling the is_EnableEvent() function. Input Parameters hCam which Camera handle ID of the event to be deleted. See also is_InitEvent().
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_InitEvent() is_EnableEvent() is_WaitEvent() Example See also is_ForceTrigger() Function executed successfully General error message
74
7. 17 Description of Functions.is_ForceTrigger
7.17
is_ForceTrigger
INT is_ForceTrigger (HIDS hCam) Description You can use is_ForceTrigger() to force a software-controlled capture of an image while a capturing process triggered by hardware is in progress. This function can only be used if the triggered capturing process was started using the IS_DONE_WAIT parameter. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_FreezeVideo() is_CaptureVideo() is_SetExternalTrigger() Code Sample Enable trigger and wait 1 second for the external trigger. If no trigger signal has arrived, force an exception using is_ForceTrigger(). HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, ""); if ( hEvent != NULL ) { is_InitEvent(hCam, m_hEvent, IS_SET_EVENT_FRAME); is_EnableEvent(hCam, IS_SET_EVENT_FRAME); is_SetExternalTrigger(hCam, IS_SET_TRIGGER_HI_LO); is_FreezeVideo(hCam, IS_DONT_WAIT); if (WaitForSingleObject(m_hEvent, 1000) != WAIT_OBJECT_0) { // No trigger has been received, so force image capture is_ForceTrigger(hCam); } is_DisableEvent(hCam, IS_SET_EVENT_FRAME); is_ExitEvent(hCam, IS_SET_EVENT_FRAME); } Function executed successfully General error message Camera handle
75
7.18
is_FreeImageMem
INT is_FreeImageMem (HIDS hCam, char* pcImgMem, INT id) Description is_FreeImageMem() releases an image memory that was allocated using is_AllocImageMem() and removes it from the driver management.
If the memory was not allocated using an SDK function, you need to call is_FreeImageMem() as well. Otherwise, there may be errors when the driver keeps trying to access this memory. This does however not release the memory. So you need to make sure that the memory will be released again.
Input Parameters hCam pcImgMem id Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() Function executed successfully General error message Camera handle Points to the starting address of the memory (e.g. set in the is_AllocImageMem() function) ID of this memory
76
7. 19 Description of Functions.is_FreezeVideo
7.19
is_FreezeVideo
INT is_FreezeVideo (HIDS hCam, INT Wait) Description is_FreezeVideo() acquires a single image from the camera. In DIB mode, the image is stored in the active image memory. If ring buffering is used in DIB mode, the captured image is transferred to the next available image m emory of the sequence. Once the last available sequence memory has been filled, the sequence event or message will be triggered. In Direct3D mode, the is directly copied to the graphics card buffer and then displayed. Image capture will be started by a trigger if you previously enabled the trigger mode using is_SetExternalTrigger(). A hardware triggered image acquisition can be cancelled using is_StopLiveVideo() if exposure has not started yet. For further information on the image capture modes of the uEye camera, see the Function Blocks: Image Capture section. Input Parameters hCam Wait IS_DONT_WAIT IS_WAIT Time t Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_HasVideoStarted() is_IsVideoFinish() is_SetExternalTrigger() is_ForceTrigger() is_CaptureVideo() is_SetTimeout() is_GetCaptureErrorInfo() Function executed successfully General error message Timeout value for image capture (see also the Function Blocks: Timeout Values for Image Capture section) Camera handle
77
Example Enable trigger mode, set high-active flash mode and capture an image: is_SetExternalTrigger(hCam, IS_SET_TRIGGER_SOFTWARE); is_SetFlashStrobe(hCam, IS_SET_FLASH_HI_ACTIVE); is_FreezeVideo(hCam, IS_WAIT); Sample Programs SimpleAcquire (C++) uEyeC# Demo (C#) uEye VB Simple Demo (VB6)
78
7. 20 Description of Functions.is_GetActiveImageMem
7.20
is_GetActiveImageMem
INT is_GetActiveImageMem (HIDS hCam, char** ppcMem, INT* pnID) Description is_GetActiveImageMem() returns the pointer to the starting address and the ID number of the active image memory. If a Direct3D mode is active and image memory was nevertheless allocated, the pointer to the image memory and its ID will be returned. However, in Direct3D mode, the image will not be copied automatically to this image memory. Input Parameters hCam ppcMem pnID Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_GetImageMem() is_SetImageMem() is_SetAllocatedImageMem() Function executed successfully General error message Camera handle Returns the pointer to the starting address of the active image memory. Returns the ID of the active image memory.
79
7.21
is_GetActSeqBuf
INT is_GetActSeqBuf (HIDS hCam, INT* pnNum, char** ppcMem, char** ppcMemLast); Description Using is_GetActSeqBuf(), you can determine the image memory which is currently used for capturing an image (ppcMem) or the image memory that was last used for capturing an image( ppcMemLast). This function is only available if you have enabled ring buffering.
This number is not the ID of the image memory that was allocated using the is_AllocImageMem() function, but the running number from the order in which memory was allocated by the
is_AddToSequence() function.
Input Parameters hCam pnNum Camera handle Contains the number of the image memory currently used for image capturing. If image capturing is already in progress when is_GetActSeqBuf() is called, pnNum will return the value 0 until the sequence arrives at the first image memory again. ppcMem ppcMemLast Contains the starting address of the image memory currently used for image capturing. Contains the starting address of the image memory last used for image capturing.
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AddToSequence() is_GetImageMem() Function executed successfully General error message
80
7. 22 Description of Functions.is_GetAutoInfo
7.22
is_GetAutoInfo
INT is_GetAutoInfo (HIDS hCam, UEYE_AUTO_INFO* pInfo) Description Using the is_GetAutoInfo() function, you can query status information of the auto control features. This information is written to the UEYE_AUTO_INFO structure. For further information on automatic control, please refer to the Functions for Automatic Image Control chapter.
The status information returned in the UEYE_AUTO_INFO structure is only valid if at least one of the auto control features has been enabled using is_SetAutoParameter().
Input Parameters hCam pinfo Camera handle UEYE_AUTO_INFO structure (see below)
Contents of the UEYE_AUTO_INFO Structure INT AutoAbility AC_SHUTTER Supported auto control features Auto Shutter available
AC_SENSOR_SHUTTE Sensor based Auto Shutter available R AC_FRAMERATE Auto Frame Rate available
AC_SENSOR_FRAMER Sensor based Auto Frame Rate available ATE AC_GAIN AC_SENSOR_GAIN AC_WHITEBAL AUTO_BRIGHT_STATUS AUTO_WB_STATUS DWORD sBrightCtrlStatus sWBCtrlStatus reserved Auto Gain available Sensor based Auto Gain available Auto White Balance available See AUTO_BRIGHT_STATUS See AUTO_WB_STATUS Reserved space for extensions
81
Contents of the UEYE_AUTO_INFO::AUTO_BRIGHT_STATUS Structure INT INT INT curValue curError curController AC_SHUTTER AC_GAIN INT curCtrlStatus ACS_ADJUSTING ACS_FINISHED ACS_DISABLED Current average greyscale value (actual value) Current control deviation (error) Current parameter value Exposure time (shutter) Gain Current control status Control is active. Control is completed. Control is disabled.
Contents of the UEYE_AUTO_INFO::AUTO_WB_STATUS Structure INT curController Current white balance control
AC_WB_RED_CHANN Value of the red channel EL AC_WB_GREEN_CHA Value of the green channel NNEL AC_WB_BLUE_CHAN Value of the blue channel NEL AUTO_WB_CHANNEL_STATUS RedChannel AUTO_WB_CHANNEL_STATUS GreenChannel AUTO_WB_CHANNEL_STATUS BlueChannel See AUTO_WB_CHANNEL_STATUS See AUTO_WB_CHANNEL_STATUS See AUTO_WB_CHANNEL_STATUS
Contents of the UEYE_AUTO_INFO::AUTO_WB_STATUS:: AUTO_WB_CHANNEL_STATUS Structure INT INT INT curValue curError curCtrlStatus ACS_ADJUSTING ACS_FINISHED ACS_DISABLED Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetAutoParameter() Function executed successfully General error message Current average greyscale value (actual value) Current control deviation (error) Current control status Control is active. Control is completed. Control is disabled.
82
7. 23 Description of Functions.is_GetBusSpeed
7.23
is_GetBusSpeed
INT is_GetBusSpeed (HIDS hCam) Description Using is_GetBusSpeed(), you can query whether a camera is connected to a USB 2.0 host controller. When the value 0 is passed for hCam, the function checks whether a USB 2.0 controller is present in the system. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Only if hCam=0 is passed: No USB 2.0 controller present IS_USB_10 IS_USB_20 The controller to which the camera is connected does not support USB 2.0. The camera is connected to a USB 2.0 controller. Camera handle
83
7.24
is_GetCameraInfo
INT is_GetCameraInfo (HIDS hCam, CAMINFO* pInfo) Description is_GetCameraInfo() reads out the data hard-coded in the EEPROM and writes it to the data structure that pInfo points to. The information from this data structure should not be used to find a specific camera (e.g. in order to control this specific camera). Instead, we recommend identifying a camera by a fixed camera ID or by the sensor ID (see is_GetCameraList()).
Contents of the CAMINFO Structure char char SerNo[12] ID[20] Serial number of the camera Manufacturer of the camera e.g. "IDS GmbH" char Version[10] For USB cameras, this value indicates the USB board hardware version. e.g. "V2.10" char Date[12] System date of the final quality check e.g. "01.08.2008" (DD.MM.YYYY) unsigned char Select unsigned char Type Camera ID Camera type IS_CAMERA_TYPE_UEYE_USB_SE IS_CAMERA_TYPE_UEYE_USB_ME IS_CAMERA_TYPE_UEYE_USB_RE IS_CAMERA_TYPE_UEYE_USB_LE IS_CAMERA_TYPE_UEYE_ETH_HE IS_CAMERA_TYPE_UEYE_ETH_SE Reserved USB uEye SE USB uEye ME USB uEye RE USB uEye LE GigE uEye HE GigE uEye SE
char
Reserved[8]
Input Parameters hCam pInfo Camera handle Pointer to a CAMINFO data structure
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
84
7. 24 Description of Functions.is_GetCameraInfo
85
7.25
is_GetCameraList
INT is_GetCameraList (UEYE_CAMERA_LIST* pucl) Description Using is_GetCameraList(), you can query information about the connected cameras. To get all information that is available, you need to adjust the field size to the number of connected cameras. The following tables explain the structures used for that purpose. Input Parameters pucl Handle to the UEYE_CAMERA_LIST structure
Contents of the UEYE_CAMERA_LIST Structure ULONG UEYE_CAMERA_INFO dwCount uci[1] Number of cameras connected to the system Placeholder for 1 .. n UEYE_CAMERA_INFO structures
Contents of the UEYE_CAMERA_LIST::UEYE_CAMERA_INFO Structure DWORD DWORD DWORD DWORD dwCameraID dwDeviceID dwSensorID dwInUse Customisable camera ID Internal device ID Sensor ID 1 = camera is being used. 0 = camera is not being used. Char Char DWORD SerNo[16] Model[16] Serial number of the camera *) Camera model *)
*) The information from this data structure should not be used to find a specific camera (e.g. in order to control this specific camera). Instead, we recommend identifying a camera by a fixed camera ID or by the sensor ID.
86
7. 25 Description of Functions.is_GetCameraList
Return Values IS_SUCCESS IS_NO_SUCCESS IS_ACCESS_VIOLATION IS_CANT_OPEN_DEVICE IS_IO_REQUEST_FAILED Related Functions is_GetNumberOfCameras() Code Sample // At least one camera must be available INT nNumCam; if( is_GetNumberOfCameras( &nNumCam ) == IS_SUCCESS) { if( nNumCam >= 1 ) { // Create new list with suitable size UEYE_CAMERA_LIST* pucl; pucl = (UEYE_CAMERA_LIST*) new char [sizeof (DWORD) + nNumCam * sizeof (UEYE_CAMERA_INFO)]; pucl->dwCount = nNumCam; //Retrieve camera info if (is_GetCameraList(pucl) == IS_SUCCESS) { int iCamera; for (iCamera = 0; iCamera < (int)pucl->dwCount; iCamera+ +) { //Test output of camera info on the screen printf("Camera %i Id: %d", iCamera, pucl->uci[iCamera].dwCameraID); } } } } Function executed successfully General error message Not enough memory allocated for the UEYE_CAMERA_LIST structure Camera cannot be selected or initialised. Driver communication failed.
87
7.26
is_GetCameraLUT
GigE
GigE
Syntax INT is_GetCameraLUT (HIDS hCam, UINT Mode, UINT NumberOfEntries, double* pRed_Grey, double* pGreen, double* pBlue) Description is_GetCameraLUT() returns the current LUT values. Using the is_SetCameraLUT() function, you can select a different LUT for the camera.
The is_GetCameraLUT() function is only supported by cameras of the GigE uEye series.
Input Parameters hCam Mode IS_GET_CAMERA_LUT_USER Returns the LUT values set by the user without modifications. Camera handle
IS_GET_CAMERA_LUT_COMPLETE Returns the LUT values set by the user after the gamma, contrast and brightness values have been taken into account. NumberOfEntries IS_CAMERA_LUT_64 pRed_Grey Number of the LUT values LUT with 64 values Pointer to the array to which the red channel values or the greyscale value (GigE uEye SE cameras) of the LUT are written. Pointer to the array to which the green channel values of the LUT are written. Pointer to the array to which the blue channel values of the LUT are written.
pGreen pBlue
Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Related Functions is_SetCameraLUT() Function executed successfully General error message This function is not supported by the current camera.
88
7. 27 Description of Functions.is_GetCameraType
7.27
is_GetCameraType
INT is_GetCameraType (HIDS hCam) Description is_GetCameraType() returns the camera type. Input Parameters hCam Return Values IS_CAMERA_TYPE_UEYE_USB_SE IS_CAMERA_TYPE_UEYE_USB_ME IS_CAMERA_TYPE_UEYE_USB_RE IS_CAMERA_TYPE_UEYE_USB_LE IS_CAMERA_TYPE_UEYE_ETH_HE IS_CAMERA_TYPE_UEYE_ETH_SE Related Functions is_GetCameraInfo() USB uEye SE camera USB uEye ME camera USB uEye RE camera USB uEye LE camera GigE uEye HE camera GigE uEye SE camera Camera handle
89
7.28
is_GetCaptureErrorInfo
INT is_GetCaptureErrorInfo (HIDS hCam, UEYE_CAPTURE_ERROR_INFO* CaptureErrorInfo, UINT SizeCaptureErrorInfo) Description is_GetCaptureErrorInfo() returns detail information on errors that occurred during an image capture process. The function lists all errors that occurred since the last call of the is_ResetCaptureErrorInfo() function. Input Parameters hCam CaptureErrorInfo Camera handle Structure of the UEYE_CAPTURE_ERROR_INFO type that is filled by the uEye driver. This structure then contains the error list. Indicates the size of the CaptureErrorInfo structure.
SizeCaptureErrorInfo
Contents of the UEYE_CAPTURE_ERROR_INFO Structure DWORD BYTE DWORD dwCapErrCnt_Total reserved[60] adwCapErrCnt _Detail[CapErr] Returns the total number of errors occurred since the last reset. Reserved for an internal function This array returns the current count for each possible error. The possible errors are listed below. To query the counter of a specific error type, pass its definition in the CapErr parameter.
90
7. 28 Description of Functions.is_GetCaptureErrorInfo
The maximum allowable time for image capturing in the camera was exceeded. The sensor transfers more data than the internal camera memory of the GigE uEye can accommodate. The GigE uEye camera could neither process nor output an image captured by the sensor.
7 8 9
# 1
Possible cause
Remedy
Not enough destination memory allocated Release locked destination memory or all destination buffers locked by the Allocate more destination memory application Reduce the frame rate so that there is more time to process the filled destination memory
2 3
The computer takes too long to process the images in the uEye API (e.g. colour conversion)
Reduce the frame rate so that there is more time to process the filled image memory of the driver Disable resource-intensive API image pre-processing functions (e.g. edge enhancement, colour correction, choose smaller filter mask for software colour conversion) Reduce the pixel clock frequency Operate fewer cameras simultaneously on a USB bus Check the quality of the USB cabling and components
5 6
The camera has been disconnected or closed Not enough free bandwidth on the USB bus for transferring the image
The selected data rate of the sensor is too Reduce the pixel clock frequency high Reduce the frame rate Reduce the image size The camera's frame rate is too high or the Reduce the frame rate bandwidth on the network is insufficient to Increase the value for the receive descriptors in the transfer the image network card settings
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
91
92
7. 29 Description of Functions.is_GetColorConverter
7.29
is_GetColorConverter
INT is_GetColorConverter (HIDS hCam, INT ColorMode, INT* pCurrentConvertMode, INT* pDefaultConvertMode, INT* pSupportedConvertModes) Description For colour cameras, is_GetColorConverter returns the set mode or all available Bayer conversion modes for the specified colour mode. The return value depends on the selected colour mode. For further information, please refer to the Appendix: Colour and Memory Formats section. Input Parameters hCam ColorMode Camera handle Colour mode for which the converter is to be returned For a list of all available colour formats and the associated input parameters, see the Appendix: Colour and Memory Formats section. pCurrentConvertMode pDefaultConvertMode pSupportedConvertModes Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_COLOR_FORMAT Function executed successfully General error message The ColorMode parameter is invalid or not supported. Currently selected converter for this colour mode Default converter for this colour mode All converters supported for this colour mode
93
7.30
is_GetColorDepth
INT is_GetColorDepth(HIDS hCam, INT* pnCol, INT* pnColMode) Description is_GetColorDepth() retrieves the current Windows Desktop colour setting and returns the bit depth per pixel and the matching uEye colour mode. The colour mode can be passed directly to the is_SetColorMode() function. You need to pass the bit depth when allocating an image memory. Input Parameters hCam PnCol pnColMode Camera handle Returns the bit depth of the colour setting. Returns the uEye colour mode that corresponds to pnCol. For a list of all available colour formats and the associated input parameters, see the Appendix: Colour and Memory Formats section. Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetColorMode() is_AllocImageMem() Function executed successfully General error message
94
7. 31 Description of Functions.is_GetComportNumber
7.31
is_GetComportNumber
GigE
GigE
Syntax INT is_GetComportNumber(HIDS hCam, UINT* pComportNumber) Description is_GetComportNumber() returns the current COM port number of a GigE uEye HE camera. The default port number is 100. You can change the port number in the Camera Manager. For further information, please refer to the Camera Basics: Serial Interface (RS-232) chapter of the uEye User Manual.
The is_GetComportNumber() function is only supported by cameras of the GigE uEye HE series.
Input Parameters hCam pComportNumber Camera handle Pointer to the variable that is supposed to contain the port number
Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Function executed successfully General error message This function is not supported by the camera
95
7.32
is_GetDLLVersion
Returns the version of the ueye_api.dll. Input Parameters <none> Return Values The return value contains the version number which is coded as follows: Bits 31-24: Bits 16-23: Bits 15-0: Related Functions is_GetOsVersion() Major version Minor version Build version
96
7. 33 Description of Functions.is_GetError
7.33
is_GetError
ppcErr)
is_GetError() queries the last error that occurred and returns the associated error code and message. We recommend to use this function after an error has occurred that returned IS_NO_SUCCESS. Each error message will be overwritten when a new error occurs. Input Parameters hCam PErr PpcErr Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetCaptureErrorInfo() is_SetErrorReport() is_CameraStatus() Function executed successfully General error message Camera handle Pointer to the variable containing the error code Pointer to the string containing the error text
97
7.34
is_GetDuration
GigE
GigE
Syntax INT is_GetDuration (HIDS hCam, UINT nMode, INT* pnTime) Description Using is_GetDuration(), you can read out the estimated time it will take the uEye driver to execute specific processes (e.g. update the camera firmware). Input Parameters hCam nMode IS_SE_STARTER_FW_UPLOAD pnTime Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_InitCamera() Is_SetStarterFirmware() Function executed successfully General error message Estimated time for uploading the starter firmware to a GigE uEye SE camera Returns the estimated time in ms Camera handle
98
7. 35 Description of Functions.is_GetEthDeviceInfo
7.35
is_GetEthDeviceInfo
GigE
GigE
Description Using is_GetEthDeviceInfo, you can query information about the connected Gigabit Ethernet uEye cameras. The resulting information is written to the UEYE_ETH_DEVICE_INFO structure. For this purpose, the cameras need not be initialised.
The is_GetEthDeviceInfo() function is only supported by cameras of the Gigab it Ethernet uEye series.
Input Parameters hDev DevID | IS_USE_DEVICE_ID, DevID = internal device ID of the camera from the UEYE_CAMERA_INFO structure (see also is_GetCameraList()) Pointer to a UEYE_ETH_DEVICE_INFO object Size of the UEYE_ETH_DEVICE_INFO structure in bytes
pDeviceInfo uStructSize
99
The is_GetEthDeviceInfo() function does not accept a camera handle as the hDev parameter. As stated above, the internal device ID must be used for the call. The advantage is that you can also query information related to Gigabit Ethernet uEye cameras that are currently not initialised. This information can also be queried using the uEye Camera Manager.
Contents of the UEYE_ETH_DEVICE_INFO Structure UEYE_ETH_DEVICE_INFO _HEARTBEAT infoDevHeartbeat Camera-related data retrieved from the camera (from the heartbeat telegram) See below: DEVICE_INFO_HEARTBEAT UEYE_ETH_DEVICE_INFO _CONTROL UEYE_ETH_ADAPTER_INFO infoDevControl Camera-related driver data See below: DEVICE_INFO_CONTROL infoAdapter Network-card related driver data See below: ADAPTER_INFO UEYE_ETH_DRIVER_INFO infoDriver General driver data See below: DRIVER_INFO Contents of the UEYE_ETH_DEVICE_INFO::UEYE_ETH_DEVICE_INFO_HEARTBEAT Structure BYTE BYTE BYTE WORD WORD BYTE DWORD DWORD DWORD BYTE WORD bySerialNumber[12] byDeviceType byCameraID wSensorID wSizeImgMem_MB reserved_1[2] dwVerStarterFirmware dwVerRuntimeFirmware dwStatus reserved_2[4] wTemperature Serial number (string) Type of camera series (0x80 for Gigabit Ethernet uEye) User-defined camera ID Sensor ID Image memory size in MB reserved Starter firmware version Runtime firmware version Status word reserved Camera temperature in degrees Celsius Bits 15...11: Algebraic sign Bits 10...4: Temperature (places before the decimal point) Bits 3...0: Temperature (places after the decimal point) WORD UEYE_ETH_ADDR_MAC BYTE UEYE_ETH _IP_CONFIGURATION UEYE_ETH _IP_CONFIGURATION UEYE_ETH_ADDR_MAC wLinkSpeed_Mb macDevice reserved_3[2] ipcfgPersistentIpCfg ipcfgCurrentIpCfg macPairedHost Link bandwidth in Mbits/s MAC address of the camera reserved Persistent IP configuration Current IP configuration MAC address of the connected PC, if any
100
7. 35 Description of Functions.is_GetEthDeviceInfo
reserved_4[2] ipPairedHostIp
ipAutoCfgIpRangeBegin First IP address of the auto configuration range ipAutoCfgIpRangeEnd abyUserSpace[8] reserved_5[84] reserved_6[64] Last IP address of the auto configuration range The first eight bytes of the user EEPROM reserved reserved
101
102
7. 35 Description of Functions.is_GetEthDeviceInfo
Camera is ready to operate Camera is testing current IP address Camera is testing persistent IP address Camera is testing auto config IP range
Current IP address already assigned on the network Persistent IP address already assigned on the network IP addresses of auto config IP range already assigned on the network
Camera has not been initialised (paired) Camera is being initialised (paired) Camera has been initialised (paired)
IS_ETH_DEVSTATUS_FORCE_100MBPS IS_ETH_DEVSTATUS_NO_COMPORT
Camera configured for 100 Mbits/s Camera supports no uEye COM port
Camera is receiving starter firmware Camera is receiving runtime firmware Runtime firmware cannot be used Starter firmware cannot be used
Camera is rebooting runtime firmware Camera is rebooting starter firmware Camera is rebooting failsafe firmware
IS_ETH_DEVSTATUS_RUNTIME_FW_ERR0
103
Contents of the UEYE_ETH_DEVICE_INFO::UEYE_ETH_DEVICE_INFO_CONTROL Structure DWORD DWORD BYTE BYTE dwDeviceID dwControlStatus reserved_1[80] reserved_2[64] Internal device ID of the camera Status word for driver-based camera management (see below) reserved reserved
Status Flags in UEYE_ETH_DEVICE_INFO::UEYE_ETH_DEVICE_INFO_CONTROL:: dwControlStatus IS_ETH_CTRLSTATUS_AVAILABLE IS_ETH_CTRLSTATUS_ACCESSIBLE1 The camera is available Camera has valid IP address and can be accessed over the network Camera has no persistent IP address; the auto IP range is valid Camera can be accessed over the network by its persistent IP address Camera is compatible with the installed driver DHCP is enabled on the PC network card Camera is being closed on this PC Camera is being initialised on this PC Camera has been initialised on this PC Starter firmware is being loaded onto the camera Runtime firmware is being loaded onto the camera Camera is rebooting Camera has been initialised in the driver Camera is being removed from driver management Camera is being removed from driver management
IS_ETH_CTRLSTATUS_ACCESSIBLE2
IS_ETH_CTRLSTATUS_PERSISTENT_IP_USED
IS_ETH_CTRLSTATUS_COMPATIBLE IS_ETH_CTRLSTATUS_ADAPTER_ON_DHCP IS_ETH_CTRLSTATUS_UNPAIRING_IN_PROGRESS IS_ETH_CTRLSTATUS_PAIRING_IN_PROGRESS IS_ETH_CTRLSTATUS_PAIRED IS_ETH_CTRLSTATUS_FW_UPLOAD_STARTER IS_ETH_CTRLSTATUS_FW_UPLOAD_RUNTIME IS_ETH_CTRLSTATUS_REBOOTING IS_ETH_CTRLSTATUS_INITIALIZED IS_ETH_CTRLSTATUS_TO_BE_DELETED IS_ETH_CTRLSTATUS_TO_BE_REMOVED
104
7. 35 Description of Functions.is_GetEthDeviceInfo
Contents of the UEYE_ETH_DEVICE_INFO::Structure DWORD DWORD dwAdapterID dwDeviceLinkspeed Network adapter ID as defined internally in the driver
Possible values:
UEYE_ETH_ETHERNET _CONFIGURATION BYTE BOOL UEYE_ETH_AUTOCFG _IP_SETUP BOOL DWORD DWORD WORD BYTE BYTE
Ethernet configuration of the network adapter reserved The adapter is configured for DHCP Setting of the IP address auto configuration
bIsValidAutoCfgIpRange The IP auto configuration setting is valid dwCntDevicesKnown dwCntDevicesPaired wPacketFilter reserved_3[38] reserved_4[64] Number of cameras detected at this network adapter Number of cameras initialised using this network adapter Filter settings for incoming packets (see below) reserved reserved
Value Range of UEYE_ETH_DEVICE_INFO::UEYE_ETH_ADAPTER_INFO::wPacketFilter IS_ETH_PCKTFLT_PASSALL Forward all packets to the operating system.
IS_ETH_PCKTFLT_BLOCKUEGET Block Gigabit Ethernet uEye data packets directed to the operating system (recommended). IS_ETH_PCKTFLT_BLOCKALL Block all packets directed to the operating system.
Contents of the UEYE_ETH_DEVICE_INFO::UEYE_ETH_DRIVER_INFO Structure DWORD DWORD BYTE BYTE dwMinVerStarterFirmware dwMaxVerStarterFirmware reserved_1[8] reserved_2[64] Minimum compatible starter firmware version Maximum compatible starter firmware version reserved reserved
105
Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_BAD_STRUCTURE_SIZE IS_NOT_SUPPORTED IS_CANT_OPEN_DEVICE IS_IO_REQUEST_FAILED Related Functions is_GetCameraList() Code Sample //Create the structure UEYE_ETH_DEVICE_INFO di; //Create specific camera handle from the internal device ID, see info in the box above HIDS hDev = (HIDS)(dwDeviceID | IS_USE_DEVICE_ID); //Populate the structure with Gigabit Ethernet uEye information INT nRet = is_GetEthDeviceInfo( hDev, &di, sizeof(UEYE_ETH_DEVICE_INFO)); Data was read without errors. The pDeviceInfo parameter is invalid. The structure size you specified is invalid. hCam was not designated as a device ID or the device ID specified is not supported by the Gigabit Ethernet uEye. Driver could not be found. Driver communication failed.
106
7. 36 Description of Functions.is_GetExposureRange
7.36
is_GetExposureRange
INT is_GetExposureRange (HIDS hCam, double* min,double* max, double* intervall) Description Using is_GetExposureRange(), you can query the exposure values (in milliseconds) available for the currently selected timing (pixel clock, frame rate). The available time values are comprised between min and max and can be set in increments defined by the intervall parameter. Input Parameters hCam min max intervall Camera handle Returns the minimum available exposure time. Returns the maximum available exposure time. Returns the increment you can use to change the image exposure time.
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetExposureTime() is_SetExposureTime() is_GetPixelClockRange() is_GetFrameTimeRange() is_GetFramesPerSecond() is_SetFrameRate() Function executed successfully General error message
107
7.37
is_GetFramesPerSecond
INT is_GetFramesPerSecond (HIDS hCam, double* dblFPS) Description In live capture mode started by is_CaptureVideo(), the is_GetFramesPerSecond() function returns the number of frames actually captured per second. Input Parameters hCam dblFPS Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetFrameTimeRange() is_SetFrameRate() is_GetPixelClockRange() is_GetExposureRange() is_GetExposureTime() Function executed successfully General error message Camera handle Returns the current frame rate.
108
7. 38 Description of Functions.is_GetFrameTimeRange
7.38
is_GetFrameTimeRange
INT is_GetFrameTimeRange (HIDS hCam, double* min, double* max, double* intervall) Description Using is_GetFrameTimeRange(), you can read out the frame rate settings which are available for the current pixel clock setting. The returned values indicate the minimum and maximum frame duration in seconds. You can set the frame duration between min and max in increments defined by the intervall parameter. The following applies: fps min= 1/max fps max = 1/min fps n= 1/(min + n * interv all)
The use of the following functions will affect the frame duration:
is_SetPixelClock() is_SetOptimalCameraTiming() is_SetAOI() (if the image size is changed) is_SetSubSampling() is_SetBinning()
Changes made to the window size, the frame rate or the read-out timing (pixel clock frequency) also affect the defined frame duration. For this reason, you need to call is_GetFrameTimeRange() again after such changes.
Input Parameters hCam min max intervall Camera handle Returns the minimum available frame duration. Returns the maximum available frame duration. Returns the increment you can use to change the frame duration.
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetFramesPerSecond() is_SetFrameRate() is_GetPixelClockRange() Function executed successfully General error message
109
110
7. 39 Description of Functions.is_GetGlobalFlashDelays
7.39
is_GetGlobalFlashDelays
INT is_GetGlobalFlashDelays (HIDS hCam, ULONG* pulDelay, ULONG* pulDuration) Description Rolling shutter cameras: Using is_GetGlobalFlashDelays(), you can determine the times required to implement a global flash function for rolling shutter cameras. This way, a rolling shutter camera can also be used as a global shutter camera provided that no ambient light falls on the sensor outside the flash period. If the exposure time is set too short so that no global flash operation is possible, the function returns IS_NO_SUCCESS.
To use a rolling shutter camera with the Global Start function, call the is_SetGlobalShutter() function before is_GetGlobalFlashDelays(). Otherwise, incorrect values will be returned for Delay and Duration.
Global shutter cameras: In freerun mode, the exposure of global shutter cameras is delayed if the exposure time is not set to the maximum value. is_GetGlobalFlashDelays() determines the required delay in order to synchronise exposure and flash operation. In triggered mode, the return values for delay and flash duration are 0, since no delay is necessary before exposure starts. For further information, please refer to the Camera Basics: Shutter Methods chapter of the uEye User Manual. Input Parameters hCam pulDelay pulDuration Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetFlashStrobe() is_SetFlashDelay() is_SetTriggerDelay() Function executed successfully General error message Camera handle Pointer to the variable that returns the flash delay in s. Pointer to the variable that returns the flash duration in s.
111
7.40
is_GetHdrKneepointInfo
INT is_GetHdrKneepointInfo (HIDS hCam, KNEEPOINTINFO* KneepointInfo, INT KneepointInfoSize) Description Some sensors support HDR mode (High Dynamic Range). You can use the is_EnableHdr() function to enable / disable it. Using is_GetHdrKneepointinfo(), you can query general information on the knee points. It is returned in a KNEEPOINTINFO structure. Input Parameters hCam KneepointInfo KneepointInfoSize Camera handle Pointer to a structure Size of the structure
Contents of the KneepointInfo Structure INT NumberOfSupportedKneepoints INT NumberOfUsedKneepoints double MinValueX double MaxValueX double MinValueY double MaxValueY INT Reserved[10] Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Related Functions is_GetHdrMode() is_GetHdrKneepoints() is_SetHdrKneepoints() is_EnableHdr() Function executed successfully (supported sensor type) General error message (supported sensor type) Unsupported sensor type Maximum number of supported knee points Currently used number of knee points Minimum X value of a knee point Maximum X value of a knee point Minimum Y value of a knee point Maximum Y value of a knee point Not used
112
7. 41 Description of Functions.is_GetHdrKneepoints
7.41
is_GetHdrKneepoints
INT is_GetHdrKneepoints (HIDS hCam, KNEEPOINTARRAY* KneepointArray, INT KneepointArraySize) Description Some sensors support HDR mode (High Dynamic Range). You can use the is_EnableHdr() function to enable / disable it. Using is_GetHdrKneepoints(), you can query the currently set knee points. Input Parameters hCam KneepointArray KneepointArraySize Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Related Functions is_GetHdrMode() is_GetHdrKneepointInfo() is_SetHdrKneepoints() is_EnableHdr() Function executed successfully (supported sensor type) General error message (supported sensor type) Unsupported sensor type Camera handle Pointer to a KNEEPOINTARRAY See also is_GetHdrKneepoints(). Size of the array
113
7.42
is_GetHdrMode
INT is_GetHdrMode (HIDS hCam, INT* Mode) Description Some sensors support HDR (High Dynamic Range) mode. You can use the is_EnableHdr() function to enable / disable it. Using is_GetHdrMode(), you can query the HDR mode supported by the sensor. For further information on HDR mode, please refer to the Properties section of the uEye Demo chapter in the uEye User Manual. Input Parameters hCam Mode IS_HDR_KNEEPOINTS IS_HDR_NOT_SUPPORTED Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetHdrKneepoints() is_GetHdrKneepointInfo() is_SetHdrKneepoints() is_EnableHdr() Function executed successfully General error message Camera handle Possible return values HDR is supported. HDR is not supported.
114
7. 43 Description of Functions.is_GetImageHistogram
7.43
is_GetImageHistogram
INT is_GetImageHistogram (HIDS hCam, int nID, INT ColorMode, DWORD* pHistoMem) Description is_GetImageHistogram() computes the histogram of the submitted image. The histogram always contains 256 values per channel. For colour modes with a bit depth of more than 8 bits, the system evaluates the 8 most significant bits (MSBs). Input Parameters hCam nID ColorMode Camera handle Memory ID Colour mode of the image with the nID memory ID For a list of all available colour formats and the associated input parameters, see the Appendix: Colour and Memory Formats section. pHistoMem Pointer to a DWORD array The array must be allocated in such a way that it can accommodate 3*256 values for colour formats and in raw Bayer mode. In monochrome mode, the array must be able to accommodate 1*256 values. Return Values IS_SUCCESS IS_NO_SUCCESS IS_NULL_POINTER IS_INVALID_COLOR_FORMAT IS_INVALID_PARAMETER Function executed successfully General error message Invalid Array Unsupported colour format Unknown ColorModeparameter
115
Code Sample char * pcSource; INT nIDSource; is_AllocImageMem (hCam, 256, 256, 24, &pcSource, &nIDSource); int nX, nY, nBits, nPitch; is_InquireImageMem (hCam, pcSource, nIDSource, &nX ,&nY, &nBits, &nPitch); //Create RGB test image for (int j = 0; j < nY; j++) { for (int i = 0; i < nX*3; i += 3) { pcSource[i + j*nPitch] = 0; // Blue pixels pcSource[i + j*nPitch + 1] = i/3; // Green pixels pcSource[i + j*nPitch + 2] = 255; // Red pixels } } // Create memory for RGB histogram DWORD bgrBuffer [256*3]; //Create pointer for each histogram colour DWORD * pBlueHisto = bgrBuffer; DWORD *pGreenHisto = bgrBuffer + 256; DWORD * pRedHisto = bgrBuffer + 512; //Retrieve histogram and release memory is_GetImageHistogram (hCam, nIDSource, IS_SET_CM_RGB24, bgrBuffer); is_FreeImageMem (hCam, pcSource, nIDSource);
116
7. 44 Description of Functions.is_GetImageInfo
7.44
is_GetImageInfo
INT is_GetImageInfo (HIDS hCam, INT nImageBufferID, UEYEIMAGEINFO* pImageInfo, INT nImageInfoSize)
Overview Description Input Parameters Contents of the UEYEIMAGEINFO Structure Status Flags in UEYEIMAGEINFO::dwIoStatus Contents of the UEYETIME Structure Return Values Related Functions Code Sample
Description is_GetImageInfo() provides additional information on the images you take. The function returns a timestamp indicating the time of image capture, and the states of the camera I/Os at that point in time. To get information on the last image that was taken, call is_GetImageInfo directly after receiving the IS_FRAME event. Using the function with GigE uEye cameras The UEYEIMAGEINFO structure returns the camera timestamp u64TimestampDevice, which indicates the time of image capture with an accuracy of 100 ns. The time of image capture is defined as: The time when a (hardware or software) trigger event is received by the camera in trigger mode. The delay between the receipt of the trigger signal and the start of exposure depends on the sensor. For the delays of the individual sensors, please see the Specifications chapter in the uEye User Manual. The time when the sensor starts to output image data in freerun mode (see also Function Blocks: Image Capture). A rolling shutter sensors starts to output image data after exposure of the first row. With a global shutter sensor, image data is output after exposure of all rows. The UEYETIME structure returns a timestamp with a resolution of 1 ms. The timestamp is synchronized with the PC's system time, and resynchronized every 60 seconds. This may cause minor time shifts in the value passed in UEYETIME. To determine the exact interval between two image captures, it is therefore recommended to read out the camera timestamp u64TimestampDevice. Using the function with USB uEye cameras The u64TimestampDevice timestamp returns the time when image data transfer to the PC was completed. The UEYETIME structure returns the timestamp (with a resolution of 1 ms) synchronized with the PC
117
Input Parameters hCam nImageBufferID pImageInfo nImageInfoSize Camera handle ID of the image buffer for which information is requested Pointer to a UEYEIMAGEINFO type structure to which the information will be written Size of the structure
Contents of the UEYEIMAGEINFO Structure DWORD unsigned long long UEYETIME dwFlags u64TimestampDevice TimestampSystem Internal status flags (currently not used) Internal timestamp of image capture Structure with timestamp information in PC system time format, see UEYETIME below With GigE uEye HE cameras: Returns the states of the GPIOs (programmable I/ Os) at the time of image capture: GPIO as input: Pending signal GPIO as output: Set level With all other cameras, dwIoStatus is empty. See dwIOStatus below. unsigned long long DWORD DWORD u64FrameNumber dwImageBuffers dwImageBuffersInUse Internal image number Number of image buffers existing in the camera Number of image buffers in use in the camera
DWORD
dwIoStatus
Status Flags in UEYEIMAGEINFO::dwIoStatus 0x00 (00) 0x01 (01) 0x02 (10) 0x03 (11) Both GPIOs return 0 First GPIO returns 1, second GPIO returns 0 First GPIO returns 0, second GPIO returns 1 Both GPIOs return 1
118
7. 44 Description of Functions.is_GetImageInfo
Contents of the UEYEIMAGEINFO::UEYETIME Structure WORD WORD WORD WORD WORD WORD WORD WORD Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_PARAMETER Function executed successfully General error message One of the parameters passed is invalid. This may happen when: more memory is allocated than the UEYEIMAGEINFO structure needs nImageBufferID <= 0 pImageInfo == NULL nImageInfoSize <= 0 Related Functions is_GetCaptureErrorInfo() is_LockSeqBuf() is_UnlockSeqBuf() is_SetImageMem() is_SetIO() is_SetIOMask() Code Sample UEYEIMAGEINFO ImageInfo; // Read out camera timestamp INT nRet = is_GetImageInfo( m_hCam, m_lMemoryId, &ImageInfo, sizeof(ImageInfo)); if (nRet == IS_SUCCESS) { unsigned long long u64TimestampDevice; u64TimestampDevice = ImageInfo.u64TimestampDevice; CString Str; // Read out timestamp in system time Str.Format("%02d.%02d.%04d, %02d:%02d:%02d:%03d", ImageInfo.TimestampSystem.wDay, ImageInfo.TimestampSystem.wMonth, ImageInfo.TimestampSystem.wYear, ImageInfo.TimestampSystem.wHour, ImageInfo.TimestampSystem.wMinute, wYear wMonth wDay wHour wMinute wSecond wMilliseconds wReserved[2] Timestamp year Timestamp month Timestamp day Timestamp hour Timestamp minute Timestamp second Timestamp millisecond Reserved
119
Programming Manual uEye Software Development Kit V3.40 ImageInfo.TimestampSystem.wSecond, ImageInfo.TimestampSystem.wMilliseconds); DWORD dwTotalBuffers = ImageInfo.dwImageBuffers; DWORD dwUsedBuffers = ImageInfo.dwImageBuffersInUse; } Sample Program uEyeTimestamp (C++)
120
7. 45 Description of Functions.is_GetImageMem
7.45
is_GetImageMem
INT is_GetImageMem (HIDS hCam, VOID** pMem) Description is_GetImageMem() returns the pointer to the starting address of the active image memory. If you use ring buffering, is_GetImageMem() returns the starting address of the image memory last used for image capturing. Input Parameters hCam pMem Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetImageMemPitch() is_AllocImageMem() is_AddToSequence() is_SetImageMem() is_SetAllocatedImageMem() Sample Programs uEyePixelPeek (C++) Function executed successfully General error message Camera handle Pointer to the starting address of the image memory
121
7.46
is_GetImageMemPitch
INT is_GetImageMemPitch (HIDS hCam, INT* pPitch) Description is_GetImageMemPitch() returns the line increment (in bytes). The line increment is defined as the number of bytes from the beginning of a line to the beginning of the next line. It may be greater than suggested by the parameters passed when calling is_AllocImageMem(). The line increment is always a number that can be divided by 4. The line increment is calculated as: line = width * [(bitspixel + 1) lineinc adjust adjust = line + adjust. = 0 if line can be divided by 4 without remainder = 4 - rest(line / 4) if line cannot be divided by 4 without remainder
/ 8]
Input Parameters hCam pPitch Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetImageMem() is_AllocImageMem() is_AddToSequence() is_SetImageMem() is_SetAllocatedImageMem() Function executed successfully General error message Camera handle Pointer to the variable containing the line increment
122
7. 47 Description of Functions.is_GetNumberOfCameras
7.47
is_GetNumberOfCameras
INT is_GetNumberOfCameras (INT* pnNumCams) Description is_GetNumberOfCameras() returns the number of uEye cameras connected to the PC. Input Parameters pNumCams Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetCameraList() is_GetEthDeviceInfo() Function executed successfully General error message Returns the number of connected cameras.
123
7.48
is_GetOsVersion
is_GetOsVersion() returns the operating system type used at runtime. Input Parameters <none> Return Values IS_OS_WIN2000 IS_OS_WINXP IS_OS_WINSERVER2003 IS_OS_WINVISTA IS_OS_LINUX26 IS_OS_UNDETERMINED Related Functions is_GetDLLVersion() Windows 2000 operating system Windows XP operating system Windows Server 2003 operating system Windows Vista operating system Linux 2.6 operating system Unknown operating system
124
7. 49 Description of Functions.is_GetPixelClockRange
7.49
is_GetPixelClockRange
INT is_GetPixelClockRange (HIDS hCam, INT* pnMin, INT* pnMax) Description is_GetPixelClockRange() returns the adjustable pixel clock range. The pixel clock limit values can vary, depending on the camera model and operating mode. For detailed information on the pixel clock range of a specific camera model, please refer to the Sensors section of the Specifications chapter in the uEye User Manual. Input Parameters hCam pnMin pnMax Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetPixelClock() is_GetFramesPerSecond() is_GetFrameTimeRange() is_GetExposureRange() is_GetExposureTime() Function executed successfully General error message Camera handle Returns the lower limit value. Returns the upper limit value.
125
7.50
is_GetSensorScalerInfo
INT is_GetSensorScalerInfo (HIDS hCam, SENSORSCALERINFO* pSensorScalerInfo, INT nSensorScalerInfoSize) Description Using is_GetSensorScalerInfo() you can query information on the image scaling which is supported by some sensors.
Input Parameters hCam pSensorScalerInfo nSensorScalerInfoSize Camera handle Pointer to a SENSORSCALERINFO type structure to which the information will be written Size of the structure
Contents of the SENSORSCALERINFO Structure INT INT double double double double BYTE Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_NOT_SUPPORTED Related Functions is_SetSensorScaler() Function executed successfully General error message The test image function is not supported by the camera. nCurrMode nNumberOfSteps Returns the current mode Returns the number of steps for the scaling factor
dblFactorIncrement Returns the increment for the scaling factor dblMinFactor dblMaxFactor dblCurrFactor bReserved[88] Returns the minimum scaling factor Returns the maximum scaling factor Returns the current scaling factor Reserved
126
7. 51 Description of Functions.is_GetSensorInfo
7.51
is_GetSensorInfo
INT is_GetSensorInfo (HIDS hCam, SENSORINFO* pInfo) Description Using is_GetSensorInfo(), you can query information about the sensor type used in the camera. The information contained in the SENSORINFO structure is listed in the table below. The ueye.h file provides a complete up-to-date list of all supported sensor types. To quickly locate the list, search the file for the keyword "Sensor Types". Input Parameters hCam pInfo Camera handle Pointer to the SENSORINFO Structure
Contents of the SENSORINFO Structure WORD Char Char SensorID strSensorName[32] nColorMode Returns the sensor type (e.g.: IS_SENSOR_UI224X_C). Returns the camera model (e.g.: "UI-224X-C"). Returns the sensor colour mode. IS_COLORMODE_BAYER IS_COLORMODE_MONOCHROME Returns the maximum image width. Returns the maximum image height. Indicates whether the sensor provides analogue master gain. Indicates whether the sensor provides analogue red channel gain. Indicates whether the sensor provides analogue green channel gain. Indicates whether the sensor provides analogue blue channel gain. Indicates whether the sensor has a global shutter. TRUE = global shutter FALSE = rolling shutter Char Reserved[16] Reserved
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
127
128
7. 52 Description of Functions.is_GetSupportedTestImages
7.52
is_GetSupportedTestImages
INT is_GetSupportedTestImages (HIDS hCam, INT* SupportedTestImages) Description is_GetSupportedTestImages() returns all test images supported by the camera. You can enable the sensor test image feature using is_SetSensorTestImage(). Input Parameters hCam SupportedTestImages IS_TEST_IMAGE_NONE IS_TEST_IMAGE_WHITE IS_TEST_IMAGE_BLACK IS_TEST_IMAGE_HORIZONTAL_GREYSCALE IS_TEST_IMAGE_VERTICAL_GREYSCALE IS_TEST_IMAGE_DIAGONAL_GREYSCALE IS_TEST_IMAGE_WEDGE_GRAY IS_TEST_IMAGE_WEDGE_COLOR IS_TEST_IMAGE_ANIMATED_WEDGE_GRAY IS_TEST_IMAGE_ANIMATED_WEDGE_COLOR IS_TEST_IMAGE_MONO_BARS IS_TEST_IMAGE_COLOR_BARS1 IS_TEST_IMAGE_COLOR_BARS2 IS_TEST_IMAGE_GREY_AND_COLOR_BARS Camera handle Returns a bit mask of all test images supported by the camera. No test image White image Black image Horizontal greyscale Vertical greyscale Diagonal greyscale Grey wedges Colour wedges Grey wedges, animated Colour wedges, animated Monochrome bars Colour bars Colour bars Grey and colour bars Line, animated Alternating pattern (raw Bayer mode only) Monochrome bars, vertical Camera image overlaid with a grid of blue dots Camera image overlaid with a grid of red dots Adjustable greyscale image Image with adjustable red content Image with adjustable green content
IS_TEST_IMAGE_MONOCHROME_HORIZONTAL_BARS Monochrome bars, horizontal IS_TEST_IMAGE_MONOCHROME_VERTICAL_BARS IS_TEST_IMAGE_COLDPIXEL_GRID IS_TEST_IMAGE_HOTPIXEL_GRID IS_TEST_IMAGE_VARIABLE_GREY IS_TEST_IMAGE_VARIABLE_RED_PART IS_TEST_IMAGE_VARIABLE_GREEN_PART
129
IS_TEST_IMAGE_VARIABLE_BLUE_PART Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Related Functions is_SetSensorTestImage() is_GetTestImageValueRange()
Function executed successfully General error message The test image function is not supported by the camera.
130
7. 53 Description of Functions.is_GetTestImageValueRange
7.53
is_GetTestImageValueRange
INT is_GetTestImageValueRange (HIDS hCam, INT TestImage, INT* TestImageValueMin, INT* TestImageValueMax) Description Using is_GetTestImageValueRange(), you can query the value range of the additional parameter required for some camera test images. You can enable the sensor test image feature using is_SetSensorTestImage(). Input Parameters hCam TestImage TestImageValueMin TestImageValueMax Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Function executed successfully General error message The test image function is not supported by the camera. In this case, the TestImageValueMin and TestImageValueMax parameters are equal to 0. Camera handle Test image for which the value range is queried Minimum value Maximum value
131
7.54
is_GetTimeout
INT is_GetTimeout (HIDS hCam, UINT nMode, UINT* pTimeout) Description Using is_GetTimeout(), you can read out user-defined timeout values from the uEye API. For further information, please refer to the Function Blocks: Timeout Values for Image Capture section. Input Parameters hCam nMode IS_TRIGGER_TIMEOUT pTimeout Camera handle Selects the timeout value to be returned Returns the timeout value in ms for triggered image capture Pointer to the variable that holds the timeout value. Returns 0 if the default value of the uEye API is used.
Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED IS_INVALID_PARAMETER Function executed successfully General error message The value for nMode is invalid The pTimeout pointer is NULL
Related Functions is_SetTimeout() is_CaptureVideo() is_FreezeVideo() is_SetExternalTrigger() Code Sample // Return user-defined timeout UINT nTimeout; INT ret = is_GetTimeout(hCam, IS_TRIGGER_TIMEOUT, &nTimeout);
132
7. 55 Description of Functions.is_GetUsedBandwidth
7.55
is_GetUsedBandwidth
INT is_GetUsedBandwidth (HIDS hCam) Description is_GetUsedBandwidth() returns the bus bandwidth (in Mbit/s) currently used by all initialised or selected cameras. This is an approximate value which is calculated based on the pixel clock that has been set and the data format (bits per pixel). The actual data load on the bus can slightly deviate from this value. Input Parameters hCam Return Values INT value Related Functions is_SetPixelClock() is_SetColorConverter() (when a GigE uEye HE camera is used) The total current bus bandwidth (in Mbit/s) Camera handle
133
7.56
is_GetVsyncCount
INT is_GetVsyncCount (HIDS hCam, long* pIntr, long* pActIntr) Description is_GetVsyncCount() reads out the VSYNC counter. It will be incremented by 1 each time the sensor starts capturing an image. Input Parameters hCam pIntr pActIntr Camera handle Current VSYNC count Current Frame SYNC count
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetFramesPerSecond() Function executed successfully General error message
134
7. 57 Description of Functions.is_HasVideoStarted
7.57
is_HasVideoStarted
INT is_HasVideoStarted (HIDS hCam, BOOL* pbo) Description Using is_HasVideoStarted(), you can check whether the image digitising process has started. This function is helpful when the is_FreezeVideo() function was called with the IS_DONT_WAIT parameter. Input Parameters hCam pbo Camera handle Returns the digitising status: 0 = Image capturing has not started yet. 1 = Image capturing has started. Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_FreezeVideo() is_IsVideoFinish() Function executed successfully General error message
135
7.58
is_InitCamera
INT is_InitCamera (HIDS* phf, HWND hWnd) Description is_InitCamera() starts the driver and establishes the connection to the camera. After successful initialization, this function assigns the camera handle. All subsequent functions require this handle as the first parameter. When using Direct3D for image display, you can pass a handle to the output window (see also Function Blocks: Image Display).
When you are using a GigE uEye SE camera, initialization will be aborted with an error message if the camera's starter firmware is not compatible with the installed driver. To initialize the camera, you have to write the proper starter firmware to the camera first. This is done using the is_InitCamera() function with corresponding parameter setting (see Input Parameters table). Updating the GigE uEye SE firmware can take up to 20 seconds. It is important not to disconnect the camera from the PC or power supply during this time. Otherwise, malfunctions could occur in the camera.
If you have initialized the camera with a driver version earlier than 3.40, you need to update the camera firmware manually using the uEye Camera Manager. Driver versions 3.40 and higher support automatic firmware updates.
Note on multi-camera environments: When using multiple cameras in parallel operation on a single system, you should assign a unique camera ID to each camera. To initialize or select a camera with is_InitCamera(), the phf handle must previously have been set to the desired camera ID. To initialize or select the next available camera without specifying a camera ID, phf has to be preset with 0.
We recommend that you call the following functions exclusively from a single thread in order to avoid unpredictable behavior of the application.
136
7. 58 Description of Functions.is_InitCamera
Input Parameters phf Pointer to the camera handle When you call this function, the pointer value has the following meaning: 0: The first available camera will be initialized or selected. 1-254: The camera with the specified camera ID will be initialized or selected. phf | During initialization of the camera, this parameter checks IS_ALLOW_STARTER_FW_UPLOAD whether a new version of the starter firmware is required. If it is, the new starter firmware is updated automatically (only GigE uEye SE cameras).
To ensure backward compatibility of applications, always call is_InitCamera() without the IS_ALLOW_STARTER_FW_UPLOAD parameter first. Only if an error occurs, call the function with this parameter set (see Code Sample below).
hWnd
Pointer to the window where the Direct3D image will be displayed If hWnd = NULL, DIB mode will be used for image display.
Return Values IS_SUCCESS IS_NO_SUCCESS IS_STARTER_FW_UPLOAD_NEEDED Function executed successfully General error message The camera's starter firmware is not compatible with the driver and needs to be updated.
Related Functions is_ExitCamera() is_EnableAutoExit() is_SetCameraID() is_GetCameraInfo() is_GetDuration() (when a GigE uEye SE camera is used) is_SetStarterFirmware() (when a GigE uEye SE camera is used) Code Sample //Open camera with ID 1 HIDS hCam = 1; INT nRet = is_InitCamera (&hCam, NULL); if (nRet != IS_SUCCESS) { //Check if new starter firmware is needed if (nRet == IS_STARTER_FW_UPLOAD_NEEDED) { //Calculate time needed for updating the starter firmware INT nTime;
137
Programming Manual uEye Software Development Kit V3.40 is_GetDuration (hCam, IS_SE_STARTER_FW_UPLOAD, &nTime); /* ... e.g. have progress bar displayed in separate thread */ //Upload new starter firmware during initialization nRet = is_InitCamera (&hCam | IS_ALLOW_STARTER_FW_UPLOAD, NULL); /* ... end progress bar */ } } Sample Programs uEyeMultipleCameraScan (C++) uEyeConsole (C++) uEyeC# Demo (C#) uEye VB Simple Demo (VB6) uEye VB Dual Camera Demo (VB6)
138
7. 59 Description of Functions.is_InitEvent
7.59
is_InitEvent
INT is_InitEvent (HIDS hCam, HANDLE hEv, INT which) Description is_InitEvent() initialises the event handle for the specified event object. This registers the event object in the uEye kernel driver. Input Parameters hCam hEv which IS_SET_EVENT_FRAME IS_SET_EVENT_SEQ IS_SET_EVENT_STEAL IS_SET_EVENT_TRANSFER_FAILED IS_SET_EVENT_EXTTRIG Camera handle Event handle created by the CreateEvent() Windows API function ID of the event to be initialised A new image is available. The sequence is completed. An image extracted from the overlay is available. During the transfer, data was lost. An image which was captured following the arrival of a trigger has been transferred completely. This is the earliest possible moment for a new capturing process. The image must then be postprocessed by the driver and will be available after the IS_FRAME processing event. A camera initialised with is_InitCamera() was disconnected. *)
IS_SET_EVENT_REMOVE
IS_SET_EVENT_DEVICE_RECONNECTED A camera initialised with is_InitCamera() and disconnected afterwards was reconnected. *) IS_SET_EVENT_NEW_DEVICE A new camera was connected. This is independent of the device handle (hCam is ignored). A camera was removed. This is independent of the device handle (hCam is ignored). The automatic white balance control is completed.
IS_SET_EVENT_REMOVAL
IS_SET_EVENT_WB_FINISHED
*) Not available under Linux.
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
139
Related Functions is_EnableEvent() is_DisableEvent() is_ExitEvent() is_WaitEvent() Code Sample HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, ""); if (hEvent != NULL) { //Enable frame event, start image capture and wait for event: is_InitEvent(hCam, hEvent, IS_SET_EVENT_FRAME); is_EnableEvent(hCam, IS_SET_EVENT_FRAME); is_FreezeVideo(hCam, IS_DONT_WAIT); if (WaitForSingleObject(hEvent, 1000) == WAIT_OBJECT_0) { // Image was captured successfully is_DisableEvent(hCam, IS_SET_EVENT_FRAME); is_ExitEvent(hCam, IS_SET_EVENT_FRAME); } } Sample Programs SimpleLive (C++) uEyeEvent (C++)
140
7. 60 Description of Functions.is_InquireImageMem
7.60
is_InquireImageMem
INT is_InquireImageMem (HIDS hCam, char* pcMem, int nID, int* pnX, int* pnY, int* pnBits, int* pnPitch); Description is_InquireImageMem() reads out the properties of an allocated image memory. Input Parameters hCam pMem NID pnX pnY pnBits pnPitch Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_SetImageMem() is_SetAllocatedImageMem() is_GetColorDepth() Function executed successfully General error message Camera handle Pointer to the starting address of the image memory as allocated by is_AllocImageMem() ID of the image memory as allocated by is_AllocImageMem() Returns the width used to define the image memory (can be 0). Returns the height used to define the image memory (can be 0). Returns the bit width used to define the image memory (can be 0). Returns the line increment of the image memory (can be 0).
141
7.61
is_IsVideoFinish
INT is_IsVideoFinish (HIDS hCam, BOOL* pbo) Description Using is_IsVideoFinish(), you can check whether an image has been captured and stored completely in the image memory. This function is helpful if the is_FreezeVideo() function was called with the IS_DONT_WAIT parameter. By setting the *pbo==IS_TRANSFER_FAILED parameter before calling is_IsVideoFinish(), you can also check whether a transfer or post-processing error occurred. Input Parameters hCam pbo Camera handle By setting *pbo != IS_TRANSFER_FAILED before calling the function, pbo contains the following digitising status: IS_VIDEO_NOT_FINISH = Digitising of the image is not completed yet. IS_VIDEO_FINISH = Digitising of the image is completed.
By setting *pbo == IS_TRANSFER_FAILED before calling the function, pbo contains the following digitising status: IS_VIDEO_NOT_FINISH = Digitising of the image is not completed yet. IS_VIDEO_FINISH = Digitising of the image is completed. IS_TRANSFER_FAILED = Transfer error or conversion problem (e.g. destination memory is invalid) Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_FreezeVideo() is_HasVideoStarted() Function executed successfully General error message
142
7. 62 Description of Functions.is_LoadBadPixelCorrectionTable
7.62
is_LoadBadPixelCorrectionTable
INT is_LoadBadPixelCorrectionTable (HIDS hCam, const IS_CHAR* File) Description is_LoadBadPixelCorrectionTable() loads a list of sensor hot pixel coordinates that was previously saved using the is_SaveBadPixelCorrectionTable() function. Input Parameters hCam File Camera handle Pointer to a string which contains the name of the file where the coordinates are stored. You can either pass an absolute or a relative path. If NULL is passed, the "Open File" dialogue opens. Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SaveBadPixelCorrectionTable() is_SetBadPixelCorrection() is_SetBadPixelCorrectionTable() Function executed successfully General error message
143
7.63
is_LoadImage
INT is_LoadImage (HIDS hCam, char* File) Description is_LoadImage() loads an image from a file. The image must have been saved in BMP format. It is loaded into the active image memory. Input Parameters hCam File Camera handle Pointer to a filename You can either pass an absolute or a relative path. If NULL is passed, the "Open File" dialogue opens. Return Values IS_SUCCESS The image was loaded without errors.
IS_FILE_READ_INVALID_BMP_SIZE The size of the image to be loaded exceeds the active image memory size. IS_FILE_READ_INVALID_BMP_ID IS_FILE_READ_OPEN_ERROR Related Functions Is_LoadImageMem() is_GetImageMem() is_SetImageMem() is_SaveImage() is_SaveImageEx() is_SaveImageMem() is_SaveImageMemEx() The file to be loaded is not a valid bitmap file. The file could not be opened.
144
7. 64 Description of Functions.is_LoadImageMem
7.64
is_LoadImageMem
INT is_LoadImageMem (HIDS hCam, char* File, char** ppcImgMem, int* pid) Description is_LoadImageMem() loads an image from a file. The image must have been saved in BMP format. The image, together with its colour format and colour depth properties, is loaded into a newly allocated image memory. Using the is_FreeImageMem() function, you can release the image memory again. Input Parameters hCam File Camera handle Filename You can either pass an absolute or a relative path. If NULL is passed, the "Open File" dialogue opens. ppcImgMem pid Return Values IS_SUCCESS IS_NO_SUCCESS IS_FILE_READ_INVALID_BMP_ID IS_FILE_READ_OPEN_ERROR Related Functions Is_LoadImage() is_GetImageMem() is_SetImageMem() is_SaveImage() is_SaveImageEx() is_SaveImageMem() is_SaveImageMemEx() Function executed successfully General error message Bitmap format of the image to be loaded is invalid. File cannot be opened. Pointer to a variable containing the starting address Pointer to a variable containing the memory ID
145
7.65
is_LoadParameters
INT is_LoadParameters (HIDS hCam, char* pFilename) Description is_LoadParameters() loads the parameters for a camera from a uEye ini file or from the camera EEPROM. Using the is_SaveParameters() function, you can save camera parameters in an ini file or in the camera.
Only camera-specific ini files can be loaded. The uEye Parameter File section in the Appendix describes the structure of a uEye ini file. When loading an ini file, make sure that the image size (AOI) and colour depth parameters in the ini file match those in the allocated memory. Otherwise, display errors may occur.
Input Parameters hCam pFilename Camera handle Pointer to a filename. You can either pass an absolute or a relative path. For the internal camera parameter sets, these would be "\\cam\\set1" or "/cam/set1", or "\\cam\\set2" or "/cam/set2", respectively. If NULL is passed, the "Open File" dialogue is displayed.
You can load the parameter sets stored in the camera EEPROM using specific filenames: pFilename "\\cam\\set1" or "/cam/ set1" "\\cam\\set2" or "/cam/ set2" Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_CAMERA_TYPE Related Functions is_SaveParameters() Function executed successfully General error message This is the ini file of a different camera type Parameter set 1 Parameter set 2
146
7. 66 Description of Functions.is_LockSeqBuf
7.66
is_LockSeqBuf
INT is_LockSeqBuf (HIDS hCam, INT nNum, char* pcMem) Description is_LockSeqBuf() locks write access to an image memory within a sequence. In the capturing process, locked image memories will be skipped in the sequence list of image memories to be used. This way, you can avoid that image data which are required for further processing will be overwritten by newly captured data. Full access to the image memory is still guaranteed. You can lock any number of image memories at the same time. Using the is_UnlockSeqBuf() function, you can re-enable write access to the image memory. Input Parameters hCam nNum Camera handle Number of the image memory to be locked (1...max) or IS_IGNORE_PARAMETER: The image memory will be identified by its starting address only. Starting address of the image memory to be locked
pcMem
nNum indicates the location in the sequence list, not the memory ID assigned using is_AllocImageMem ().
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_UnlockSeqBuf() is_AddToSequence() is_SetImageMem() is_SetAllocatedImageMem() Function executed successfully General error message
147
7.67
is_ReadEEPROM
INT is_ReadEEPROM (HIDS hCam, INT Adr, char* pcString, INT Count) Description Using is_ReadEEPROM(), you can read the contents of the camera EEPROM. Besides the hardcoded factory information, the EEPROM of the uEye can hold 64 bytes of user data. Input Parameters hCam Adr pcString Count Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_WriteEEPROM() Code Sample char buffer[64]; is_ReadEEPROM( hCam, 0x00, buffer, 64 ); Function executed successfully General error message Camera handle Starting address for data reads Value range: 0...63 Pointer to the buffer for the data to read (min. size = Count) Number of characters to read
148
7. 68 Description of Functions.is_ReadI2C
7.68
is_ReadI2C
USB 2.0
USB 2.0
Syntax INT is_ReadI2C (HIDS hCam, INT nDeviceAddr, INT nRegisterAddr, BYTE* pbData, INT nLen) Description Using is_ReadI2C(), you can read data over the I2C bus of a board level camera. For information on the signals applied to the I2C bus, refer to the Specifications: Electrical Specifications chapter in the uEye User Manual.
The is_WriteI2C() function is only supported by PCB versions of the USB uEye ME/LE camera series.
The uEye processes I2C addresses in a 7-bit format that is created from the 8-bit format by a bit shift to the right. The eighth bit indicates whether an address is a read (1) or write (0) address. For example, the 7-bit address 0x48 is the write address 0x90 and the read address 0x91 in 8-bit format. The following addresses for nRegisterAddr are assigned to the uEye and must not be used: 7-bit format: 0x10, 0x48, 0x4C, 0x51, 0x52, 0x55, 0x5C, 0x5D, 0x69 8-bit format: 0x21, 0x91, 0x99, 0xA3, 0xA5, 0xAB, 0xB9, 0xBB, 0xD3
Input Parameters hCam nDeviceAddr nRegisterAddr pbData nLen Camera handle Slave device address in 7-bit format Register address (only 8-bit addresses are valid) Pointer to the data to be read Data length nLen = 1: 8 bits data nLen = 2: 16 bits data Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
149
7.69
is_RenderBitmap
INT is_RenderBitmap (HIDS hCam, INT nMemID, HWND hwnd, INT nMode) Description Using is_RenderBitmap(), you can output an image from an image memory in the specified window. For the display, Windows bitmap functionality is used. The image is displayed in the format you specified when allocating the image memory. The bitspixel parameter of the is_AllocImageMem() function defines the colour depth and display type. RGB16 and RGB15 require the same amount of memory but can be distinguished by the bitspixel parameter. Input Parameters hCam nMemID hwnd nMode IS_RENDER_NORMAL IS_RENDER_FIT_TO_WINDOW IS_RENDER_DOWNSCALE_1_2 The following options can be linked by a logical OR using the nMode parameter: IS_RENDER_MIRROR_UPDOWN Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_SetColorMode() is_SetDisplayMode() is_DirectRenderer() Code Sample Fit image to window and display it upside down: is_RenderBitmap (hCam, nMemID, hwnd, IS_RENDER_FIT_TO_WINDOW | IS_RENDER_MIRROR_UPDOWN); Function executed successfully General error message Mirrors the displayed image along the horizontal axis. The image is rendered normally. It will be displayed in 1:1 scale as stored in the image memory. The image size is adjusted to fit the output window. Displays the image at 50% of its original size. Camera handle ID of the image memory whose contents is to be displayed Output window handle
150
7. 69 Description of Functions.is_RenderBitmap
151
7.70
is_ResetCaptureErrorInfo
INT is_ResetCaptureErrorInfo (HIDS hCam) Description is_ResetCaptureErrorInfo() deletes the list of errors that occurred while images were being captured. You can retrieve this list using the is_GetCaptureErrorInfo() function. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetCaptureErrorInfo() is_GetError() is_CameraStatus() Function executed successfully General error message Camera handle
152
7. 71 Description of Functions.is_ResetToDefault
7.71
is_ResetToDefault
INT is_ResetToDefault (HIDS hCam) Description is_ResetToDefault() resets all parameters to the camera-specific defaults as specified by the driver. By default, the camera uses full resolution, a medium speed and colour level gain values adapted to daylight exposure. All optional features are disabled. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_LoadParameters() is_SaveParameters() Function executed successfully General error message Camera handle
153
7.72
is_SaveBadPixelCorrectionTable
INT is_SaveBadPixelCorrectionTable (HIDS hCam, const IS_CHAR* File) Description is_SaveBadPixelCorrectionTable() saves the user-defined hot pixel list to the specified file. Input Parameters hCam File Camera handle Pointer to a string which contains the name of the file where the coordinates are stored. You can either pass an absolute or a relative path. If NULL is passed, the "Save as" dialogue will be displayed. Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_LoadBadPixelCorrectionTable() is_SetBadPixelCorrection() is_SetBadPixelCorrectionTable() Function executed successfully General error message
154
7. 73 Description of Functions.is_SaveImage
7.73
is_SaveImage
INT is_SaveImage (HIDS hCam, const IS_CHAR* File) Description is_SaveImage() saves an image in bitmap (*.BMP) format to a file. The images are read out from the current image memory. The bitmap is stored with the colour depth that was used when allocating the image memory (in DIB mode) or that was set for the current colour mode (in Direct3D mode).
Input Parameters hCam File Camera handle Pointer to a string containing the BMP filename You can either pass an absolute or a relative path. If NULL is passed, the "Save as" dialogue will be displayed. Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SaveImageEx() is_SaveImageMem() is_SaveImageMemEx() is_LoadImage() Is_LoadImageMem() is_GetImageMem() is_SetImageMem() Function executed successfully General error message
155
7.74
is_SaveImageEx
INT is_SaveImageEx (HIDS hCam, const IS_CHAR* File, INT fileFormat, INT Param) Description is_SaveImageEx() saves an image in (*.BMP) or Jpeg (*.JPG) format to a file. The images are read out from the current image memory. The bitmap is stored with the colour depth that was used when allocating the image memory (in DIB mode) or that was set for the current colour mode (in Direct3D mode).
Input Parameters hCam File Camera handle Pointer to a string containing the BMP filename You can either pass an absolute or a relative path. If NULL is passed, the "Save as" dialogue will be displayed. fileFormat IS_IMG_BMP IS_IMG_JPG Param Specifies the output format of the file. Bitmap format JPEG format When you use IS_IMG_JPG to specify the file format, you can set the quality by specifying a value between 1 and 100 for Param. If Param=0, the system uses the default quality (75). If you use IS_IMG_BMP, Param does not take effect. Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_PARAMETER Function executed successfully General error message Invalid file format or invalid JPEG quality value
156
7. 74 Description of Functions.is_SaveImageEx
157
7.75
is_SaveImageMem
INT is_SaveImageMem (HIDS hCam, const IS_CHAR* File, char* pcMem, int nID) Description is_SaveImageMem() saves an image in bitmap (*.BMP) format to a file. The images are read out from the specified image memory. The bitmap is stored with the colour depth that was used when allocating the image memory (in DIB mode) or that was set for the current colour mode (in Direct3D mode). JPEG files are always saved with a colour depth of 8 or 24 bits.
Input Parameters hCam File Camera handle Pointer to a string containing the BMP filename You can either pass an absolute or a relative path. If NULL is passed, the "Save as" dialogue will be displayed. pcMem nID Pointer to the image memory Image memory ID You can link USE_ACTUAL_IMAGE_SIZE and nID by a logical OR to save the image with the currently set image size. Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SaveImage() is_SaveImageEx() is_SaveImageMemEx() is_LoadImage() Is_LoadImageMem() is_GetImageMem() is_SetImageMem() Function executed successfully General error message
158
7. 76 Description of Functions.is_SaveImageMemEx
7.76
is_SaveImageMemEx
INT is_SaveImageMemEx (HIDS hCam, const IS_CHAR* File, char* pcMem, int nID, INT fileFormat, INT Param) Description is_SaveImageMemEx() saves an image in bitmap (*.BMP) or Jpeg (*.JPG) format to a file. The images are read out from the specified image memory. The bitmap is stored with the colour depth that was used when allocating the image memory (in DIB mode) or that was set for the current colour mode (in Direct3D mode). JPEG files are always saved with a colour depth of 8 or 24 bits.
Input Parameters hCam File Camera handle Pointer to a string containing the BMP filename. You can either pass an absolute or a relative path. If NULL is passed, the "Save as" dialogue will be displayed.. pcMem nID fileFormat IS_IMG_BMP IS_IMG_JPG Param Pointer to the image memory Image memory ID Specifies the output format of the file. Bitmap format JPEG format When you use IS_IMG_JPG to specify the file format, you can set the quality by specifying a value between 1 and 100 for Param. If Param=0, the system uses the default quality (75). If you use IS_IMG_BMP, Param does not take effect. Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_PARAMETER Function executed successfully General error message Invalid file format or invalid JPEG quality value
159
160
7. 77 Description of Functions.is_SaveParameters
7.77
is_SaveParameters
INT is_SaveParameters (HIDS hCam, const IS_CHAR* pFilename) Description is_SaveParameters() saves the current camera parameters to an ini file or to the EEPROM of the camera. You can load saved parameters using the is_LoadParameters() function. The uEye
Parameter File section in the Appendix describes the structure of a uEye ini file.
Input Parameters hCam pFileName Camera handle Pointer to a filename You can either pass an absolute or a relative path. For internal parameter sets, these are "\ \cam\\set1" or "/cam/set1", or "\\cam\\set2" or "/cam/set2", respectively. If NULL is passed, the "Save as" dialogue will be displayed..
You can save two parameter sets in the non-volatile EEPROM of the camera using specific filenames: pFileName "\\cam\\set1" or "/cam/ set1" "\\cam\\set2" or "/cam/ set2" Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_LoadParameters() is_CameraStatus() Function executed successfully General error message Parameter set 1 Parameter set 2
161
7.78
is_SetAllocatedImageMem
INT is_SetAllocatedImageMem (HIDS hCam, INT width, INT height, INT bitspixel, char* pcImgMem, int* pid) Description Using is_SetAllocatedImageMem(), you can make a memory allocated by a user the active memory for storing digitised images in it. The allocated memory must be large enough (size >= (width * height * bitspixel / 8)) and must always be locked globally (see below). You can call the is_AddToSequence() function to add a memory which was set using is_SetAllocatedImageMem() to a sequence. Please make sure to proceed in the following order: Allocate Memory: HANDLE hgMem = GlobalAlloc (size); Lock memory: char* pcMem = (char*) GlobalLock (hgMem);
The address of this memory will be passed to the uEye driver. For this, you can use the is_SetAllocatedImageMem() function. In addition, you need to specify the image size, just as you do when calling is_AllocImageMem(). The returned memory ID is required by other functions for memory access. The memory area must be removed from the driver management again using the is_FreeImageMem () function. Please note that this does not release the memory. You then need to make sure that the memory will be released again: Unlock memory: GlobalUnlock (hgMem); Release Memory: is_FreeImageMem (hCam, pcMem, ID); GlobalFree (hgMem); Input Parameters hCam width height bitspixel pcImgMem pid Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message Camera handle Image width Image height Image colour depth (bits per pixel) Pointer to the starting address of the allocated memory Returns the ID of this memory.
162
7. 78 Description of Functions.is_SetAllocatedImageMem
163
7.79
is_SetAOI
INT is_SetAOI (HIDS hCam, INT type, INT* pXPos, INT* pYPos, INT* pWidth, INT* pHeight) Description is_SetAOI() can be used to set the size and position of an area of interest (AOI) within an image. The following AOIs can be defined: Image AOI display of an image portion Auto Brightness AOI reference area of interest for automatic brightness control Auto Whitebalance AOI reference area of interest of automatic white balance control
By default, the window size for auto AOIs is always maximum, i.e. it corresponds to the current image AOI.
After a change to the image geometry (by resetting an image AOI, by binning or sub-sampling), the auto AOIs will always be reset to the image AOI value (i.e. to maximum size). This means that it might be necessary to set the AOIs for the auto features again manually.
Changes to the image geometry or pixel clock affect the value ranges of the frame rate and exposure time. After executing is_SetAOI(), calling the following functions is recommended in order to keep the defined camera settings: is_SetFrameRate() is_SetExposureTime() If you are using the uEye's flash function: is_SetFlashStrobe()
Input Parameters The pXPos and pYPos parameters represent an offset with respect to the upper left image corner. The cut window is copied to the start position in the memory. If you want the image to be copied to the same offset within the memory, you can link the new position with a logical OR to the IS_SET_IMAGEPOS_X_ABS and IS_SET_IMAGEPOS_Y_ABS parameters.
164
7. 79 Description of Functions.is_SetAOI
Camera handle
Sets an image AOI. Returns the current image AOI. Sets average AOI values for auto gain and auto shutter. Returns the current auto brightness AOI. Sets an auto white balance AOI. Returns the current auto white balance AOI. Pointer to the horizontal position of the AOI Returns the current setting when used together with the IS_GET_... parameters.
Applies the absolute position to the memory as well. Pointer to the vertical position of the AOI Returns the current setting when used together with the IS_GET_... parameters.
Applies the absolute position to the memory as well. Pointer to the width of the AOI Returns the current setting when used together with the IS_GET_... parameters.
pHeight
Pointer to the height of the AOI Returns the current setting when used together with the IS_GET_... parameters.
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetImagePos() is_SetBinning() is_SetSubSampling() is_SetAutoParameter() Function executed successfully General error message
165
7.80
is_SetAutoCfgIpSetup
GigE
GigE
Syntax INT is_SetAutoCfgIpSetup (INT iAdapterID, const UEYE_ETH_AUTOCFG_IP_SETUP* pSetup, UINT uStructSize) Description You can use is_SetAutoCfgIpSetup() to set the IP auto configuration properties of a network adapter. The IP configuration can also be changed using the uEye Camera Manager.
The is_SetAutoCfgIpSetup() function is only supported by cameras of the GigE uEye series.
Input Parameters iAdapterID Internal adapter ID of the network adapter. It is returned by the is_GetEthDeviceInfo() function in the UEYE_ETH_ADAPTER_INFO structure. Pointer to a UEYE_ETH_AUTOCFG_IP_SETUP object Size of the UEYE_ETH_AUTOCFG_IP_SETUP structure in bytes
pSetup uStructSize
Contents of the UEYE_ETH_AUTOCFG_IP_SETUP Structure UEYE_ETH_ADDR_IPV4 ipAutoCfgIpRangeBegin IPv4 address of the auto configuration range First UEYE_ETH_ADDR_IPV4 ipAutoCfgIpRangeEndLast IPv4 address of the auto configuration range BYTE Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_BAD_STRUCTURE_SIZE IS_CANT_OPEN_DEVICE IS_IO_REQUEST_FAILED Related Functions is_SetPersistentIpCfg() is_GetEthDeviceInfo() General message indicating successful execution pSetup is invalid. The structure size you specified is invalid. Driver could not be found. Driver communication failed. reserved[4] reserved
166
7. 80 Description of Functions.is_SetAutoCfgIpSetup
Code Sample UEYE_ETH_AUTOCFG_IP_SETUP autocfgip; // Specify the IP address 192.168.10.15 in hexadecimal format autocfgip.ipAutoCfgIpRangeBegin.dwAddr= 0xC0A80A0F; // Specify the IP address 192.168.10.35 in hexadecimal format autocfgip.ipAutoCfgIpRangeEnd.dwAddr= 0xC0A80A23; // Set IP address INT nRet= is_SetAutoCfgIpSetup( iAdapterId, &autocfgip, sizeof (UEYE_ETH_AUTOCFG_IP_SETUP));
167
7.81
is_SetAutoParameter
Enable auto controls and return status information Adjust auto gain/auto exposure Adjust auto white balance Pre-defined values for auto gain/auto exposure Return Values Related Functions Code Samples
Syntax INT is_SetAutoParameter (HIDS hCam, INT param, double* pval1, double* pval2) Description Using is_SetAutoParameter(), you can control the automatic gain, exposure shutter, frame rate and white balance control values. For further information on automatic control, please refer to the Functions for Automatic Image Control chapter.
Control is only active as long as the camera is capturing images. A manual change of the exposure time and gain settings disables the auto functions. When the auto shutter function is enabled, you cannot modify the pixel clock frequency. The auto frame rate function is only available when the auto shutter control is on. Auto frame rate and auto gain cannot be used simultaneously. The auto gain function can only be used for cameras with master gain control set. Auto white balance is only available for cameras with hardware RGB gain control set. The sensor's internal auto functions are only supported by the sensor of the UI-122x/522x camera models. Please also read the notes on using this sensor, which are provided in the Specifications: Sensor Data chapter of the uEye User Manual.
Automatic control by the sensor and the software is not possible simultaneously. To use the sensor's control functionality, disable software control, and vice versa.
168
7. 81 Description of Functions.is_SetAutoParameter
param
Configure auto control Enables / disables the auto gain function. Control parameter pval1 = 1 enables, 0 disables control Returns the current auto gain setting. Control parameter pval1 returns the current value
IS_GET_ENABLE_AUTO_GAIN
IS_SET_ENABLE_AUTO_SENSOR_GAIN Enables / disables the sensor's internal auto gain function *). Control parameter pval1 = 1 enables, 0 disables control IS_GET_ENABLE_AUTO_SENSOR_GAIN Returns the current setting of the sensor's internal auto gain function *). Control parameter pval1 returns the current value IS_SET_ENABLE_AUTO_SHUTTER Enables / disables the auto exposure function. Control parameter pval1 = 1 enables, 0 disables control Returns the current auto exposure setting. Control parameter pval1 returns the current value Enables / disables the sensor's internal auto exposure function. *). Control parameter pval1 = 1 enables, 0 disables control Returns the current setting of the sensor's internal auto exposure function *). Control parameter pval1 returns the current value
IS_GET_ENABLE_AUTO_SHUTTER
IS_SET_ENABLE_AUTO_SENSOR _SHUTTER
IS_GET_ENABLE_AUTO_SENSOR _SHUTTER
IS_SET_ENABLE_AUTO_WHITEBALANCE Enables / disables the auto white balance function. Control parameter pval1 = 1 enables, 0 disables control IS_GET_ENABLE_AUTO_WHITEBALANCE Returns the current auto white balance setting. Control parameter pval1 returns the current value IS_SET_ENABLE_AUTO_FRAMERATE Enables / disables the auto frame rate function. Control parameter pval1 = 1 enables, 0 disables control Returns the current auto frame rate setting. Control parameter pval1 returns the current value Enables / disables the sensor's internal auto frame rate function. *). Control parameter pval1 = 1 enables, 0 disables control Returns the current setting of the sensor's internal auto frame rate function *). Control parameter pval1 returns the current value
IS_GET_ENABLE_AUTO_FRAMERATE
IS_SET_ENABLE_AUTO_SENSOR _FRAMERATE
IS_GET_ENABLE_AUTO_SENSOR _FRAMERATE
169
Sets the setpoint value for auto gain / auto shutter. Control parameter pval1 the setpoint value (average image brightness). Independe pixel bit depth the setpoint range is: 0 = black 128 = 50% grey (default) 255 = white
IS_GET_AUTO_REFERENCE
Returns the setpoint value for auto gain / auto shutter. Control parameter pval1 returns the current value Sets the upper limit for auto gain. Control parameter pval1 valid value for gain (0...100)
IS_SET_AUTO_GAIN_MAX
IS_GET_AUTO_GAIN_MAX
Returns the upper limit for auto gain. Control parameter pval1 returns the current value Sets the upper limit for auto exposure. Control parameter pval1 valid exposure value (0 sets the value continuously to max. exposure) Returns the upper limit for auto exposure. Control parameter pval1 returns the current value Sets the speed value for auto gain / auto exposure. Control parameter pval1 defines the control speed (0...100) Returns the speed value for auto gain / auto exposure. Control parameter pval1 returns the current value Sets the hysteresis for auto gain / auto exposure. Control parameter pval1 defines the hysteresis value (default: 2) Returns the hysteresis for auto gain / auto exposure. Control parameter pval1 returns the current value Returns range for the hysteresis value. Control parameter pval1 returns the minimum value pval2 returns the maximum value Sets the number of frames to be skipped for auto gain / auto exposure. Control parameter pval1 defines the number of frames to be skipped (default: 4) Returns the number of frames to be skipped for auto
IS_SET_AUTO_SHUTTER_MAX
IS_GET_AUTO_SHUTTER_MAX
IS_SET_AUTO_SPEED
IS_GET_AUTO_SPEED
IS_SET_AUTO_HYSTERESIS
IS_GET_AUTO_HYSTERESIS
IS_GET_AUTO_HYSTERESIS_RANGE
IS_SET_AUTO_SKIPFRAMES
IS_GET_AUTO_SKIPFRAMES
170
7. 81 Description of Functions.is_SetAutoParameter
gain / auto exposure. Control parameter pval1 returns the current value IS_GET_AUTO_SKIPFRAMES_RANGE Returns range for the number of frames to be skipped. Control parameter pval1 returns the minimum value pval2 returns the maximum value Enables / disables automatic disabling of auto gain / auto exposure **). Control parameter pval1 = 1 enables, 0 disables control Returns the automatic disable status of auto gain / auto exposure **). Control parameter pval1 returns the current value
IS_SET_AUTO_BRIGHTNESS_ONCE
IS_GET_AUTO_BRIGHTNESS_ONCE
Adjust auto white balance IS_SET_AUTO_WB_OFFSET Sets the offset value for the red and blue channels. Control parameter pval1 defines the red level offset (-50...50) pval2 defines the blue level offset (-50...50) Returns the offset value for the red and blue channels. Control parameter pval1 returns the red level offset (-50...50) pval2 returns the blue level offset (-50...50) Sets the gain limits for the auto white balance function. Control parameter pval1 sets the minimum value pval2 sets the maximum value Returns the gain limits for the auto white balance function. Control parameter pval1 returns the minimum value pval2 returns the maximum value Sets the speed value for the auto white balance. Control parameter pval1 defines the control speed (0...100) Returns the speed value for the auto white balance. Control parameter pval1 returns the current value Sets the hysteresis for auto white balance. Control parameter pval1 defines the hysteresis value (default: 2) Returns the hysteresis for auto white balance. Control parameter pval1 returns the current value
IS_GET_AUTO_WB_OFFSET
IS_SET_AUTO_WB_GAIN_RANGE
IS_GET_AUTO_WB_GAIN_RANGE
IS_SET_AUTO_WB_SPEED
IS_GET_AUTO_WB_SPEED
IS_SET_AUTO_WB_HYSTERESIS
IS_GET_AUTO_WB_HYSTERESIS
IS_GET_AUTO_WB_HYSTERESIS_RANGE Returns range for the hysteresis value. Control parameter pval1 returns the minimum value pval2 returns the maximum value IS_SET_AUTO_WB_SKIPFRAMES Sets the number of frames to be skipped for auto
171
white balance. Control parameter pval1 defines the number of frames to be skipped (default: 4) IS_GET_AUTO_WB_SKIPFRAMES Returns the number of frames to be skipped for auto white balance. Control parameter pval1 returns the current value
IS_GET_AUTO_WB_SKIPFRAMES_RANGE Returns range for the number of frames to be skipped. Control parameter pval1 returns the minimum value pval2 returns the maximum value IS_SET_AUTO_WB_ONCE Enables / disables automatic disabling of auto white balance **). Control parameter pval1 = 1 enables, 0 disables control Returns the automatic disable status of auto white balance **). Control parameter pval1 returns the current value
IS_GET_AUTO_WB_ONCE
Pre-defined values for auto gain/auto exposure For parameters pval1 and pval, NULL must be passed. IS_DEFAULT_AUTO_BRIGHT_REFERENCE Default setpoint value for auto gain / exposure IS_MIN_AUTO_BRIGHT_REFERENCE IS_MAX_AUTO_BRIGHT_REFERENCE IS_DEFAULT_AUTO_SPEED IS_MAX_AUTO_SPEED Pre-defined values for auto white balance For parameters pval1 and pval, NULL must be passed. IS_DEFAULT_WB_OFFSET Default value for auto white balance offset IS_MIN_WB_OFFSET IS_MAX_WB_OFFSET IS_DEFAULT_AUTO_WB_SPEED IS_MIN_AUTO_WB_SPEED IS_MAX_AUTO_WB_SPEED pval1 Minimum value for auto white balance offset Maximum value for auto white balance offset Default value for auto white balance speed Minimum value for auto white balance speed Maximum value for auto white balance speed Control parameter, can have a variable value depending on the corresponding auto function (see below) Control parameter, can have a variable value depending on the corresponding auto function (see below) Minimum setpoint value for auto gain / exposure Maximum setpoint value for auto gain / exposure Default value for auto speed Maximum value for auto speed
pval2
*) Not supported by all sensors (see info box above) **) Not available when the sensor's internal controls are activated
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
172
7. 81 Description of Functions.is_SetAutoParameter
Related Functions is_GetAutoInfo() is_SetHardwareGain() is_SetHWGainFactor() is_SetExposureTime() is_SetFrameRate() is_SetAOI() Code Samples //Enable auto gain: double dEnable = 1; int ret = is_SetAutoParameter (hCam ,IS_SET_ENABLE_AUTO_GAIN, &dEnable, 0 ); //Set brightness setpoint value to 128: double nominal = 128; int ret = is_SetAutoParameter (hCam,IS_SET_AUTO_REFERENCE, &nominal, 0); //Return shutter control limit: double maxShutter; int ret = is_SetAutoParameter (hCam, IS_GET_AUTO_SHUTTER_MAX, &maxShutter, 0);
173
7.82
is_SetBadPixelCorrection
INT is_SetBadPixelCorrection (HIDS hCam, INT nEnable, INT threshold) Description is_SetBadPixelCorrection() enables / disables the software correction of sensor hot pixels.
This correction will not work while sub-sampling or binning are enabled or raw Bayer mode is used.
Input Parameters hCam nEnable IS_BPC_DISABLE IS_BPC_ENABLE_SOFTWARE IS_BPC_ENABLE_USER Disables the correction function. Enables software correction based on the hot pixel list stored in the EEPROM. Enables software correction based on user-defined values. First, the is_SetBadPixelCorrectionTable() function must be called. Returns the current mode. Returns the current threshold value. Currently not used Camera handle
Current mode when used in connection with IS_GET_BPC_MODE Current threshold value when used in connection with IS_GET_BPC_THRESHOLD Related Functions is_LoadBadPixelCorrectionTable() is_SaveBadPixelCorrectionTable() is_SetBadPixelCorrectionTable()
174
7. 83 Description of Functions.is_SetBadPixelCorrectionTable
7.83
is_SetBadPixelCorrectionTable
INT is_SetBadPixelCorrectionTable (HIDS hCam, INT nMode, WORD* pList) Description is_SetBadPixelCorrectionTable() can be used to set the table containing the hot pixel positions which will be used by the user-defined hot pixel correction function. You can enable hot pixel correction by calling is_SetBadPixelCorrection(). Each value in the table consists of a 2-byte WORD data type. The first value indicates the number of pixel coordinates in the table, the coordinates are listed subsequently (first X, then Y). A table with 3 hot pixels must be structured as follows: 3 X1 Y1 X2 Y2 X3 Y3
Input Parameters hCam nMode IS_SET_BADPIXEL_LIST Sets a new user-defined list. The pList parameter points to a list which has the format described above. IS_GET_LIST_SIZE IS_GET_BADPIXEL_LIST pList Return Values IS_SUCCESS IS_NO_SUCCESS Number of coordinates in the list when used together with IS_GET_LIST_SIZE Related Functions is_LoadBadPixelCorrectionTable() is_SaveBadPixelCorrectionTable() is_SetBadPixelCorrection() Function executed successfully General error message Returns the number of pixel coordinates included in the userdefined list. Copies the user-defined list to the pList parameter. Make sure to allocate the memory accordingly. Pointer to the starting address of the hot pixel table Camera handle
175
Code Sample WORD *pList = NULL; // Number of coordinates in the list DWORD nCount = is_SetBadPixelCorrectionTable (hCam, IS_GET_LIST_SIZE, NULL); // Allocate memory for the entire list pList = new WORD[ 1 + 2*nCount ]; // Read out list is_SetBadPixelCorrectionTable (hCam, IS_GET_BADPIXEL_LIST, pList); // Release the list again delete [] pList;
176
7. 84 Description of Functions.is_SetBinning
7.84
is_SetBinning
INT is_SetBinning (HIDS hCam, INT mode) Description Using is_SetBinning(), you can enable the binning mode both in horizontal and in vertical direction. This way, the image size in the binning direction can be reduced without scaling down the area of interest. Depending on the sensor used, the sensitivity or the frame rate can be increased while binning is enabled. To enable horizontal and vertical binning at the same time, you can link the horizontal and vertical binning parameters by a logical OR. The adjustable binning factors of each sensor are listed in the Specifications: Sensors chapter of the uEye User Manual.
Some sensors allow a higher pixel clock setting if binning or subsampling has been activated. If you set a higher pixel clock and then reduce the binning/subsampling factors again, the driver will automatically select the highest possible pixel clock for the new settings.
Changes to the image geometry or pixel clock affect the value ranges of the frame rate and exposure time. After executing is_SetBinning(), calling the following functions is recommended in order to keep the defined camera settings: is_SetFrameRate() is_SetExposureTime() If you are using the uEye's flash function: is_SetFlashStrobe()
Input Parameters hCam mode IS_BINNING_DISABLE IS_BINNING_2X_VERTICAL IS_BINNING_3X_VERTICAL IS_BINNING_4X_VERTICAL IS_BINNING_6X_VERTICAL IS_BINNING_2X_HORIZONTAL IS_BINNING_3X_HORIZONTAL IS_BINNING_4X_HORIZONTAL IS_BINNING_6X_HORIZONTAL IS_GET_BINNING IS_GET_BINNING_FACTOR _VERTICAL Disables binning. Enables vertical binning with factor 2. Enables vertical binning with factor 3. Enables vertical binning with factor 4. Enables vertical binning with factor 6. Enables horizontal binning with factor 2. Enables horizontal binning with factor 3. Enables horizontal binning with factor 4. Enables horizontal binning with factor 6. Returns the current setting. Returns the vertical binning factor. Camera handle
177
Returns the horizontal binning factor. Returns the supported binning modes. Indicates whether the camera uses colour-proof binning ( IS_BINNING_COLOR) or not. (IS_BINNING_MONO)
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
Current setting when used together with IS_GET_BINNING IS_GET_BINNING_FACTOR_VERTICAL IS_GET_BINNING_FACTOR_HORIZONTAL When used with IS_GET_BINNING_TYPE When used with IS_GET_SUPPORTED_BINNING Related Functions is_SetSubSampling() is_SetAOI() is_SetImagePos() is_SetPixelClock() Returns IS_BINNING_COLOR if the camera uses colour-proof subsampling; otherwise, IS_BINNING_MONO is returned. Returns the supported subsampling modes linked by logical ORs.
178
7. 85 Description of Functions.is_SetBlCompensation
7.85
is_SetBlCompensation
INT is_SetBlCompensation (HIDS hCam, INT nEnable, INT offset, INT reserved) Description is_SetBlCompensation() enables the black level correction function which might improve the image quality under certain circumstances. By default, the sensor adjusts the black level value for each pixel automatically. If the environment is very bright, it can be necessary to adjust the black level manually. Input Parameters hCam nEnable IS_BL_COMPENSATION_DISABLE IS_BL_COMPENSATION_ENABLE IS_GET_BL_COMPENSATION IS_GET_BL_OFFSET IS_GET_BL_DEFAULT_MODE IS_GET_BL_DEFAULT_OFFSET IS_GET_BL_SUPPORTED_MODE Disables automatic compensation. Enables black level compensation using the value specified in the offset parameter. Returns the current mode. Returns the current offset value. Returns the default mode. Returns the default offset value. Returns the supported modes. Possible values: IS_BL_COMPENSATION_ENABLE The sensor used supports black level compensation. IS_BL_COMPENSATION_OFFSET For the sensor used, it is possible to set the offset of both the automatic and the manual black level compensation. IS_IGNORE_PARAMETER offset IS_IGNORE_PARAMETER reserved The nEnable parameter is ignored. Contains the offset value used for compensation. Valid values are between 0 and 255. The offset parameter is ignored. Reserved. 0 must be passed. Camera handle
179
Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
Current setting when used together with IS_GET_BL_COMPENSATION Current offset when used together with IS_GET_BL_OFFSET
180
7. 86 Description of Functions.is_SetCameraID
7.86
is_SetCameraID
INT is_SetCameraID (HIDS hCam, INT nID) Description Using is_SetCameraID(), you can assign a unique camera ID to a camera. Thus, it is possible to access the camera directly with the is_InitCamera() function. The camera ID is stored in the non-volatile memory of the camera. The factory default camera ID is 1. The camera ID can also be changed in the Camera Manager. Input Parameters hCam nID 1...254 IS_GET_CAMERA_ID Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message New camera ID Returns the current ID. Camera handle
Current ID when used together with IS_GET_CAMERA_ID Related Functions is_InitCamera() is_GetCameraInfo() is_CameraStatus()
181
7.87
is_SetCameraLUT
GigE
GigE
Syntax INT is_SetCameraLUT (HIDS hCam, UINT Mode, UINT NumberOfEntries, double* pRed_Grey, double* pGreen, double* pBlue) Description Using is_SetCameraLUT(), you can enable a hardware LUT for GigE uEye HE cameras. This LUT which will be applied to the image in the camera. A number of predefined LUTs are available. Alternatively, you define your own LUT. It is possible to define a LUT without enabling it at the same time. You can query the current LUT used by the camera by calling the is_GetCameraLUT() function. Each look-up table (LUT) for the uEye contains modification values for the image brightness and contrast parameters. When a LUT is used, each brightness value in the image will be replaced by a value from the table. LUTs are typically used to enhance the image contrast or the gamma curve. The values must be in the range between 0.0 and 1.0. A linear LUT containing 64 equidistant values between 0.0 and 1.0 has no effect on the image. For further information, please refer to the Camera Basics: LUT chapter of the uEye User Manual.
The is_SetCameraLUT() function is only supported by cameras of the GigE uEye series.
Input Parameters hCam Mode IS_CAMERA_LUT_IDENTITY IS_CAMERA_LUT_NEGATIV IS_CAMERA_LUT_GLOW1 IS_CAMERA_LUT_GLOW2 IS_CAMERA_LUT_ASTRO1 IS_CAMERA_LUT_RAINBOW1 IS_CAMERA_LUT_MAP1 IS_CAMERA_LUT_COLD_HOT IS_CAMERA_LUT_SEPIC IS_CAMERA_LUT_ONLY_RED IS_CAMERA_LUT_ONLY_GREEN IS_CAMERA_LUT_ONLY_BLUE IS_SET_CAMERA_LUT_VALUES Camera handle These modes can be linked by a logical OR. Predefined LUT, linear LUT, no image modifications Predefined LUT, inverts the image. Predefined LUT, false-colour display of the image Predefined LUT, false-colour display of the image Predefined LUT, false-colour display of the image Predefined LUT, false-colour display of the image Predefined LUT, false-colour display of the image Predefined LUT, false-colour display of the image Predefined LUT, uses sepia toning for colouring the image. Predefined LUT, shows only the red channel of the image. Predefined LUT, shows only the green channel of the image. Predefined LUT, shows only the blue channel of the image. Applies the LUT values.
182
7. 87 Description of Functions.is_SetCameraLUT
IS_ENABLE_CAMERA_LUT
Enables the LUT. If no other LUT has been defined, the system sets the linear LUT as specified by IS_CAMERA_LUT_IDENTITY. The camera converts a colour image to a greyscale image. Indicates the number of knee points used. Defines a LUT with 64 knee points. This results in 32 sections with a start and end point each. Array containing the values for the LUT red channel or the LUT greyscale channel (GigE uEye SE cameras). Array containing the values for the LUT green channel. Array containing the values for the LUT blue channel.
IS_ENABLE_RGB_GRAYSCALE NumberOfEntries IS_CAMERA_LUT_64 pRed_Grey pGreen pBlue Structure of the Knee Point Arrays
The Red_Grey, Green and Blue arrays contain double values between 0.0 and 1.0. The array size must correspond exactly to the value predefined by NumberOfEntries (64 or 128). For monochrome cameras, the Green and Blue parameters are ignored. The GigE uEye SE color and monochrome cameras ignore the Green and Blue parameters. GigE uEye HE cameras use all three parameters: Red_Grey, Green and Blue. If you set all three parameters to the same value for GigE uEye HE monochrome cameras, the LUT curve creates a monochrome output image. Assigning different values to the three parameters will result in false-color representation.
Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Related Functions is_GetCameraLUT() Code Sample //Enable the latest LUT set INT nRet; nRet = is_SetCameraLUT (hCam, IS_ENABLE_CAMERA_LUT, IS_CAMERA_LUT_64, NULL, NULL, NULL) //Set the LUT default "Glow1" and enable it INT nRet; double Red[IS_CAMERA_LUT_64]; double Green[IS_CAMERA_LUT_64]; double Blue[IS_CAMERA_LUT_64]; Function executed successfully General error message This function is not supported by the current camera.
183
Programming Manual uEye Software Development Kit V3.40 nRet = is_SetCameraLUT (hCam, IS_ENABLE_CAMERA_LUT | IS_SET_CAMERA_LUT_VALUES | IS_CAMERA_LUT_GLOW1, IS_CAMERA_LUT_64, &Red, &Green, &Blue );
184
7. 88 Description of Functions.is_SetColorConverter
7.88
is_SetColorConverter
INT is_SetColorConverter (HIDS hCam, INT ColorMode, INT ConvertMode) Description Using is_SetColorConverter, you can select the type of Bayer conversion for colour cameras. Software conversion is done on the PC, while hardware conversion (Gigabit Ethernet uEye only) is done in the camera. The use of a larger filter mask results in a higher image quality, but increases the computational load. For further information, please refer to the Camera Basics: Colour Filters chapter of the uEye User Manual.
While free run mode is active, you cannot change the colour conversion type. To do so, you must first stop the capturing process using is_StopLiveVideo() or set the camera to trigger mode (see also is_SetExternalTrigger()).
Input Parameters hCam ColorMode Camera handle Colour mode for which the converter is to be set. For a list of all available colour formats and the associated input parameters, see the Appendix: Colour and Memory Formats section. ConvertMode Conversion mode selection
IS_CONV_MODE_SOFTWARE_3X3 Software conversion using a 3x3 filter mask (default) IS_CONV_MODE_SOFTWARE_5X5 Software conversion using a 5x5 filter mask IS_CONV_MODE_HARDWARE_3X3 Hardware conversion using a 3x3 filter mask (Gigabit Ethernet uEye only) Return Values IS_SUCCESS IS_NO_SUCCESS IS_CAPTURE_RUNNING IS_INVALID_PARAMETER IS_INVALID_COLOR_FORMAT Function executed successfully General error message This function cannot be executed since the camera is currently in live operation The ConvertMode parameter is invalid or not supported The ColorMode parameter is invalid or not supported
185
186
7. 89 Description of Functions.is_SetColorCorrection
7.89
is_SetColorCorrection
INT is_SetColorCorrection (HIDS hCam, INT nEnable, double* factors) Description For colour cameras, is_SetColorCorrection() enables colour correction in the uEye driver. This enhances the rendering of colours for cameras with colour sensors. Colour correction is a digital correction based on a colour matrix which is adjusted individually for each sensor. If you perform Bayer conversion for GigE uEye HE colour cameras in the camera itself, colour conversion will automatically also take place in the camera.
After changing this parameter, perform manual or automatic white balancing in order to obtain correct colour rendering (see also is_SetAutoParameter()).
Input Parameters hCam nEnable IS_CCOR_ENABLE_NORMAL Enables simple colour correction. This parameter replaces IS_CCOR_ENABLE. Camera handle
IS_CCOR_ENABLE_BG40_ENHANCED Enables colour correction for cameras with optical IR filter glasses of the BG40 type. IS_CCOR_ENABLE_HQ_ENHANCED Enables colour correction for cameras with optical IR filter glasses of the HQ type. IS_CCOR_DISABLE IS_GET_CCOR_MODE Disables colour correction. Returns the current setting.
IS_GET_SUPPORTED_CCOR_MODE Returns all supported colour correction modes. See the Return Values section. IS_GET_DEFAULT_CCOR_MODE factors Returns the default colour correction mode. Currently not used
187
Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_CCOR_MODE When used together with When used for colour cameras and together with IS_GET_SUPPORTED_CCOR_MODEIS_GET_SUPPORTED_CCOR_MODE, this parameter returns the supported values linked by a logical OR: IS_CCOR_ENABLE_NORMAL IS_CCOR_ENABLE_BG40_ENHANCED IS_CCOR_ENABLE_HQ_ENHANCED When used for monochrome cameras, the system returns 0. When used together with IS_GET_DEFAULT_CCOR_MODE When used for colour cameras and together with IS_GET_DEFAULT_CCOR_MODE, this parameter returns the default colour correction mode: IS_CCOR_ENABLE_NORMAL IS_CCOR_ENABLE_HQ_ENHANCED. When used for monochrome cameras, the system returns 0. Related Functions is_SetColorConverter() is_SetColorMode() is_SetAutoParameter() Function executed successfully General error message
188
7. 90 Description of Functions.is_SetColorMode
7.90
is_SetColorMode
INT is_SetColorMode (HIDS hCam, INT Mode) Description is_SetColorMode() sets the colour mode to be used when image data are saved or displayed by the graphics card. For this purpose, the allocated image memory must be large enough to accommodate the data with the selected colour mode. When images are transferred directly to the graphics card memory, make sure that the display settings match the colour mode settings. Otherwise, the images will be displayed with altered colours or are not clearly visible.
For the RGB16 and RGB15 data formats, the MSBs of the internal 8-bit R, G and B colours are used.
Input Parameters hCam Mode Camera handle Colour mode to be set For a list of all available colour formats and the associated input parameters, see the Appendix: Colour and Memory Formats section. IS_CM_BAYER_RG16 IS_CM_BAYER_RG12 IS_CM_BAYER_RG8 IS_CM_MONO16 IS_CM_MONO12 IS_CM_MONO8 IS_CM_RGB10V2_PACKED IS_CM_RGBA8_PACKED IS_CM_RGBY8_PACKED IS_CM_RGB8_PACKED IS_CM_BGR10V2_PACKED IS_CM_BGRA8_PACKED IS_CM_BGR8_PACKED IS_CM_BGRY8_PACKED Raw Bayer (16) Raw Bayer (12) Raw Bayer (8) Greyscale (16) Greyscale (12) Greyscale (8) RGB30 (10 10 10) RGB32 (8 8 8) RGBY (8 8 8 8) RGB24 (8 8 8) BGR30 (10 10 10) BGR32 (8 8 8) BGR24 (8 8 8) BGRY (8 8 8)
189
IS_CM_BGR565_PACKED IS_CM_BGR555_PACKED IS_CM_UYVY_PACKED IS_CM_UYVY_MONO IS_CM_UYVY_BAYER IS_CM_CBYCRY_PACKED IS_GET_COLOR_MODE Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_COLOR_MODE Related Functions is_SetDisplayMode() is_SetColorConverter() is_SetColorCorrection() is_GetColorDepth() is_AllocImageMem()
BGR16 (5 6 5) BGR15 (5 5 5) UYVY (8 8 8 8) UYVY (8 8 8 8) UYVY (8 8 8 8) CbYCrY (8 8 8 8) Returns the current setting.
190
7. 91 Description of Functions.is_SetConvertParam
7.91
is_SetConvertParam
INT is_SetConvertParam (HIDS hCam, BOOL ColorCorrection, INT BayerConversionMode, INT ColorMode, INT Gamma, double* WhiteBalanceMultipliers) Description Using is_SetConvertParam(), you can set the parameters for converting a raw Bayer image to a colour image. To convert the image, use the is_ConvertImage() function. Input Parameters hCam ColorCorrection BayerConversionMode IS_SET_BAYER_CV_BETTER IS_SET_BAYER_CV_BEST ColorMode Camera handle Enables / disables colour correction. Sets the Bayer conversion mode. Better quality Optimum quality (higher CPU load) Sets the colour mode for the output image. For a list of all available colour formats and the associated input parameters, see the Appendix: Colour and Memory Formats section. Gamma WhiteBalanceMultipliers Gamma value multiplied by 100. Range: [11000] Pointer to an array containing the red, green and blue gain values
Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_COLOR_FORMAT IS_INVALID_PARAMETER Related Functions is_ConvertImage() is_SetColorMode() is_SetColorConverter() Function executed successfully General error message Invalid ColorMode parameter Other invalid parameter.
191
Code Sample Conversion of a raw Bayer image to RGB24. The memory is allocated automatically. INT nRet; char * pcSource; INT nIDSource; INT nX,nY,nBits,nPitch; // Create raw Bayer test image is_AllocImageMem (hCam, 256, 256, 8, &pcSource, &nIDSource); is_InquireImageMem (hCam, pcSource, nIDSource, &nX ,&nY, &nBits, &nPitch); for (int j = 0; j<nY; j++) { for (int i = 0; i<nX; i++) { pcSource[i + j * nPitch] = i; } } // Define conversion parameters (example) INT Gamma = 120; double rgbGains[3]; rgbGains[0] = 1.0 ; // Red channel gain rgbGains[1] = 3.0 ; // Green channel gain rgbGains[2] = 1.0 ; // Blue channel gain char* pcDest; // Pointer to the newly allocated image memory INT nIDDest; // ID of the newly allocated image memory
// Set conversion parameters nRet = is_SetConvertParam(hCam, TRUE, IS_SET_BAYER_CV_BETTER, IS_SET_CM_RGB24, Gamma, rgbGains); // Convert image if (nRet == IS_SUCCESS) { pcDest = NULL; is_ConvertImage(hCam, pcSource, nIDSource, &pcDest, &nIDDest, 0); } // Release allocated image memory is_FreeImageMem (hCam, pcSource, nIDSource); is_FreeImageMem (hCam, pcDest, nIDDest);
192
7. 92 Description of Functions.is_SetDisplayMode
7.92
is_SetDisplayMode
INT is_SetDisplayMode (HIDS hCam, INT Mode) Description Using is_SetDisplayMode(), you can set the way in which images will be displayed on the screen. For live videos including overlays, you can use the Direct3D mode. This mode is not supported by all graphics cards. The graphics card must have sufficient extended memory because Direct3D mode requires additional memory up to the size needed for the current screen resolution. For further information on the display modes of the uEye camera, see the Function Blocks: Image Display section.
We recommend that you call the following functions exclusively from a single thread in order to avoid unpredictable behaviour of the application.
Input Parameters hCam Mode IS_SET_DM_DIB Captures an image in system memory (RAM). Using is_RenderBitmap(), you can define the image display (default). Image display in Direct3D mode Monochrome image display in Direct3D mode Returns the current setting. Camera handle
193
The new Direct3D mode completely replaces the BackBuffer and Overlay Surface display modes from DirectDraw. It is advisable not to use these modes any longer (see also Obsolete Functions). To activate the obsolete modes, do the following: Mode IS_SET_DM_DIRECTDRAW | IS_SET_DM_BACKBUFFER IS_SET_DM_DIRECTDRAW | IS_SET_DM_ALLOW_OVERLAY IS_SET_DM_ALLOW_SCALING Image display in DirectDraw BackBuffer mode Image display in DirectDraw Overlay Surface mode Real-time scaling in Overlay Surface mode
Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_DISPLAY_MODE Related Functions is_RenderBitmap() is_SetColorMode() is_DirectRenderer() Code Sample is_SetDisplayMode (hCam, Mode); //Bitmap mode (images are digitised and stored in system memory): Mode = IS_SET_DM_DIB //Direct3D mode Mode = IS_SET_DM_DIRECT3D Sample Programs uEyeOvl (C++) uEye VB Simple Demo (VB6) Function executed successfully General error message
194
7. 93 Description of Functions.is_SetDisplayPos
7.93
is_SetDisplayPos
INT is_SetDisplayPos (HIDS hCam, INT x, INT y) Description is_SetDisplayPos() allows you to move an area of interest when rendering images using is_RenderBitmap(). This does not alter the image memory contents. Input Parameters hCam x y Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetImagePos() is_SetAOI() is_RenderBitmap() is_SetDisplayMode() Function executed successfully General error message Camera handle Offset in x direction Offset in y direction
195
7.94
is_SetEdgeEnhancement
INT is_SetEdgeEnhancement (HIDS hCam, INT nEnable) Description is_SetEdgeEnhancement() enables a software edge filter. Due to Bayer format colour conversion, the original edges of a colour image may easily become blurred. By enabling the digital edge filter, you can optimise edge representation. This function causes a higher CPU load. If you perform Bayer conversion for GigE uEye HE colour cameras in the camera itself, edge enhancement will automatically also take place in the camera. In this case, the CPU load will not increase. Input Parameters hCam nEnable IS_EDGE_EN_DISABLE IS_EDGE_EN_STRONG IS_EDGE_EN_WEAK IS_GET_EDGE_ENHANCEMENT Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_EDGE_ENHANCEMENT Related Functions is_SetColorMode() is_SetColorConverter() Function executed successfully General error message Disables the edge filter. Enables strong edge enhancement. Enables weaker edge enhancement. Returns the current setting. Camera handle
196
7. 95 Description of Functions.is_SetErrorReport
7.95
is_SetErrorReport
INT is_SetErrorReport (HIDS hCam, INT Mode) Description Using is_SetErrorReport(), you can enable / disable error event logging. If error reporting is enabled, errors will automatically be displayed in a dialogue box. Cancelling the dialogue box disables the error report. Even with disabled error reporting, you can still query errors using the is_GetError () function.
Input Parameters hCam Mode IS_DISABLE_ERR_REP IS_ENABLE_ERR_REP Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_ERR_REP_MODE Related Functions is_GetError() is_GetCaptureErrorInfo() is_CameraStatus() Function executed successfully General error message Disables error reporting. Enables error reporting. Camera handle or 0 if no camera has been initialised yet
197
7.96
is_SetExposureTime
INT is_SetExposureTime (HIDS hCam, double EXP, double* newEXP) Description Using is_SetExposureTime(), you can set the exposure time (in milliseconds). Since this value depends on the sensor timing, the exposure time actually used may slightly deviate from the value set here. The actual exposure time is returned by the newEXP parameter. In free-running mode (is_CaptureVideo()), any modification of the exposure time will only become effective when the next image but one is captured. In trigger mode (is_SetExternalTrigger()), the modification will be applied to the next image. For minimum and maximum exposure times as well as other sensor-based dependencies, please refer to the Sensors section of the Specifications chapter in the uEye User Manual.
Newer driver versions sometimes allow an extended value range for the exposure time setting. We recommend to query the value range every time and set the exposure time explicitly.
The use of the following functions will affect the exposure time:
is_SetPixelClock() is_SetOptimalCameraTiming() is_SetFrameRate() (if the new image duration is shorter that the exposure time) is_SetAOI() (if the image size is changed) is_SetSubSampling() is_SetBinning()
Changes made to the window size, the frame rate or the read-out timing (pixel clock frequency) also affect the defined exposure time. For this reason, you need to call is_SetExposureTime() again after such changes.
Input Parameters hCam EXP Camera handle New desired exposure time For EXP=0.0, the exposure time is 1/frame rate. IS_GET_EXPOSURE_TIME IS_GET_DEFAULT_EXPOSURE Returns the current exposure time in the newEXP parameter. Returns the default exposure time.
IS_SET_ENABLE_AUTO_SHUTTER Enables the auto exposure function. newEXP Returns the exposure time actually set.
198
7. 96 Description of Functions.is_SetExposureTime
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetExposureRange() is_SetFrameRate() is_SetPixelClock() is_SetOptimalCameraTiming() is_SetAutoParameter() is_SetHardwareGain() Function executed successfully General error message
199
7.97
is_SetExternalTrigger
INT is_SetExternalTrigger (HIDS hCam, INT nTriggerMode) Description Using is_SetExternalTrigger(), you can activate the trigger mode. If the camera is in standby mode, it quits this mode and activates trigger mode. In hardware trigger mode, image capture is delayed for each function call until the selected trigger event has occurred. In software trigger mode, an image is captured immediately when is_FreezeVideo() is called, or a continuous triggered capture is started when is_CaptureVideo() is called. In hardware trigger mode, you can use the is_ForceTrigger() command to trigger an image capture even if no electric signal is present. When you disable the trigger functionality, you can statically query the signal level at the trigger input. This option causes the camera to change to freerun mode. For further information on the image capture modes of the uEye camera, see the Function Blocks: Image Capture section.
For hardware reasons, the board-level versions of the USB uEye LE cameras can only be triggered on the falling edge.
Input Parameters hCam nTriggerMode IS_SET_TRIGGER_OFF IS_SET_TRIGGER_HI_LO IS_SET_TRIGGER_LO_HI Camera handle Trigger mode Off Hardware trigger Hardware trigger Trigger event Falling signal edge Rising signal edge
IS_SET_TRIGGER_HI_LO_SYNC Freerun sync./hardware Falling signal edge trigger *) IS_SET_TRIGGER_LO_HI_SYNC Freerun sync./hardware Rising signal edge trigger *) IS_SET_TRIGGER_SOFTWARE Software trigger Call of is_FreezeVideo() (single frame mode) Call of is_CaptureVideo() (continuous mode) IS_GET_EXTERNALTRIGGER IS_GET_TRIGGER_STATUS Returns the trigger mode setting Returns the current signal level at the trigger input
200
7. 97 Description of Functions.is_SetExternalTrigger
*) The freerun synchronisation mode is currently only supported by the UI-146x-C and UI-546x-C models.
Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_EXTERNALTRIGGER When used with IS_GET_TRIGGER_STATUS When used with IS_GET_SUPPORTED_TRIGGER_MODE Related Functions is_CaptureVideo() is_FreezeVideo() is_ForceTrigger() is_SetTriggerCounter() is_SetTriggerDelay() is_SetFlashStrobe() Code Sample //Enable trigger mode and set high-active flash mode. is_SetExternalTrigger (hCam, IS_SET_TRIGGER_SOFTWARE); is_SetFlashStrobe (hCam, IS_SET_FLASH_HI_ACTIVE, 0); is_FreezeVideo (hCam, IS_WAIT); Sample Programs uEyeTrigger (C++) uEyeIO (C++) Returns the current signal level at the trigger input Returns the supported modes linked by logical ORs Function executed successfully General error message
201
7.98
is_SetFlashDelay
INT is_SetFlashDelay (HIDS hCam, ULONG ulDelay, ULONG ulDuration) Description is_SetFlashDelay() sets a delay for driving the flash output. In addition, you can specify the flash duration. This allows the implementation of a global flash functionality which exposes all rows of a rolling shutter sensor. In addition, it is possible, for a camera with global shutter sensors, to set the flash start in free-run mode to the start time of the exposure window. For further information, please refer to the Digital Output (Flash/Strobe) and Shutter Methods sections of the uEye User Manual. Input Parameters hCam ulDelay IS_GET_FLASH_DELAY IS_GET_FLASH_DURATION IS_GET_MIN_FLASH_DELAY IS_GET_MIN_FLASH_DURATION IS_GET_MAX_FLASH_DELAY IS_GET_MAX_FLASH_DURATION Camera handle Time by which the flash start is delayed (in s), default = 0 Returns the currently set delay time. Returns the currently set flash duration. Returns the minimum value for the delay. Returns the minimum value for the flash duration. Returns the maximum value for the delay. Returns the maximum value for the flash duration.
IS_GET_FLASH_DELAY_GRANULARITY Returns the increment of the adjustable delay time. IS_GET_FLASH_DURATION_GRANULARITY Returns the increment of the adjustable flash duration. ulDuration Time during which the flash is on (in s). If 0 is passed, the flash output will be active until the end of the exposure time. Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_FLASH_DELAY IS_GET_FLASH_DURATION Related Functions is_SetFlashStrobe() is_GetGlobalFlashDelays() is_SetExternalTrigger() Function executed successfully General error message
202
203
7.99
is_SetFlashStrobe
INT is_SetFlashStrobe (HIDS hCam, INT nMode, INT nLine) Description is_SetFlashStrobe() enables / disables the flash output of the uEye camera. In addition, you can set the active level (high or low). By default, the strobe is set to high-active. Alternatively, the strobe output can be used statically as a digital output. You can set the duration of the flash and the flash delay using the is_SetFlashDelay() function. In order to obtain precise synchronization of flash output and exposure time, we recommend to use the values returned by the is_GetGlobalFlashDelays() function for flash delay and duration. When you are using the uEye's flash function, you need to re-enable the flash (i.e. disable and then activate it again) whenever you change the pixel clock setting or horizontal image geometry. This is necessary to newly synchronise the internal timing settings of the flash output with the start of sensor exposure.
Input Parameters hCam nMode IS_SET_FLASH_OFF IS_SET_FLASH_LO_ACTIVE IS_SET_FLASH_HI_ACTIVE Disables the strobe output. Sets the strobe output to low-active (trigger mode only). Sets the strobe output to high-active (trigger mode only). Camera handle
IS_SET_FLASH_LO_ACTIVE_FREERUN Sets the strobe output to low-active (freerun mode only). IS_SET_FLASH_HI_ACTIVE_FREERUN Sets the strobe output to high-active (freerun mode only). IS_SET_FLASH_HIGH IS_SET_FLASH_LOW IS_GET_FLASHSTROBE_MODE IS_SET_FLASH_IO_1 IS_SET_FLASH_IO_2 IS_GET_SUPPORTED_FLASH_IO nLine Sets the strobe output statically to high. Sets the strobe output statically to low. Returns the current mode. Flash enabled on I/O port 1 Flash enabled on I/O port 2 Returns the supported flash-enabled I/O ports Currently not used.
204
7. 99 Description of Functions.is_SetFlashStrobe
Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_FLASHSTROBE_MODE When used with IS_GET_FLASHSTROBE_MODE Related Functions is_SetFlashDelay() is_SetTriggerDelay() is_GetGlobalFlashDelays() is_SetExternalTrigger() is_CaptureVideo() Code Sample //Enable trigger mode and set high-active flash mode. is_SetExternalTrigger (hCam, IS_SET_TRIGGER_SOFTWARE); is_SetFlashStrobe (hCam, IS_SET_FLASH_HI_ACTIVE, 0); is_FreezeVideo (hCam, IS_WAIT); Sample Programs uEyeFlashStrobe (C++) uEyeIO (C++) The system returns the supported modes linked by a logical OR. Function executed successfully General error message
205
7.100 is_SetFrameRate
INT is_SetFrameRate (HIDS hCam, double FPS, double* newFPS) Description Using is_SetFrameRate(), you can set the sensor frame rate in freerun mode (live mode). Since this value depends on the sensor timing, the exposure time actually used may slightly deviate from the value set here. After you have called the function, the actual frame rate is returned through the newFPS parameter. If the frame rate is set too high, it might not be possible to transfer every single frame. In this case, the effective frame rate may vary from the set value. For minimum and maximum frame rates as well as other sensor-based dependencies, please refer to the Sensors section of the Specifications chapter in the uEye User Manual.
The use of the following functions will affect the frame rate:
is_SetPixelClock() is_SetOptimalCameraTiming() is_SetAOI() (if the image size is changed) is_SetSubSampling() is_SetBinning()
Changes made to the window size or the read-out timing (pixel clock frequency) also affect the defined frame rate . For this reason, you need to call is_SetFrameRate() again after such changes.
Newer driver versions sometimes allow an extended value range for the frame rate setting. We recommend to query the value range every time and set the frame rate explicitly. Changes to the frame rate affect the value ranges of the exposure time. After executing is_SetFrameRate(), calling the function is_SetExposureTime() is recommended in order to keep the defined camera settings.
Input Parameters hCam FPS IS_GET_FRAMERATE IS_GET_DEFAULT_FRAMERATE newFPS Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message Camera handle Desired frame rate in frames per second (fps) Only returns the current frame rate in the newFPS parameter. Returns the default frame rate. Returns the frame rate actually set.
206
Related Functions is_GetFramesPerSecond() is_GetFrameTimeRange() is_SetPixelClock() is_SetOptimalCameraTiming() is_SetExposureTime() is_SetAutoParameter() is_SetAOI() is_SetSubSampling() is_SetBinning() is_CaptureVideo()
207
7.101 is_SetGainBoost
INT is_SetGainBoost (HIDS hCam, INT mode) Description In some cameras, is_SetGainBoost() enables an additional analogue hardware gain boost feature on the sensor. Input Parameters hCam mode IS_GET_GAINBOOST IS_SET_GAINBOOST_ON IS_SET_GAINBOOST_OFF Returns the current state of the gain boost function. Enables the gain boost function. Disables the gain boost function. Camera handle
IS_GET_SUPPORTED_GAINBOOST Indicates whether the camera supports a gain boost feature or not. Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
Current setting when used together with Returns IS_NOT_SUPPORTED if the camera does not IS_GET_GAINBOOST support a gain boost feature. Current setting when used together with Returns IS_SET_GAINBOOST_ON if the function is IS_GET_SUPPORTED_GAINBOOSTsupported, otherwise it returns IS_SET_GAINBOOST_OFF. Related Functions is_SetHardwareGain() is_SetHWGainFactor() is_SetAutoParameter()
208
7.102 is_SetGamma
INT is_SetGamma (HIDS hCam, INT nGamma) Description is_SetGamma() sets the value for digital gamma correction (brighten dark image portions by applying a non-linear characteristic (LUT)). Valid values are in the range between 0.01 and 10. Input Parameters hCam nGamma Camera handle Gamma value to be set, multiplied by 100 (Range: 11000. Default = 100, corresponds to a gamma value of 1.0) Returns the current setting.
IS_GET_GAMMA Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_GAMMA Related Functions is_SetHardwareGamma()
209
7.103 is_SetGlobalShutter
INT is_SetGlobalShutter (HIDS hCam, INT mode) Description is_SetGlobalShutter() enables the Global Start shutter function on some sensors. For further information on the Global Start shutter mode, please refer to the Camera Basics: Shutter Methods chapter of the uEye User Manual.
The Global Start shutter function is only supported in trigger mode (see also is_SetExternalTrigger ()).
Input Parameters hCam mode IS_GET_GLOBAL_SHUTTER IS_SET_GLOBAL_SHUTTER_ON Returns the current mode or IS_NOT_SUPPORTED if the camera does not support this function. Enables Global Start shutter mode. Camera handle
IS_SET_GLOBAL_SHUTTER_OFF Disables Global Start shutter mode. IS_GET_SUPPORTED_GLOBAL_SHUTTER whether the connected camera supports the Global Indicates Start shutter or not. Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_GLOBAL_SHUTTER When used together with Returns IS_SET_GLOBAL_SHUTTER_ON if this function is IS_GET_SUPPORTED_GLOBAL_SHUTTER supported. Otherwise, it returns IS_SET_GLOBAL_SHUTTER_OFF. Related Functions is_GetGlobalFlashDelays() is_SetExternalTrigger() is_SetFlashStrobe() Function executed successfully General error message
210
7.104 is_SetHardwareGain
INT is_SetHardwareGain (HIDS hCam, INT nMaster, INT nRed, INT nGreen, INT nBlue) Description is_SetHardwareGain() controls the sensor gain channels. These can be set between 0% and 100% independently of of each other. The actual gain factor obtained for the value 100% depends on the sensor and is specified in the Specifications: Sensors chapter of the uEye User Manual. You can use the is_GetSensorInfo() function to query the available gain controls. Depending on the time when the gain settings are changed, these changes might only become effective when the next image is captured.
Enabling hardware gain increases not only the image brightness, but also the image noise. We recommend to use gain values below 50 for normal operation.
The default setting values for the red, green and blue channel gain factors depend on the colour correction matrix that has been set. If you select a different colour correction matrix, the returned default values might change (see also is_SetColorCorrection()).
Input Parameters hCam nMaster IS_IGNORE_PARAMETER IS_GET_MASTER_GAIN IS_GET_RED_GAIN IS_GET_GREEN_GAIN IS_GET_BLUE_GAIN IS_GET_DEFAULT_MASTER IS_GET_DEFAULT_RED IS_GET_DEFAULT_GREEN IS_GET_DEFAULT_BLUE IS_SET_ENABLE_AUTO_GAIN Camera handle Sets the overall gain factor (0...100). The master gain factor will not be changed. Returns the master gain factor. Returns the red channel gain factor. Returns the green channel gain factor. Returns the blue channel gain factor. Returns the default master gain factor. Returns the default red channel gain factor. Returns the default green channel gain factor. Returns the default blue channel gain factor. Enables the auto gain functionality (see also is_SetAutoParameter()). You can disable the auto gain functionality by setting a value for nMaster. Sets the red channel gain factor (0...100). The channel gain factor will not be changed. Sets the green channel gain factor (0...100).
211
IS_IGNORE_PARAMETER nBlue IS_IGNORE_PARAMETER Return Values IS_SUCCESS IS_NO_SUCCESS Current setting When used together with IS_GET_MASTER_GAIN IS_GET_RED_GAIN IS_GET_GREEN_GAIN IS_GET_BLUE_GAIN IS_INVALID_MODE Related Functions is_SetHWGainFactor() is_GetSensorInfo() is_SetGainBoost() is_SetAutoParameter()
The green channel gain factor will not be changed. Sets the blue channel gain factor (0...100). The blue channel gain factor will not be changed.
212
7.105 is_SetHardwareGamma
INT is_SetHardwareGamma (HIDS hCam, INT nMode) Description is_SetHardwareGamma() enables the hardware gamma control feature of the camera.
The is_SetHardwareGamma() function is only supported by cameras of the GigE uEye series.
Input Parameters hCam nMode IS_GET_HW_SUPPORTED_GAMMA Indicates whether the camera supports hardware gamma control or not. IS_SET_HW_GAMMA_ON IS_SET_HW_GAMMA_OFF IS_GET_HW_GAMMA Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Current setting when used together with IS_GET_HW_GAMMA IS_SET_HW_GAMMA_ON When used together with IS_GET_HW_SUPPORTED_GAMMA The camera supports gamma control. IS_SET_HW_GAMMA_OFF The camera does not support gamma control. Related Functions is_SetGamma() Function executed successfully General error message Unsupported sensor Enables the gamma control feature. Disables gamma control. Returns the current state of gamma control. Camera handle
213
7.106 is_SetHdrKneepoints
INT is_SetHdrKneepoints (HIDS hCam, KNEEPOINTARRAY* KneepointArray, INT KneepointArraySize) Description Using is_SetHdrKneepoints(), you can define settings for the HDR mode (High Dynamic Range) which is supported by some sensors. You can enable / disable HDR mode by calling is_EnableHdr (). For further information on HDR mode, please refer to the Properties section of the uEye Demo chapter in the uEye User Manual. Input Parameters hCam KneepointArray Camera handle Pointer to a field (see below).
Contents of the KNEEPOINTARRAY Field INT NumberOfUsedKneepoints KNEEPOINT Kneepoint[10] Contents of the KNEEPOINT Structure double x double y Knee point x value Knee point y value Number of knee points used. Knee point
The x value of a knee point indicates the first phase of the currently set exposure time (in %). The y value indicates the proportion of maximum pixel intensity in percent. If two knee points are used, you can set two phases in which the images will not be exposed. This means that two corresponding times will be set on the x-axis. For instance, the effects of setting x = 60, y = 80 would be as follows: The first exposure phase takes up 60% of the set exposure time. In this first exposure phase, all pixels are exposed up to a maximum of 80% of the maximum pixel intensity and remain at 80% until this phase is over. In the second exposure phase, they are exposed again and may reach the full pixel intensity. Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Function executed successfully General error message Unsupported sensor
214
Related Functions is_EnableHdr() is_GetHdrMode() is_GetHdrKneepointInfo() is_GetHdrKneepoints() Sample Programs uEyeC# Hdr Demo (C#) uEye VB Hdr Demo (VB6)
215
7.107 is_SetHWGainFactor
INT is_SetHWGainFactor (HIDS hCam, INT nMode, INT nFactor) Description is_SetHWGainFactor() uses gain factors to control sensor gain channels. These channels can be set independently of each other. The is_SetHardwareGain() does not use factors for setting the gain channels, but standardised values between 0 and 100. The actual gain factor is sensor-dependent and can be found in the Sensors section of the Specifications chapter in the uEye User Manual . You can use the is_GetSensorInfo() function to query the available gain controls. Depending on the time when the gain settings are changed, these changes might only become effective when the next image is captured. Input Parameters hCam nMode IS_GET_MASTER_GAIN_FACTOR IS_GET_RED_GAIN_FACTOR IS_GET_GREEN_GAIN_FACTOR IS_GET_BLUE_GAIN_FACTOR IS_SET_MASTER_GAIN_FACTOR IS_SET_RED_GAIN_FACTOR IS_SET_GREEN_GAIN_FACTOR IS_SET_BLUE_GAIN_FACTOR Returns the master gain factor. Returns the red channel gain factor. Returns the green channel gain factor. Returns the blue channel gain factor. Sets the master gain factor. Sets the red channel gain factor. Sets the green channel gain factor. Sets the blue channel gain factor. Camera handle
IS_GET_DEFAULT_MASTER_GAIN_FACTOR Returns the default master gain factor. IS_GET_DEFAULT_RED_GAIN_FACTOR Returns the default red channel gain factor. IS_GET_DEFAULT_GREEN_GAIN_FACTOR Returns the default green channel gain factor. IS_GET_DEFAULT_BLUE_GAIN_FACTOR Returns the default blue channel gain factor. IS_INQUIRE_MASTER_GAIN_FACTOR IS_INQUIRE_RED_GAIN_FACTOR IS_INQUIRE_GREEN_GAIN_FACTOR IS_INQUIRE_BLUE_GAIN_FACTOR nFactor Converts the index value for the master gain factor. Converts the index value for the red channel gain factor. Converts the index value for the green channel gain factor. Converts the index value for the blue channel gain factor. Gain value (100 = gain factor 1, i. e. no effect)
For converting a gain value from the is_SetHardwareGain() function, you can set the nMode
216
7. 107 Description of Functions.is_SetHWGainFactor parameter to one of the IS_INQUIRE_x_FACTOR values. In this case, the value range for nFactor is between 0 and 100. To set the gain using IS_SET_..._GAIN_FACTOR, you must set the nFactor parameter to an integer value in the range from 100 to the maximum value. By calling IS_INQUIRE_x_FACTOR and specifying the value 100 for nFactor, you can query the maximum value. A gain value of 100 means no gain, a gain value of 200 means gain to the double level (factor 2), etc. Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_MASTER_GAIN_FACTOR IS_GET_RED_GAIN_FACTOR IS_GET_GREEN_GAIN_FACTOR IS_GET_BLUE_GAIN_FACTOR Defined setting when used together with IS_SET_MASTER_GAIN_FACTOR IS_SET_RED_GAIN_FACTOR IS_SET_GREEN_GAIN_FACTOR IS_SET_BLUE_GAIN_FACTOR. Default setting when used together with IS_GET_DEFAULT_MASTER_GAIN_FACTOR IS_GET_DEFAULT_RED_GAIN_FACTOR IS_GET_DEFAULT_GREEN_GAIN_FACTOR IS_GET_DEFAULT_BLUE_GAIN_FACTOR. When used together with IS_INQUIRE_MASTER_GAIN_FACTOR IS_INQUIRE_RED_GAIN_FACTOR IS_INQUIRE_GREEN_GAIN_FACTOR IS_INQUIRE_BLUE_GAIN_FACTOR. Related Functions is_SetHardwareGain() is_SetHardwareGamma() is_SetGainBoost() is_SetAutoParameter() is_GetSensorInfo() Code Sample //Set master gain factor to 3.57: INT ret = is_SetHWGainFactor (hCam, IS_SET_MASTER_GAIN_FACTOR, 357); //ret has the value 363 for the UI-1460-C //Query the maximum gain factor for the red channel: ret = is_SetHWGainFactor (hCam, IS_INQUIRE_RED_GAIN_FACTOR, 100); //ret has the value 725 for the UI-1460-C Converted gain index Function executed successfully General error message
217
7.108 is_SetImageMem
INT is_SetImageMem (HIDS hCam, char* pcImgMem, INT id) Description is_SetImageMem() makes the specified image memory the active memory. Only an active image memory can receive image data. When you call is_FreezeVideo(), the captured image is stored in the image buffer designated by pcImgMem and id. For pcImgMem, you must pass a pointer which was created by is_AllocImageMem(), passing any other pointer will result in an error message. You may pass the same pointer multiple times.
If you want the application to be compatible with the FALCON SDK, make sure to call is_SetImageSize () after is_SetImageMem().
Input Parameters hCam pcImgMem id Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_AllocImageMem() is_FreeImageMem() is_AddToSequence() is_SetAllocatedImageMem() is_GetColorDepth() is_GetImageMem() is_GetImageMemPitch() Function executed successfully General error message Camera handle Pointer to the starting position in the memory. ID of this memory.
218
7.109 is_SetImagePos
INT is_SetImagePos (HIDS hCam, INT x, INT y) Description is_SetImagePos() determines the position of an area of interest (AOI) in the display window. When used together with the is_SetAOI() function, you can cut out an area of interest of the full video image. To avoid a positional mismatch between the display area and the image area, make sure to call the functions in the correct order. Starting from the original image, it is mandatory to keep to the following order: is_SetAOI() is_SetImagePos()
With is_SetAOI(), you can set the position and size of an area of interest using a single function call.
Changes to the image geometry or pixel clock affect the value ranges of the frame rate and exposure time. After executing is_SetBinning(), calling the following functions is recommended in order to keep the defined camera settings: is_SetFrameRate() is_SetExposureTime() If you are using the uEye's flash function: is_SetFlashStrobe()
Input Parameters The x and y parameters represent an offset with respect to the upper left image corner. The cut window is copied to the start position in the memory. If you want the image to be copied to the same offset within the memory, you can link the new position with a logical OR to the IS_SET_IMAGE_POS_X_ABS and IS_SET_IMAGE_POS_Y_ABS parameters. hCam x 0...xMax 0...xMax | IS_SET_IMAGE_POS_X_ABS IS_GET_IMAGE_POS_X IS_GET_IMAGE_POS_X_MIN IS_GET_IMAGE_POS_X_MAX IS_GET_IMAGE_POS_X_INC IS_GET_IMAGE_POS_Y Sets the horizontal position Applies the absolute position to the memory as well. Returns the current x position. Returns the minimum value for the horizontal AOI position. Returns the maximum value for the horizontal AOI position. Returns the increment for the horizontal AOI position. Returns the current Y position. Camera handle
219
IS_GET_IMAGE_POS_Y_MIN IS_GET_IMAGE_POS_Y_MAX IS_GET_IMAGE_POS_Y_INC y 0...yMax 0...yMax | IS_SET_IMAGE_POS_Y_ABS 0 Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_PARAMETER
Returns the minimum value for the vertical AOI position. Returns the maximum value for the vertical AOI position. Returns the increment for the vertical AOI position. Sets the vertical position Applies the absolute position to the memory as well. Return settings
Function executed successfully General error message Parameters x or y are invalid (x, y < 0)
Current setting when used together with IS_GET_IMAGE_POS parameters IS_INVALID_MODE Camera is in standby mode, function not allowed. Related Functions is_SetAOI() Example
220
221
7.110 is_SetIO
INT is_SetIO (HIDS hCam, INT nIO) Description is_SetIO() sets the additional digital outputs (GPIOs) of the uEye or returns their current states. Using is_SetIOMask(), you can define each GPIO as a digital input or output.
The GPIOs are available with the GigE uEye HE and USB uEye ME/LE (board level only) cameras. The GPIOs are not provided with optocouplers and use TTL voltages. For information on GPIO wiring, please refer to the Specifications chapter of the uEye User Manual.
To connect and control a flash (strobe) unit for the uEye cameras, it is recommended to use the flash output provided (see is_SetFlashStrobe()).
Input Parameters hCam nIO 0x00 (00) 0x01 (01) 0x02 (10) 0x03 (11) IS_GET_IO Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_IO Related Functions is_SetIOMask() is_GetImageInfo() is_SetFlashStrobe() is_SetExternalTrigger() Function executed successfully General error message Camera handle Bit mask for outputs Sets both outputs to 0. Sets the first output to 1, the second one to 0. Sets the first output to 0, the second one to 1. Sets both outputs to 1. Reads the signal applied to the input.
222
7.111 is_SetIOMask
INT is_SetIOMask (HIDS hCam, INT nMask) Description Using is_SetIOMask(), you can define each GPIO as an input or output. The is_SetIO() function sets the additional digital outputs (GPIOs) of the uEye or returns the current states.
The GPIOs are available with the GigE uEye HE and USB uEye ME/LE (board level only) cameras. The GPIOs are not provided with optocouplers and use TTL voltages. For information on GPIO wiring, please refer to the Specifications chapter of the uEye User Manual.
To use hardware triggering with the uEye cameras, we suggest that you use the trigger input provided for this purpose (see is_SetExternalTrigger()). To connect and control a flash (strobe) unit for the uEye cameras, it is recommended to use the flash output provided (see is_SetFlashStrobe()).
Input Parameters hCam nMask 0x00 (00) 0x01 (01) 0x02 (10) 0x03 (11) IS_GET_IO_MASK IS_GET_INPUT_MASK IS_GET_OUTPUT_MASK Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_IO When used with IS_GET_INPUT_MASK IS_GET_OUTPUT_MASK. Bit masks of the IOs to be used. Function executed successfully General error message Camera handle Bit mask for inputs / outputs. Use both GPIOs as inputs. Use the first GPIO as output, the second one as input. Use the first GPIO as input, the second one as output. Use both GPIOs as outputs. Returns the current bit mask. Returns the IOs to be used as inputs. Returns the IOs to be used as outputs.
223
224
7.112 is_SetLED
USB 2.0
USB 2.0
Syntax INT is_SetLED (HIDS hCam, INT nValue) Description Using is_SetLED(), you can toggle the colour of the LED on the back of the USB uEye camera housing.
The is_SetLED() function is only supported by cameras of the USB uEye SE and USB uEye RE series.
Input Parameters hCam nValue IS_SET_LED_OFF IS_SET_LED_ON IS_SET_LED_TOGGLE Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetIO() is_SetFlashStrobe() is_SetExternalTrigger() Function executed successfully General error message Switches LED to red. Switches LED to green. Toggles between red and green. Camera handle
225
7.113 is_SetOptimalCameraTiming
INT is_SetOptimalCameraTiming (HIDS hCam, INT Mode, INT Timeout, INT* pMaxPxlClk, double* pMaxFrameRate) Description Using is_SetOptimalCameraTiming(), you can determine the highest possible pixel clock frequency for the current configuration. This function sets the pixel clock for which no transfer errors will occur during the Timeout period. Moreover, it returns the highest frame rate available for this pixel clock frequency. is_SetOptimalCameraTiming() can only be executed in free-run mode ( is_CaptureVideo()). If the return value is ? IS_SUCCESS, no clock setting will be made.
The function should be executed in a separate thread and run in the background to allow for the computational load caused by additional colour conversions, etc. Otherwise, it will not able to return the optimum values.
Input Parameters hCam Mode IS_BEST_PCLK_RUN_ONCE Timeout [4000...20000] The function makes one attempt to determine the optimum pixel clock and returns immediately. Sets the period (in milliseconds) during which no transfer error may occur. The adjustable range is between 4 and 20 seconds. The higher the value you set for this parameter, the more stable the determined pixel clock value will be. This, in turn, increases the runtime of the function correspondingly. Returns the maximum pixel clock frequency (in MHz). Returns the maximum frame rate (in fps). Camera handle
Function executed successfully General error message Automatic exposure is active. The Timeout input parameter is not correct. The camera is operating in trigger mode.
226
227
7.114 is_SetPacketFilter
GigE
GigE
Syntax INT is_SetPacketFilter (INT iAdapterID, UINT uFilterSetting) Description Using is_SetPacketFilter(), you can set the packet filter for a network adapter.
The is_SetPacketFilter() function is only supported by the cameras of the GigE uEye series.
Only incoming packets are filtered. Regardless of this setting, ICMP (Ping) and ARP packets are always forwarded to the operating system.
Input Parameters iAdapterID Internal adapter ID of the network adapter. It is returned by the is_GetEthDeviceInfo() function in the UEYE_ETH_ADAPTER_INFO structure.
IS_ETH_PCKTFLT_BLOCKUEGET Block GigE uEye data packets directed to the operating system (recommended). IS_ETH_PCKTFLT_BLOCKALL Block all packets directed to the operating system.
Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_CANT_OPEN_DEVICE IS_IO_REQUEST_FAILED Related Functions is_GetEthDeviceInfo() is_SetAutoCfgIpSetup() Function executed successfully uFilterSetting is invalid. Driver could not be found. Driver communication failed.
228
7.115 is_SetPixelClock
INT is_SetPixelClock (HIDS hCam, INT Clock) Description is_SetPixelClock() sets the frequency used to read out image data from the sensor (pixel clock frequency). Due to an excessive pixel clock for USB cameras, images may get lost during the transfer. If you change the pixel clock on-the-fly, the current image capturing process will be aborted.
Some sensors allow a higher pixel clock setting if binning or subsampling has been activated. If you set a higher pixel clock and then reduce the binning/subsampling factors again, the driver will automatically select the highest possible pixel clock for the new settings.
Changes to the image geometry or pixel clock affect the value ranges of the frame rate and exposure time. After executing is_SetPixelClock(), calling the following functions is recommended in order to keep the defined camera settings:
is_SetFrameRate() is_SetExposureTime() If you are using the uEye's flash function: is_SetFlashStrobe() Input Parameters hCam Clock IS_GET_PIXEL_CLOCK IS_GET_DEFAULT_PIXEL_CLK Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message Camera handle Pixel clock frequency to be set (in MHz) Current pixel clock Returns the default pixel clock frequency
Current setting when used together with IS_GET_PIXEL_CLOCK IS_INVALID_MODE Camera is in standby mode, function not allowed. IS_INVALID_PARAMETER The value for Clock is outside the pixel clock range supported by the camera.
229
Programming Manual uEye Software Development Kit V3.40 is_SetBinning() is_SetSubSampling() is_SetAOI()
230
7.116 is_SetPersistentIpCfg
GigE
GigE
Syntax INT is_SetPersistentIpCfg (HIDS hDev, UEYE_ETH_IP_CONFIGURATION* pIpCfg, UINT uStructSize) Description Using is_SetPersistentIpCfg(), you can set the properties of the persistent IP configuration for a connected camera. The IP configuration can also be changed using the uEye Camera Manager.
The is_SetPersistentIpCfg() function is only supported by cameras of the GigE uEye series.
Input Parameters hDev DevID | IS_USE_DEVICE_ID DevID = internal device ID of the camera from the UEYE_CAMERA_INFO structure (see also is_GetCameraList()). Pointer to a UEYE_ETH_IP_CONFIGURATION object (see below). Size of the UEYE_ETH_IP_CONFIGURATION structure (in bytes).
pIpCfg uStructSize
The is_SetPersistentIpCfg() function does not accept a camera handle in the hDev parameter. In the call, please use the internal device ID as described below. Never modify the IP configuration after a GigE uEye camera has been initialised!
Contents of the UEYE_ETH_IP_CONFIGURATION Structure UEYE_ETH_ADDR_IPV4 UEYE_ETH_ADDR_IPV4 BYTE ipAddress ipSubnetmask reserved[4] IPv4 address IPv4 subnet mask reserved
231
Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_BAD_STRUCTURE_SIZE IS_NOT_SUPPORTED IS_CANT_OPEN_DEVICE IS_IO_REQUEST_FAILED Related Functions is_SetAutoCfgIpSetup() is_GetEthDeviceInfo() Code Sample //Create the structure UEYE_ETH_IP_CONFIGURATION ipcfg; //Create specific camera handle from the internal device ID, see info in the box above HIDS hDev = (HIDS)( dwDeviceID | IS_USE_DEVICE_ID); //Indicate addresses in hexadecimal format ipcfg.ipAddress.dwAddr = 0xC0A80A02; //IP address 192.168.10.2 ipcfg.ipSubnetmask.dwAddr = 0xFFFFFF00; //Subnet mask 255.255.255.0 //Set persistent IP address INT nRet = is_SetPersistentIpCfg( hDev, &ipcfg, sizeof (UEYE_ETH_IP_CONFIGURATION)); Function executed successfully pIpCfg is invalid. The structure size you specified is invalid. For hDev, no device ID was specified or the ID is no device ID for an Ethernet camera (see above). Driver could not be found. Driver communication failed.
232
7.117 is_SetRopEffect
INT is_SetRopEffect (HIDS hCam, INT effect, INT param, INT reserved) Description is_SetRopEffect() enables functions for real-time image geometry modification (Rop = raster operation). Input Parameters hCam effect IS_SET_ROP_MIRROR_UPDOWN Mirrors the image along the horizontal axis. Depending on the sensor, this operation is performed in the camera or in the PC software. IS_GET_ROP_EFFECT param Returns the current settings. Turns the Rop effect on / off. 0 = Turn off 1 = Turn on reserved Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message Reserved. 0 must be passed. Camera handle
Current setting when used together with IS_SET_ROP_EFFECT IS_INVALID_MODE Camera is in standby mode, function not allowed. Related Functions is_SetBinning() is_SetSubSampling() is_SetAOI() is_SetImagePos()
233
7.118 is_SetSaturation
INT is_SetSaturation (HIDS hCam, INT ChromU, INT ChromV) Description Using is_SetSaturation(), you can set the software colour saturation.
In the YUV format, colour information (i.e. the colour difference signals) is provided by the U and V channels. In the U channel, this information results from the difference between the blue level and Y (luminance), in the V channel from the difference between the red level and Y. For use in other colour formats than YUV, U and V are converted using a driver matrix.
Input Parameters hCam ChromU Camera handle U saturation: value multiplied by 100. Range: [IS_MIN_SATURATION IS_MAX_SATURATION] IS_GET_SATURATION_U ChromV Returns the current value for the U saturation. V saturation: value multiplied by 100. Range: [IS_MIN_SATURATION IS_MAX_SATURATION] IS_GET_SATURATION_V Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message Returns the current value for the V saturation.
Current setting when used together with IS_GET_SATURATION_U IS_GET_SATURATION_V IS_INVALID_PARAMETER Invalid value for the ChromU or ChromV parameter. Related Functions is_SetColorMode() is_SetColorCorrection() is_SetHardwareGamma() is_SetColorConverter()
234
7.119 is_SetSensorScaler
INT is_SetSensorScaler (HIDS hCam, UINT nMode, double dblFactor) Description is_SetSensorScaler() enables internal image scaling for some sensors. This allows to reduce the image resolution by adjustable factors. Thus, the amount of data from high resolution sensors can be reduced.
Input Parameters hCam nMode IS_ENABLE_SENSOR_SCALER Camera handle Function mode Enable image scaling
IS_ENABLE_SENSOR_SCALER | Enable image scaling with smoothed edges (anti alising IS_ENABLE_ANTI_ALIASING effect) dblFactor Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_NOT_SUPPORTED IS_NOT_SUPPORTED Related Functions is_GetSensorScalerInfo() Code Sample SENSORSCALERINFO Info; INT nRet; double dblNewFactor; // Query information on image scaling nRet = is_GetSensorScalerInfo (hCam, &Info, sizeof(Info)); // Enable scaling with anti aliasing dblNewFactor = Info.dblMinFactor + Info.dblFactorIncrement; Function executed successfully General error message The test image function is not supported by the camera. The sensor does not support image scaling Scaling factor
235
Programming Manual uEye Software Development Kit V3.40 nRet = is_SetSensorScaler (hCam, IS_ENABLE_SENSOR_SCALER | IS_ENABLE_ANTI_ALIASING, dblNewFactor);
236
7.120 is_SetSensorTestImage
INT is_SetSensorTestImage (HIDS hCam, INT TestImage, INT Param) Description is_SetSensorTestImage() enables a test image function in the sensor. You can select different test images. The test images supported by a particular camera can be queried using the is_GetSupportedTestImages() function. For some test images, the Param parameter provides additional options. If the test image does not support additional parameters, Param will be ignored. Input Parameters hCam TestImage Param Camera handle The test image to be set. See also is_GetSupportedTestImages(). Additional parameter for used to modify the test image. Not available for all test images.
Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_PARAMETER IS_NOT_SUPPORTED Related Functions is_GetSupportedTestImages() is_GetTestImageValueRange() Function executed successfully General error message The Param parameter is not within the allowed value range. The test image function is not supported by the camera.
237
7.121 is_SetStarterFirmware
GigE
GigE
Syntax INT is_SetStarterFirmware (HIDS hDev, const CHAR* pcFilepath, UINT uFilepathLen) Description Using is_SetStarterFirmware(), you can update the starter firmware of a connected camera. This is also possible from within the uEye Camera Manager.
The is_SetStarterFirmware() function is only supported by the cameras of the GigE uEye series.
The starter firmware determines the start-up behaviour of the GigE uEye. We recommend that you do not update the starter firmware unless an older firmware version causes start-up problems. If you have questions on the current starter firmware, please contact Technical Support.
Input Parameters hDev DevID | IS_USE_DEVICE_ID, DevID = internal device ID of the camera from the UEYE_CAMERA_INFO structure (see also is_GetCameraList()) Pointer to a null-terminated ASCII string that contains the full file path. Length of the file path (in bytes).
pcFilepath uFilepathLen
The is_SetPersistentIpCfg() function does not accept a camera handle in the hDev parameter. In the call, please use the internal device ID as described below. Never modify the IP configuration after a GigE uEye camera has been initialised!
238
Return Values IS_SUCCESS IS_INVALID_PARAMETER IS_BAD_STRUCTURE_SIZE IS_NOT_SUPPORTED IS_CANT_OPEN_DEVICE IS_IO_REQUEST_FAILED Related Functions is_GetCameraList() is_GetDuration() is_InitCamera() Code Sample // Prepare the data parameter. const CHAR kFilepath[]= c:\\ids\\firmware.fw; // Prepare the handle parameter. Mark the given device id with IS_USE_DEVICE_ID. HIDS hDev = (HIDS)( dwDeviceID | IS_USE_DEVICE_ID); INT nRet = is_SetStarterFirmware( hDev, kFilepath, sizeof(kFilepath)); Function executed successfully The pcFilepath or uFilepathLen parameter is invalid. The structure size you specified is invalid. For hDev, no device ID was specified or the ID is no device ID for an Ethernet camera. Driver could not be found. Driver communication failed.
239
7.122 is_SetSubSampling
INT is_SetSubSampling (HIDS hCam, INT mode) Description Using is_SetSubSampling(), you can enable sub-sampling mode both in horizontal and in vertical directions. This allows you to reduce the image size in the sub-sampling direction without scaling down the area of interest. In order to simultaneously enable horizontal and vertical sub-sampling, the horizontal and vertical sub-sampling parameters can by linked by a logical OR. Some monochrome sensors are limited by their design to mere colour sub-sampling. In case of fine image structures, this can result in slight artifacts. The adjustable sub-sampling factors of each sensor are listed in the Sensors section of the Specifications chapter in the uEye User Manual.
Some sensors allow a higher pixel clock setting if binning or subsampling has been activated. If you set a higher pixel clock and then reduce the binning/subsampling factors again, the driver will automatically select the highest possible pixel clock for the new settings.
Changes to the image geometry or pixel clock affect the value ranges of the frame rate and exposure time. After executing is_SetBinning(), calling the following functions is recommended in order to keep the defined camera settings: is_SetFrameRate() is_SetExposureTime() If you are using the uEye's flash function: is_SetFlashStrobe()
IS_SUBSAMPLING_2X_VERTICAL Enables vertical sub-sampling with factor 2. IS_SUBSAMPLING_3X_VERTICAL Enables vertical sub-sampling with factor 3. IS_SUBSAMPLING_4X_VERTICAL Enables vertical sub-sampling with factor 4. IS_SUBSAMPLING_5X_VERTICAL Enables vertical sub-sampling with factor 5. IS_SUBSAMPLING_6X_VERTICAL Enables vertical sub-sampling with factor 6. IS_SUBSAMPLING_8X_VERTICAL Enables vertical sub-sampling with factor 8. IS_SUBSAMPLING_16X_VERTICAL Enables vertical sub-sampling with factor 16. IS_SUBSAMPLING_2X_HORIZONTAL Enables horizontal sub-sampling with factor 2. IS_SUBSAMPLING_3X_HORIZONTAL Enables horizontal sub-sampling with factor 3. IS_SUBSAMPLING_4X_HORIZONTAL Enables horizontal sub-sampling with factor 4.
240
IS_SUBSAMPLING_5X_HORIZONTAL Enables horizontal sub-sampling with factor 5. IS_SUBSAMPLING_6X_HORIZONTAL Enables horizontal sub-sampling with factor 6. IS_SUBSAMPLING_8X_HORIZONTAL Enables horizontal sub-sampling with factor 8. IS_SUBSAMPLING_16X_HORIZONTAL Enables horizontal sub-sampling with factor 16. IS_GET_SUBSAMPLING Returns the current setting. IS_GET_SUBSAMPLING_FACTOR_VERTICAL vertical sub-sampling factor Returns the IS_GET_SUBSAMPLING_FACTOR_HORIZONTAL Returns the horizontal sub-sampling factor IS_GET_SUBSAMPLING_TYPE Indicates whether the camera uses colour-proof subsampling.
IS_GET_SUPPORTED_SUBSAMPLING Returns the supported sub-sampling modes. Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message
Current setting when used together with Returns IS_SUBSAMPLING_COLOR if the camera uses IS_GET_SUBSAMPLING colour-proof sub-sampling, else IS_SUBSAMPLING_MONO When used with Returns the supported sub-sampling modes linked by logical IS_GET_SUPPORTED_SUBSAMPLING ORs Related Functions is_SetBinning() is_SetAOI() is_SetImagePos() is_SetPixelClock()
241
7.123 is_SetTimeout
INT is_SetTimeout (HIDS hCam, UINT nMode, UINT Timeout) Description Using is_SetTimeout(), you can change user-defined timeout values of the uEye API. If no userdefined timeout is set, the default value of the uEye API is used for the relevant timeout. For further information, please refer to the Function Blocks: Timeout Values for Image Capture section.
The user-defined timeout only applies to the specified camera at runtime of the program.
Input Parameters hCam nMode IS_TRIGGER_TIMEOUT Timeout Camera handle Selects the timeout value to be set Sets the timeout value for triggered image capture Timeout value in 10 ms. Value range [0; 4...429496729] (corresponds to 40 ms to approx. 1193 hours) 0 = use default value of the uEye API For 1...3, the value 4 is used. Return Values IS_SUCCESS IS_NO_SUCCESS IS_NOT_SUPPORTED Function executed successfully General error message The value for nMode is invalid
Related Functions is_GetTimeout() is_CaptureVideo() is_FreezeVideo() is_SetExternalTrigger() Code Sample // Set user-defined timeout to 120 seconds is_SetTimeout(hCam, IS_TRIGGER_TIMEOUT, 12000);
242
7.124 is_SetTriggerCounter
INT is_SetTriggerCounter (HIDS hCam, INT nValue) Description Using is_SetTriggerCounter(), you can read out the camera's internal counter for incoming hardware triggers. Input Parameters hCam nValue IS_GET_TRIGGER_COUNTER
Other values
Camera handle
Returns the current hardware trigger count Resets the hardware trigger counter
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetExternalTrigger() is_CameraStatus() Function executed successfully General error message
243
7.125 is_SetTriggerDelay
INT is_SetTriggerDelay (HIDS hCam, INT nTriggerDelay) Description Using is_SetTriggerDelay(), you can set the delay time between the arrival of a trigger signal and the start of exposure. The trigger signal can be initiated by hardware or by software. The delay time set here adds to the delay caused by the sensor. The delay times of each sensor are listed in the Sensors section of the Specificationschapter in the uEye User Manual. Input Parameters hCam nTriggerDelay IS_GET_TRIGGER_DELAY IS_GET_MIN_TRIGGER_DELAY IS_GET_MAX_TRIGGER_DELAY Camera handle Time by which the image capture is delayed (in s). Returns the currently set delay time. Returns the minimum adjustable value. Returns the maximum adjustable value.
IS_GET_TRIGGER_DELAY_GRANULARITY Returns the resolution of the adjustable delay time. Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_TRIGGER_DELAY Related Functions is_SetFlashDelay() is_SetFlashStrobe() is_GetGlobalFlashDelays() is_SetExternalTrigger() Function executed successfully General error message
244
7.126 is_StopLiveVideo
INT is_StopLiveVideo (HIDS hCam, INT Wait) Description is_StopLiveVideo() stops live mode or cancels a hardware triggered image capture in case the exposure has not yet started. Input Parameters hCam Wait IS_WAIT IS_DONT_WAIT IS_FORCE_VIDEO_STOP Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_FreezeVideo() is_CaptureVideo() is_SetDisplayMode() Function executed successfully General error message The function waits until the image save is complete. The function returns immediately. Digitising the image is completed in the background. Digitising is stopped immediately. Camera handle
245
7.127 is_UnlockSeqBuf
INT is_UnlockSeqBuf (HIDS hCam, INT nNum, char* pcMem) Description Using is_UnlockSeqBuf(), you unlock a previously locked image memory in order to make it available again for storing captured images. The image memory is re-inserted at its previous position in the sequence list. Input Parameters hCam nNum Camera handle Number of the image memory to unlock. When you pass IS_IGNORE_PARAMETER, the image memory is only identified by its starting address. nNum identifies the position in the sequence list, not the memory ID assigned with is_AllocImageMem(). pcMem Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_LockSeqBuf() Function executed successfully General error message Starting address of the image memory
246
7.128 is_WaitEvent
Syntax INT is_WaitEvent (HIDS hCam, INT which, INT nTimeout) Description is_WaitEvent() allows waiting for uEye events. The function indicates successful execution when the event has occurred within the specified timeout. Input Parameters hCam which nTimeout Return Values IS_SUCCESS IS_NO_SUCCESS IS_TIMED_OUT Function executed successfully General error message The specified timeout expired without the event having occurred. Camera handle ID of the event (see is_InitEvent()) Time (in ms) that the function will wait for an event to occur
Related Functions is_InitEvent() is_EnableEvent() is_DisableEvent() is_ExitEvent() Code Sample //Activate and initialise FRAME event is_EnableEvent (hCam, IS_SET_EVENT_FRAME); is_InitEvent (hCam, IS_SET_EVENT_FRAME); //Start image capture and wait 1000 ms for event to occur is_FreezeVideo (hCam, IS_DONT_WAIT); is_WaitEvent (hCam, IS_SET_EVENT_FRAME, 1000);
247
7.129 is_WriteEEPROM
INT is_WriteEEPROM (HIDS hCam, INT Adr, char* pcString, INT Count) Description Using is_WriteEEPROM(), you can write data to the EEPROM of the camera. Besides the hardcoded factory information, the EEPROM of the uEye can hold 64 bytes of user data. Input Parameters hCam Adr pcString Count Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_MODE Related Functions is_ReadEEPROM() Function executed successfully General error message Camera is in standby mode, function not allowed. Camera handle Starting address for data writes (0...63) Pointer to the string containing the data to be written Number of characters to be written (1...64)
248
7.130 is_WriteI2C
USB 2.0
USB 2.0
Syntax INT is_WriteI2C (HIDS hCam, INT nDeviceAddr, INT nRegisterAddr, BYTE* pbData, INT nLen) Description Using is_WriteI2C(), you can write data via the I2C bus of a board level camera. For information on the signals applied to the I2C bus, refer to the Specifications: Electrical Specifications chapter in the uEye User Manual.
The is_WriteI2C() function is only supported by PCB versions of the USB uEye ME/LE camera series.
The uEye processes I2C addresses in a 7-bit format that is created from the 8-bit format by a bit shift to the right. The eighth bit indicates whether an address is a read (1) or write (0) address. For example, the 7-bit address 0x48 is the write address 0x90 and the read address 0x91 in 8-bit format. The following addresses for nRegisterAddr are assigned to the uEye and must not be used: 7-bit format: 0x10, 0x48, 0x4C, 0x51, 0x52, 0x55, 0x5C, 0x5D, 0x69 8-bit format: 0x20, 0x90, 0x98, 0xA2, 0xA4, 0xAA, 0xB8, 0xBA, 0xD2
Input Parameters hCam nDeviceAddr nRegisterAddr pbData nLen Camera handle Device address Register address (only 8-bit addresses are valid) Data to be written Data length nLen = 1: 8 bits data nLen = 2: 16 bits data Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_ReadI2C() Function executed successfully General error message
249
250
8.1
isavi_AddFrame
INT isavi_AddFrame (int nAviID, char* pcImageMem) Description isavi_AddFrame() adds a new frame to an AVI sequence. Input Parameters nAviID pcImageMem Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The current image could not be processed since compression is still in progress. The AVI file is not open. Instance ID set by the isavi_InitAVI() function Pointer to the memory containing the image.
251
8.2
isavi_CloseAVI
INT isavi_CloseAVI (int nAviID) Description isavi_CloseAVI() closes an AVI file which was opened using isavi_OpenAVI(). Input Parameters nAviID Instance ID set by the isavi_InitAVI() function.
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI().
252
8.3
isavi_DisableEvent
INT isavi_DisableEvent (int nAviID, int which) Description isavi_DisableEvent() disables the specified event. The disabled event no longer triggers an event notification when the associated event occurs. Input Parameters nAviID which Instance ID set by the isavi_InitAVI() function. Name of the event to be disabled.
IS_AVI_SET_EVENT_FRAME_SAVED new frame was saved to the AVI file. A Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). An invalid event was specified for the which parameter.
IS_AVI_ERR_PARAMETER
253
8.4
isavi_EnableEvent
INT isavi_EnableEvent (int nAviID, int which) Description isavi_DisableEvent() enables the specified event. The enabled event triggers an event notification when the associated event occurs. Input Parameters nAviID which Instance ID set by the isavi_InitAVI() function. Name of the event to be enabled.
IS_AVI_SET_EVENT_FRAME_SAVED new frame was saved to the AVI file. A Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). An invalid event was specified for the which parameter.
IS_AVI_ERR_PARAMETER
254
8.5
isavi_ExitAVI
INT isavi_ExitAVI (int nAviID) Description isavi_ExitAVI() terminates and deletes the instance of the uEye AVI interface. Input Parameters nAviID Instance ID set by the isavi_InitAVI() function.
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The AVI file could not be closed.
255
8.6
isavi_ExitEvent
INT isavi_ExitEvent (int nAviID, int which) Description isavi_ExitEvent() deletes the specified event. The deleted event no longer occurs and needs to be re-created using isavi_InitEvent() before it can be enabled and used. Input Parameters nAviID which Instance ID set by the isavi_InitAVI() function. Name of the event to be deleted.
IS_AVI_SET_EVENT_FRAME_SAVED new frame was saved to the AVI file. A Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). An invalid event was specified for the which parameter.
IS_AVI_ERR_PARAMETER
256
8.7
isavi_GetAVIFileName
INT isavi_GetAVIFileName (int nAviID, char* strName) Description Using isavi_GetAVIFileName(), you can read out the filename of the current AVI file. This function is helpful if an AVI file was opened with the isavi_OpenAVI() function and a Null parameter was specified. Input Parameters nAviID strName Instance ID set by the isavi_InitAVI() function. Pointer to the memory location where the filename is written to. The allocated memory must be large enough to accommodate the full file path. When NULL is passed the function returns the length of the filename.
NULL
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI().
257
8.8
isavi_GetAVISize
INT isavi_GetAVISize (int nAviID, float* size) Description Use isavi_GetAVISize() to retrieve the size of the frame sequence saved to the current AVI file. Input Parameters nAviID size Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The designated AVI instance could not be found. Either the AVI ID is invalid or the instance was already deleted using isavi_ExitAVI(). Instance ID set by the isavi_InitAVI() function The size in kBytes
258
8.9
isavi_GetnCompressedFrames
INT isavi_GetnCompressedFrames (int nAviID, unsigned long* nFrames) Description Using isavi_GetnCompressedFrames(), you can read out the number of frames saved to the current AVI file. Input Parameters nAviID nFrames Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). Instance ID set by the isavi_InitAVI() function. The number of frames
259
8.10
isavi_GetnLostFrames
INT isavi_GetnLostFrames (int nAviID, unsigned long* nFrames) Description Using isavi_GetnLostFrames(), you can read out the number of frames that have been discarded. A frame will be discarded if it cannot be processed because a compression operation in still in progress. Input Parameters nAviID nFrames Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). Instance ID set by the isavi_InitAVI() function. The number of frames
260
8.11
isavi_InitAVI
INT isavi_InitAVI (int* pnAviID, HIDS hCam) Description isavi_InitAVI() initialises an instance of the uEye AVI interface. Multiple instances can be created simultaneously. Input Parameters pnAviID hCam Return Values IS_AVI_NO_ERR IS_AVI_ERR_PARAMETER IS_AVI_ERR_NO_CODEC_AVAIL Function executed successfully The pnAviID pointer contains the value Null. The maximum number of instances allowed in this system has been reached. It is not possible to create another instance. No uEye camera was found. Pointer. Returns the instance ID which is needed for calling the other uEye AVI functions. Handle of a selected or initialised uEye camera.
261
8.12
isavi_InitEvent
INT isavi_InitEvent (int nAviID, int which) Description isavi_InitEvent() creates the specified event. This includes registering the event object in the uEye AVI interface and creating an event handler. Before you can use a new event, you must enable it by calling isavi_EnableEvent(). Input Parameters nAviID which Instance ID set by the isavi_InitAVI() function. Name of the event to be created.
IS_AVI_SET_EVENT_FRAME_SAVED new frame was saved to the AVI file. A Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The event could not be initialised. The Windows SetEvent function failed. An invalid event was specified for the which parameter.
IS_AVI_ERR_EVENT_FAILED IS_AVI_ERR_PARAMETER
Code Sample Create and enable an event object for the "Frame saved" event:
262
8. 12 Description of the AVI Functions.isavi_InitEvent HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, "" ); if ( hEvent != NULL ) { isavi_InitEvent( AviDest, hEvent, IS_AVI_SET_EVENT_FRAME_SAVED ); isavi_EnableEvent( AviDest, IS_AVI_SET_EVENT_FRAME_SAVED ); if ( WaitForSingleObject( hEvent, 1000 ) == WAIT_OBJECT_0 ) { //Frame was captured successfully... } isavi_DisableEvent( AviDest, IS_AVI_SET_EVENT_FRAME_SAVED ); isavi_ExitEvent( AviDest, IS_AVI_SET_EVENT_FRAME_SAVED ); }
263
8.13
isavi_OpenAVI
INT isavi_OpenAVI (int nAviID) Description isavi_OpenAVI() opens a new or existing AVI file. Input Parameters nAviID pFileName Instance ID set by the isavi_InitAVI() function. Pointer to the name to be assigned to the AVI file. If NULL is passed, the "Open File" dialogue is displayed.
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). Another capturing operation is in progress or an AVI file is still open. No valid AVI file was selected in the Windows "Open File..." dialogue. No memory could be allocated for the AVI file. The AVI file could not be opened. Please check if the file is corrupted or was opened in another application. No AVI stream could be created.
IS_AVI_ERR_CAPTURE_RUNNING IS_AVI_ERR_INVALID_FILE IS_AVI_ERR_NEW_FAILED IS_AVI_ERR_AVIFILEOPEN IS_AVI_ERR_CREATESTREAM Related Functions isavi_CloseAVI() isavi_InitAVI() isavi_ExitAVI()
264
8.14
isavi_ResetFrameCounters
IDSAVIEXP isavi_ResetFrameCounters (int nAviID) Description isavi_ResetFrameCounters() resets the counters for saved and discarded images. Input Parameters nAviID Instance ID set by the isavi_InitAVI() function.
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI().
265
8.15
isavi_SetFrameRate
INT isavi_SetFrameRate (int nAviID, double fr) Description isavi_SetFrameRate() sets the frame rate for AVI capturing. You can set the frame rate after opening the AVI file. This value does not have to be equal to the frame rate set for the uEye camera. Input Parameters nAviID fr Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The AVI file could not be modified. The AVI file is not open. Instance ID set by the isavi_InitAVI() function. The frame rate to be set. Default = 25.0
266
8.16
isavi_SetImageQuality
INT isavi_SetImageQuality (int nAviID,int q) Description isavi_SetImageQuality() indicates the quality for the frames to be compressed. You can change the image quality at any time; it then applies to all subsequent frames. For compression, the system uses the JPEG algorithm. Input Parameters nAviID q Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The q parameter is outside the range of 1...100. The AVI file is not open. Instance ID set by the isavi_InitAVI() function. Image quality [1 = lowest ... 100 = highest]
267
8.17
isavi_SetImageSize
INT isavi_SetImageSize (int nAviID, int cMode, long Width, long Height, long PosX, long PosY, long LineOffset) Description isavi_SetImageSize() sets the size and position of the area of interest which will be saved to the AVI file. Only the defined area of interest of each frame will be saved. In addition, this function specifies the input colour format of the frames. You define these settings only once for the entire video.
The supported input colour formats are RGB32, RGB24, Y8 and raw Bayer. The output file will always be in RGB24 format, regardless of the input data format. For further information on the structure of the different colour formats, see the Appendix: Colour and Memory Formats section.
Input Parameters nAviID cMode Width Height PosX PosY LineOffset Instance ID set by the isavi_InitAVI() function. Colour format of the input frames captured by the uEye. Width of the entire frame or of the area of interest. Height of the entire frame or of the area of interest. X position (offset) of the area of interest. Y position (offset) of the area of interest. Line increment. The total widths of the areas clipped to the right and to the left of the area of interest make up this value.
268
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The AVI file is not open. Another capturing operation is in progress or an AVI file is still open. No memory could be allocated. The submitted colour mode is not supported for AVI capturing. The submitted size is invalid. The submitted position is invalid.
IS_AVI_ERR_INVALID_FILE IS_AVI_ERR_CAPTURE_RUNNING IS_AVI_ERR_ALLOC_MEMORY IS_AVI_ERR_INVALID_CM IS_AVI_ERR_INVALID_SIZE IS_AVI_ERR_INVALID_POSITION Related Functions isavi_SetFrameRate() isavi_SetImageQuality()
269
8.18
isavi_StartAVI
INT isavi_StartAVI (int nAviID) Description isavi_StartAVI() starts the image capture thread. Input Parameters nAviID Instance ID set by the isavi_InitAVI() function.
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The AVI file is not open.
270
8.19
isavi_StopAVI
INT isavi_StopAVI (int nAviID) Description isavi_StopAVI() stops the image capture thread. Subsequent calls of isavi_AddFrame() will be ignored. Input Parameters nAviID Instance ID set by the isavi_InitAVI() function.
Return Values IS_AVI_NO_ERR IS_AVI_ERR_INVALID_ID Function executed successfully The indicated AVI instance could not be found. Either the AVI ID is invalid or the instance has already been deleted using isavi_ExitAVI(). The AVI file is not open.
271
Obsolete Functions
We are continuously extending and enhancing the uEye API. The resulting product upgrades sometimes require replacing obsolete functions with new ones. We recommend against using the obsolete functions. They will continue to be supported for reasons of backward compatibility, but they will not be documented any longer. The functions listed in this chapter will not be included in future versions of this manual. The following table lists the obsolete functions and indicates the recommended alternatives. Obsolete function Recommended alternative No longer documented since driver version
is_DirectRenderer() is_DirectRenderer() is_DirectRenderer() is_DirectRenderer() The uEye memory board is not supported any longer (see below). is_GetCameraInfo() 3.30 3.20 3.31
is_GetWhiteBalanceMultipliers() is_SetAutoParameter() is_HideDDOverlay() is_IsMemoryBoardConnected() is_LockDDMem() is_LockDDOverlayMem() is_MemoryFreezeVideo() is_ReleaseDC() is_ResetMemory() is_SetBayerConversion() is_SetBrightness() is_SetContrast() is_SetDDUpdateTime() is_SetHwnd() is_SetImageAOI() is_SetImageSize() is_SetImagePos() is_SetKeyColor() is_SetMemoryMode() is_DirectRenderer() The uEye memory board is not supported any longer (see below). is_DirectRenderer() is_DirectRenderer() The uEye memory board is not supported any longer (see below). is_DirectRenderer() The uEye memory board is not supported any longer (see below). is_SetColorConverter() is_SetGamma() is_SetHardwareGamma() is_SetBlCompensation() is_SetExposureTime() is_SetHardwareGain() is_DirectRenderer() is_DirectRenderer() is_SetAOI() is_SetAOI() is_SetAOI() is_DirectRenderer() The uEye memory board is not supported any longer (see below).
3.30
3.30
3.30
3.40 3.40
3.30
272
9. Obsolete Functions.
is_SetWhiteBalance()
is_SetAutoParameter()
3.31 3.31
is_SetWhiteBalanceMultipliers() is_SetAutoParameter() is_ShowDDOverlay() is_StealVideo() is_TransferImage() is_TransferMemorySequence() is_UnlockDDMem() is_UnlockDDOverlayMem() is_UpdateDisplay() is_DirectRenderer() is_DirectRenderer() The uEye memory board is not supported any longer (see below). is_DirectRenderer() is_DirectRenderer() is_DirectRenderer()
3.30
The is_SetWhiteBalance() and is_SetWhiteBalanceMultipliers() functions have been completely replaced by the is_SetAutoParameter() function and are no longer supported by the uEye API. The optional memory board of the USB uEye SE and USB uEye RE camera series has been discontinued. From version 3.30, the functions required to operate the memory board will no longer be supported in the uEye driver. The uEye driver version 3.24 that still supports these functions will continue to be available in the download area of our website at http://www.ids-imaging.com.
273
9.1
is_DisableDDOverlay
In DirectDraw BackBuffer mode, is_DisableDDOverlay() disables overlay mode and releases the memory allocated to the overlay. This results in discarding of the overlay data. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_DisableDDOverlay() is_EnableDDOverlay() is_HideDDOverlay() is_SetDisplayMode() is_ShowDDOverlay() is_GetDDOvlSurface() Function executed successfully General error message Camera handle
274
9. 2 Obsolete Functions.is_EnableDDOverlay
9.2
is_EnableDDOverlay
In DirectDraw BackBuffer mode, is_EnableDDOverlay() enables live overlay mode. The overlay cannot be displayed directly, but needs to be visualised before by calling is_ShowDDOverlay(). The overlay uses black as the so-called key colour, so that overlay graphics may not contain any black colour. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetDisplayMode() is_DisableDDOverlay() is_ShowDDOverlay() is_HideDDOverlay() is_GetDDOvlSurface() Sample Programs uEyeOvl (C++) uEye VB Ovl Demo (VB6) Function executed successfully General error message Camera handle
275
9.3
is_GetDC
In DirectDraw BackBuffer mode, is_GetDC() returns the device context handle of the overlay buffer. Using this handle, it is possible to access the overlay using the Windows GDI functionality. Thus, all Windows graphics commands such as Line, Circle, Rectangle, TextOut,... are available. You should release the device context handle as early as possible using the is_ReleaseDC() function. While a GetDC...ReleaseDC block is executed, the overlay buffer on the screen will not be updated. Input Parameters hCam phDC Camera handle Pointer to the variable that is supposed to contain the device context handle
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_ReleaseDC() is_ShowDDOverlay() is_DisableDDOverlay() is_EnableDDOverlay() is_GetDDOvlSurface() is_SetDisplayMode() Function executed successfully General error message
276
9. 4 Obsolete Functions.is_GetDDOvlSurface
9.4
is_GetDDOvlSurface
In DirectDraw BackBuffer mode, is_GetDDOvlSurface() returns the pointer to the internal DirectDraw surface. Thus, the functionality provided by the DirectDraw Surface interface can be used. Input Parameters hCam ppDDSurf Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetDisplayMode() is_DisableDDOverlay() is_EnableDDOverlay() is_ShowDDOverlay() is_HideDDOverlay() Function executed successfully General error message Camera handle Contains the pointer to the DirectDraw Surface interface
277
9.5
is_HideDDOverlay
In DirectDraw BackBuffer mode, is_HideDDOverlay() hides the overlay. Only the contents of the image buffer will be displayed. This way, the frame rate is higher on some systems than with the overlay shown. By hiding the overlay, its data is not lost. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_ShowDDOverlay() is_DisableDDOverlay() is_EnableDDOverlay() is_GetDDOvlSurface() is_SetDisplayMode() Function executed successfully General error message Camera handle
278
9. 6 Obsolete Functions.is_LockDDMem
9.6
is_LockDDMem
is_LockDDMem() enables access to the image memory in DirectDraw mode and returns the pointer to the image memory. In most cases, the image memory is located on the graphics card. Using the pointer, you have direct access to the image memory. Make sure to release the memory as early as possible using the is_UnlockDDMem() function. Calling is_LockDDMem() will not interrupt the process of digitising an image and saving it to the memory area. While a LockDDMem ... UnlockDDMem block is executed in DirectDraw BackBuffer mode, the contents of the back buffer will not be refreshed on the screen. Input Parameters hCam ppMem pPitch Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_UnlockDDMem() is_LockDDOverlayMem() is_UnlockDDOverlayMem() is_LockSeqBuf() is_UnlockSeqBuf() is_UpdateDisplay() Function executed successfully General error message Camera handle Pointer to the variable that holds the address pointer Pointer to the variable that holds the pitch value
279
9.7
is_LockDDOverlayMem
In DirectDraw BackBuffer mode, is_LockDDOverlayMem() enables access to the overlay memory and returns the pointer to the starting address of the overlay buffer. This way, you can write data directly to the overlay buffer without the need to use the Windows GDI functions. pPitch returns the line offset (in bytes) from the beginning of a line to the beginning of the next line. Make sure to release the memory again as early as possible using the is_UnlockDDOverlayMem () function. While a LockDDOverlayMem...UnlockDDOverlayMem block is executed, the contents of the overlay buffer will not be refreshed on the screen. Input Parameters hCam ppMem pPitch Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions Is_UnlockDDOverlayMem() is_LockDDMem() is_UnlockDDMem() is_LockSeqBuf() is_UnlockSeqBuf() Function executed successfully General error message Camera handle Pointer to the variable that holds the address pointer Pointer to the variable that holds the pitch value
280
9. 8 Obsolete Functions.is_PrepareStealVideo
9.8
is_PrepareStealVideo
is_PrepareStealVideo() enables steal mode during DirectDraw display. Using the is_StealVideo() command, you can remove or copy an image from the DirectDraw video data stream. There are two different steal modes: Normal steal This option redirects a single frame from a DirectDraw video data stream to the active user memory. The frame will not be displayed with DirectDraw. Copy steal This option displays the frame with DirectDraw and copies it to the currently active image memory. Input Parameters hCam Mode IS_SET_STEAL_NORMAL IS_SET_STEAL_COPY StealColorMode Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_StealVideo() is_SetDisplayMode() is_AllocImageMem() is_SetImageMem() Function executed successfully General error message Normal mode Copy mode reserved Camera handle
281
9.9
is_ReleaseDC
In DirectDraw BackBuffer mode, is_ReleaseDC() releases the device context handle of the overlay buffer. If overlay display is enabled using the is_ShowDDOverlay() function, the contents of the overlay buffer will be updated on the screen after the handle release. Input Parameters hCam hDC Camera handle Device context handle returned by is_GetDC()
Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_GetDC() is_ShowDDOverlay() is_DisableDDOverlay() is_EnableDDOverlay() is_GetDDOvlSurface() is_SetDisplayMode() Function executed successfully General error message
282
9. 10 Obsolete Functions.is_SetBayerConversion
9.10
is_SetBayerConversion
INT is_SetBayerConversion (HIDS hCam, INT nMode) Description is_SetBayerConversion() enables you to select one of two algorithms for the Bayer conversion. These algorithms vary in the obtainable quality and in the required computer load.
This function is obsolete and should not be used anymore. We recommend to use the is_SetColorConverter() function instead (see also Obsolete Functions).
This function can only be used for the 24 bit, 32 bit and Y8 colour formats (colour cameras).
Input Parameters hCam nMode IS_SET_BAYER_CV_BETTER IS_SET_BAYER_CV_BEST IS_GET_BAYER_CV_MODE Return Values IS_SUCCESS IS_NO_SUCCESS Current setting when used together with IS_GET_BAYER_CV_MODE Related Functions is_SetColorConverter() is_SetColorMode() is_SetColorCorrection() Function executed successfully General error message Good quality, minor colour artifacts, lower computational load Best quality and edge acuity, higher computational load Returns the current setting. Camera handle
283
9.11
is_SetDDUpdateTime
is_SetDDUpdateTime() sets the timer interval used for the video image update cycle in DirectDraw BackBuffer mode. Input Parameters hCam ms Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetDisplayMode() is_UpdateDisplay() Function executed successfully General error message Camera handle Time in milliseconds. Valid range: 20...2000 ms
284
9. 12 Obsolete Functions.is_SetHwnd
9.12
is_SetHwnd
USB 2.0 GigE Syntax INT is_SetHwnd (HIDS hCam, HWND hwnd) Description
This function is obsolete and should not be used anymore. We recommend to use the is_DirectRenderer() function instead (see also Obsolete Functions).
is_SetHwnd() sets a new window handle for image output in DirectDraw mode. The new handle and the image output will only be effective when is_SetDisplayMode() is called for the next time. Input Parameters hCam hwnd Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_SetDisplayMode() Function executed successfully General error message Camera handle Window handle
285
9.13
is_SetImageAOI
INT is_SetImageAOI (HIDS hCam, INT xPos, INT yPos, INT width, INT height) Description
This function is obsolete and should not be used anymore. We recommend to use the is_SetAOI() function instead (see also Obsolete Functions).
Input Parameters hCam xPos yPos width height Return Values IS_SUCCESS IS_NO_SUCCESS IS_INVALID_MODE Related Functions is_SetAOI() is_SetImagePos() is_SetImageSize() is_SetBinning() is_SetSubSampling() Function executed successfully General error message Camera is in standby mode, function not allowed. Camera handle X position of the upper left corner. Y position of the upper left corner. Image width Image height
286
9. 14 Obsolete Functions.is_SetImageSize
9.14
is_SetImageSize
In conjunction with the is_SetImagePos() settings, is_SetImageSize() determines the size of the captured area of interest (AOI). To avoid a positional mismatch between the display area and the image area, make sure to call the functions in the correct order. Starting from the original image, it is mandatory to keep to the following order: 1. is_SetImageSize() 2. is_SetImagePos()
is_SetAOI() combines both functions. With is_SetAOI(), you can set the position and size of an area
of interest using a single function call.
Changes to the image geometry or pixel clock affect the value ranges of the frame rate and exposure time. After executing is_SetBinning(), calling the following functions is recommended in order to keep the defined camera settings: is_SetFrameRate() is_SetExposureTime() If you are using the uEye's flash function: is_SetFlashStrobe()
287
Input Parameters hCam x 1...xMax IS_GET_IMAGE_SIZE_X IS_GET_IMAGE_SIZE_X_MIN IS_GET_IMAGE_SIZE_X_MAX IS_GET_IMAGE_SIZE_X_INC IS_GET_IMAGE_SIZE_Y IS_GET_IMAGE_SIZE_Y_MIN IS_GET_IMAGE_SIZE_Y_MAX IS_GET_IMAGE_SIZE_Y_INC y 1...yMax 0 Return Values IS_SUCCESS IS_NO_SUCCESS Function executed successfully General error message Sets the image height Return settings Sets the image width Returns the current image width. Returns the minimum AOI image width. Returns the maximum AOI image width. Returns the increment for the AOI image width. Returns the current image height. Returns the minimum AOI image height Returns the maximum AOI image height Returns the increment for the AOI image height Camera handle
Current setting when used together with IS_GET_IMAGE_SIZE parameters IS_INVALID_MODE Camera is in standby mode, function not allowed. Related Functions is_SetAOI() is_SetImagePos()
288
9. 15 Obsolete Functions.is_SetKeyColor
9.15
is_SetKeyColor
Using is_SetKeyColor(), you define the key colour for DirectDraw Overlay Surface mode. This function can also be used to return the key colour. Use the r parameter to specify the colour value to be returned. Depending on the call type, the function returns either a value reflecting the colour content (0...255) or the corresponding RGB value (0 ... 16777215). Input Parameters hCam r IS_GET_KC_RED IS_GET_KC_GREEN IS_GET_KC_BLUE IS_GET_KC_RGB g b Return Values IS_SUCCESS IS_NO_SUCCESS Colour value when used together with IS_GET_KC_RGB IS_GET_KC_RED IS_GET_KC_GREEN IS_GET_KC_BLUE Recommended Alternative is_DirectRenderer() Related Functions is_SetDisplayMode() is_ShowDDOverlay() Function executed successfully General error message Camera handle Red content of the key colour (0...255). The function returns the red content value. The function returns the green content value. The function returns the blue content value. The function returns the RGB colour. Green content of the key colour (0...255). Blue content of the key colour (0...255).
289
Programming Manual uEye Software Development Kit V3.40 is_HideDDOverlay() is_DisableDDOverlay() is_EnableDDOverlay() is_GetDDOvlSurface() is_SetColorMode()
290
9. 16 Obsolete Functions.is_ShowDDOverlay
9.16
is_ShowDDOverlay
In DirectDraw BackBuffer mode, is_ShowDDOverlay() displays the overlay, i.e. the most recent data stored in the overlay buffer. With some graphics cards, overlay display may reduce the frame rate. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Recommended Alternative is_DirectRenderer() Related Functions is_HideDDOverlay() is_DisableDDOverlay() is_EnableDDOverlay() is_GetDDOvlSurface() is_SetDisplayMode() Function executed successfully General error message Camera handle
291
9.17
is_StealVideo
Using is_StealVideo(), you can initiate the extraction of an image from the DirectDraw image data stream. The extracted image is written to the active image memory. The data includes the colour format set with the is_SetColorMode() function. You can use the is_PrepareStealVideo() function to specify to remove the image from the DirectDraw data stream or to copy it. If you set the copy option, the image will both be displayed using DirectDraw and copied to the currently active image memory. See also the Events in Live Mode figure in the Event Handling section. Input Parameters hCam Wait IS_WAIT IS_DONT_WAIT Return Values IS_SUCCESS IS_NO_SUCCESS Related Functions is_PrepareStealVideo() is_SetDisplayMode() is_SetColorMode() is_AllocImageMem() is_SetImageMem() is_SetAllocatedImageMem() Sample Programs uEyeSteal (C++) Function executed successfully General error message The function waits until the image save is complete. The function returns immediately. Camera handle
292
9. 18 Obsolete Functions.is_UnlockDDMem
9.18
is_UnlockDDMem
Using is_UnlockDDMem(), you can unlock the image memory in the DirectDraw modes. This results in a refresh of the BackBuffer contents on the screen. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Recommended Alternative is_DirectRenderer() Related Functions is_LockDDMem() is_LockDDOverlayMem() is_UnlockDDOverlayMem() is_LockSeqBuf() is_UnlockSeqBuf() is_UpdateDisplay() Function executed successfully General error message Camera handle
293
9.19
is_UnlockDDOverlayMem
Using is_UnlockDDOverlayMem(), you can unlock the overlay buffer in DirectDraw BackBuffer mode. This results in an overlay buffer refresh on the screen, provided that the overlay display was enabled using is_ShowDDOverlay(). Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Recommended Alternative is_DirectRenderer() Related Functions is_LockDDOverlayMem() is_UnlockDDOverlayMem() is_LockDDMem() is_UnlockDDMem() is_LockSeqBuf() is_UnlockSeqBuf() is_UpdateDisplay() Function executed successfully General error message Camera handle
294
9. 20 Obsolete Functions.is_UpdateDisplay
9.20
is_UpdateDisplay
Using is_UpdateDisplay(), you can manually update the screen output in the DirectDraw modes. In normal operation, the driver performs updates automatically. There may be cases, however, where a manual update of the screen output is necessary. Input Parameters hCam Return Values IS_SUCCESS IS_NO_SUCCESS Recommended Alternative is_DirectRenderer() Related Functions is_SetDisplayMode() is_LockDDOverlayMem() is_UnlockDDOverlayMem() is_LockDDMem() is_UnlockDDMem() Function executed successfully General error message Camera handle
295
10
10.1
Appendix
Colour and Memory Formats
Each colour format supported by the uEye camera defines a different memory format. The following table shows the byte arrangement in memory:
An asterisk (*) identifies formats which are filled starting with the most significant bit (MSB) but which may have less than the indicated number of payload bits, depending on the camera model. For the RGB16 and RGB15 data formats, the MSBs of the internal 8-bit R, G and B colours are used.
296
10.2
Only camera-specific ini files can be loaded. The ini file you want to load has to match the paired camera model. When loading an ini file, make sure that the image size (AOI) and colour depth parameters in the ini file match those in the allocated memory. Otherwise, display errors may occur.
uEye parameter files can also be created and edited manually. The following table shows the structure of the parameter file. The entries in square brackets [] indicate sections. If a section does not exist in the ini file, the corresponding camera parameters will not be modified when you load the file. Structure of a uEye parameter file
Parameter [Versions] ueye_api.dll ueye_eth.sys ueye_usb.sys ueye_boot.sys File version of the uEye API File version of the GigE uEye driver File version of the USB uEye driver 3.32.0000 3.32.0000 3.32.0000 3.32.0000 Description Value range Example
Image size settings Start point (X coordinate) in AOI mode Start point (Y coordinate) in AOI mode 0...(max. width1)Width) 0...(max. height1)Height) 100
Start Y
100
Start X absolute
Activate absolute AOI positioning 0, 1 in the memory (see is_SetImagePos()) Activate absolute AOI positioning 0, 1 in the memory (see is_SetImagePos()) Width of the AOI Height of the AOI Sensor-dependent1) Sensor-dependent1)
Start Y absolute
2460 1820 0 0
Activate binning mode and select Sensor-dependent2) factor Activate subsampling mode and select factor Sensor-dependent2)
297
Value range
Example
Current pixel clock of the camera Sensor-dependent1) Current frame rate Depends on Pixelclock and image geometry Depends on Framerate
103 15.104458
Exposure
0.334059
[Selected Converter]
Sets the type of Bayer conversion for the specified colour format when using colour cameras (see is_SetColorConverter()). For a description of all colour formats, see the Colour and Memory Formats section. Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format Colour format 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 0, 1, 2, 4, (8 3)) 2 2 2 2 2 2 8 2 2 2 8 8 8 8 8 8 8 2 2 8 8
IS_SET_CM_RGB32 IS_SET_CM_RGB24 IS_SET_CM_RGB16 IS_SET_CM_RGB15 IS_SET_CM_Y8 IS_SET_CM_RGB8 IS_SET_CM_BAYER IS_SET_CM_UYVY IS_SET_CM_UYVY_MONO IS_SET_CM_UYVY_BAYER IS_CM_CBYCRY_PACKED IS_SET_CM_RGBY IS_SET_CM_RGB30 IS_SET_CM_Y12 IS_SET_CM_BAYER12 IS_SET_CM_Y16 IS_SET_CM_BAYER16 IS_CM_RGBA8_PACKED IS_CM_RGB8_PACKED IS_CM_RGBY8_PACKED IS_CM_RGB10V2_PACKED
[Parameters] Colormode
Additional image parameter settings Sets the current colour mode see Colour and Memory Formats 11
298
Parameter Brightness Contrast Gamma Hardware Gamma Blacklevel Mode Blacklevel Offset Hotpixel Mode Hotpixel Threshold GlobalShutter
Software correction of the gamma 0.01...10.0 value Sensor-based hardware correction of the gamma value 0, 1
Mode for black level correction of 0, 1, 32 2) the sensor Manual offset for black level correction of the sensor Mode for hot pixel correction Not used Enables the Global Start shutter of the sensor 0...255 0, 1, 2, 4 2)
0, 1
Sets the sensor gain control for image brightness Master gain Red gain Green gain Blue gain Activate gain boost 0...100 0...100 0...100 0...100 0,1 0 6 0 6 0
[Processing] EdgeEnhancement RopEffect Whitebalance Whitebalance Red Whitebalance Green Whitebalance Blue Color correction
Parameters for image pre-processing in the driver Enable edge enhancement Image geometry change (Rop = raster operation), e.g. mirroring Enable software white balance Red factor for software white balance Green factor for software white balance Blue factor for software white balance Enable colour correction 0...2 0, 8, 16, 32, 64 2) 0, 1, 2, 4 2) double value double value double value 0, 1, 2, 4, 80 2) 0.0...1.0 1, 2 2) 0 0 0 1.000000 1.000000 1.000000 1 1.000000 1
Color_correction_factor Set the colour correction factor Bayer Conversion Sets the size of the Bayer conversion mask for the current colour format when using colour cameras
Sets the parameters for automatic image control Enable frame rate control 0, 1 0, 1 0 0
299
Parameter
Description
Value range 0, 1
Brightness control once Carry out brightness control once 0, 1 Brightness reference Brightness speed Brightness max gain Reference value for brightness control Brightness control speed Maximum gain for brightness control 0...255 0...100 0...100 Depends on Pixelclock and image geometry 0...(max. width1)-Aoi Width)
Brightness max exposure Maximum exposure time for brightness control Brightness Aoi Left X start point of reference AOI for brightness control Y start point of reference AOI for brightness control Width of reference AOI for brightness control Height of reference AOI for brightness control Enable white balance control Red offset for white balance control Blue offset for white balance control Minimum gain for white balance control Maximum gain for white balance control White balance control speed X start point of reference AOI for white balance control Y start point of reference AOI for white balance control Width of reference AOI for white balance control Height of reference AOI for white balance control Carry out white balance control once
0...(max. height1)-Aoi 0 Height) Sensor-dependent1) Sensor-dependent1) 0, 1 0...100 0...100 0 <= gainMin <= gainMax <= 100 0 <= gainMin <= gainMax <= 100 0...100 0...(max. width1)-Aoi Width) 2560 1920 0 0 0 0 100 50 0
Brightness Aoi Width Brightness Aoi Height Auto WB control Auto WB offsetR Auto WB offsetB Auto WB gainMin Auto WB gainMax Auto WB speed Auto WB Aoi Left
Sets the digital inputs/outputs Delay of triggered image capture Sensor-dependent1) in s Activate flash output 0...6 2) 15 0
300
Value range
Example
Depends on sensor 0 setting, can be queried using is_SetFlashDelay() Depends on sensor 200 setting, can be queried using is_SetFlashDelay()
Flash duration
1) 2)
This information is provided in the Specifications: Sensors chapter of the uEye User Manual.
For the parameters, please refer to the uEye.h header file provided in the \Develop\include folder of the uEye installation directory (see also Programmierhinweise).
3) X)
Only for GigE uEye HE cameras. Function ist obsolete, see chapter Obsolete Functions.
301
10.3
3 11 12 15 16 17 18 49 50 51 52 53
IS_NO_IMAGE_MEM_ALLOCATED The driver could not allocate memory. IS_CANT_CLEANUP_MEMORY IS_CANT_COMMUNICATE_WITH_DRIVER Communication with the driver failed because no driver has been loaded. IS_FUNCTION_NOT_SUPPORTED_YET function is not supported yet. The IS_INVALID_MEMORY_POINTER Invalid pointer or invalid memory ID. IS_FILE_WRITE_OPEN_ERROR IS_FILE_READ_OPEN_ERROR File cannot be opened for writing. File cannot be opened for reading.
IS_FILE_READ_INVALID_BMP_ID specified file is not a valid bitmap file. The IS_FILE_READ_INVALID_BMP_SIZE bitmap size is not correct (bitmap too large). The No active image memory available. You must set the memory to active using the is_SetImageMem() function or create a sequence using the is_AddToSequence() function. The sequence list is empty and cannot be deleted. The image memory is already included in the sequence and cannot be added again.
108 IS_NO_ACTIVE_IMG_MEM
117 IS_SEQUENCE_BUF_ALREADY_LOCKED The memory could not be locked. The pointer to the buffer is invalid. 118 IS_INVALID_DEVICE_ID 119 IS_INVALID_BOARD_ID 120 IS_ALL_DEVICES_BUSY 122 IS_TIMED_OUT 125 IS_INVALID_PARAMETER The device ID is invalid. Valid IDs start from 1 for USB cameras, and from 1001 for GigE cameras. The board ID is invalid. Valid IDs range from 1 through 255. All cameras are in use. A timeout occurred. An image capturing process could not be terminated within the allowable period. One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. No memory could be allocated. The camera is connected to a port which does not support the USB 2.0 high-speed standard.
302
No
Error
Description A capturing operation is in progress and must be terminated before you can start another one. The requested image is not available in the camera memory or is no longer valid. The function cannot be used because the camera is waiting for a trigger signal. A CRC error correction problem occurred while reading the settings. This function has not been enabled yet in this version. The camera does not contain any calibration data. The system is waiting for the kernel driver to respond. The camera model used here does not support this function or setting. The dialogue was cancelled without a selection so that no file could be saved. An internal structure has an incorrect size. The image memory has an inappropriate size to store the image in the desired format. This setting is not available for the currently set pixel clock frequency. This setting is not available for the currently set exposure time. This setting cannot be changed while automatic exposure time control is enabled. The BackBuffer surface cannot be created. The BackBuffer mix surface cannot be created. The BackBuffer overlay memory cannot be locked. The BackBuffer overlay memory cannot be created. Back buffer surface invalid. Back buffer surface not found. Error releasing the overlay device context. The back buffer timer could not be created. The back buffer overlay was not enabled. Only possible in BackBuffer mode. Invalid colour format.
140 IS_CAPTURE_RUNNING 145 IS_IMAGE_NOT_PRESENT 148 IS_TRIGGER_ACTIVATED 151 IS_CRC_ERROR 152 IS_NOT_YET_RELEASED 153 IS_NOT_CALIBRATED 154 IS_WAITING_FOR_KERNEL 155 IS_NOT_SUPPORTED 157 IS_OPERATION_ABORTED 158 IS_BAD_STRUCTURE_SIZE 159 IS_INVALID_BUFFER_SIZE 160 IS_INVALID_PIXEL_CLOCK 161 IS_INVALID_EXPOSURE_TIME 162 IS_AUTO_EXPOSURE_RUNNING 163 IS_CANNOT_CREATE_BB_SURF 164 IS_CANNOT_CREATE_BB_MIX 165 IS_BB_OVLMEM_NULL 166 IS_CANNOT_CREATE_BB_OVL 168 IS_INVALID_SURFACE 169 IS_SURFACE_LOST 170 IS_RELEASE_BB_OVL_DC 171 IS_BB_TIMER_NOT_CREATED 172 IS_BB_OVL_NOT_EN 173 IS_ONLY_IN_BB_MODE 174 IS_INVALID_COLOR_FORMAT
175 IS_INVALID_WB_BINNING_MODE Mono binning / mono sub-sampling do not support automatic white balance. 176 IS_INVALID_I2C_DEVICE_ADDRESS I2C device address. Invalid 177 IS_COULD_NOT_CONVERT 178 IS_TRANSFER_ERROR 180 IS_INVALID_CAMERA_TYPE The current image could not be processed. Transfer error. The camera type defined in the .ini file does not match the
303
No
Error
304
10.4
305
is_GetTimeout() is_GetUsedbandwidth() is_GetVsyncCount() is_HasVideoStarted() is_InitCamera() is_InitEvent() is_InquireImageMem() is_IsVideoFinish() is_LoadBadPixelCorrectionTable() is_LoadImage() is_LoadImageMem() is_LoadParameters() is_LockSeqBuf() is_ReadEEPROM() is_ReadI2C() is_ResetCaptureErrorInfo() is_ResetToDefault() is_SaveBadPixelCorrectionTable() is_SaveImage() is_SaveImageEx() is_SaveImageMem() is_SaveImageMemEx() is_SaveParameters() is_SetAllocatedImageMem() is_SetAOI() is_SetAutoCfgIpSetup() is_SetAutoParameter() is_SetBadPixelCorrection() is_SetBadPixelCorrectionTable() is_SetBayerConversion() is_SetBinning() is_SetBlCompensation() is_SetCameraID() is_SetCameraLUT() is_SetColorConverter() is_SetColorCorrection() is_SetColorMode() is_SetConvertParam() is_SetEdgeEnhancement() is_SetErrorReport() is_SetExposureTime() is_SetExternalTrigger() is_SetFlashDelay() is_SetFlashStrobe() is_SetFrameRate() is_SetGainBoost() is_SetGamma() is_SetGlobalShutter() is_SetHardwareGain() is_SetHardwareGamma()
306
is_SetHdrKneepoints() is_SetHWGainFactor() is_SetImageAOI() *) is_SetImageMem() is_SetImagePos() is_SetImageSize() *) is_SetIO() is_SetIOMask() is_SetLED() is_SetOptimalCameraTiming() is_SetPacketFilter() is_SetPersistentIpCfg() is_SetPixelClock() is_SetRopEffect() is_SetSaturation() is_SetSensorTestImage() is_SetStarterFirmware() is_SetSubSampling() is_SetTimeout() is_SetTriggerCounter() is_SetTriggerDelay() is_StopLiveVideo() is_UnlockSeqBuf() is_WriteEEPROM() is_WriteI2C() Isavi_AddFrame() Isavi_CloseAVI() Isavi_DisableEvent() Isavi_EnableEvent() Isavi_ExitAVI() Isavi_ExitEvent() Isavi_GetAVIFileName() Isavi_GetAVISize() Isavi_GetnCompressedFrames() Isavi_GetnLostFrames() Isavi_InitAVI() Isavi_InitEvent() Isavi_OpenAVI() Isavi_ResetFrameCounters() Isavi_SetFrameRate() Isavi_SetImageQuality() Isavi_SetImageSize() Isavi_StartAVI() Isavi_StopAVI()
*) Function ist obsolete, see chapter Obsolete Functions.
307
10.5
Obsolete FALCON function is_InitBoard() is_ExitBoard() is_InitFalcon() is_ExitFalcon() is_GetBoardType() is_GetBoardInfo() is_BoardStatus() is_GetNumberOfDevices() is_GetNumberOfBoards()
Recommended uEye SDK function is_InitCamera() is_ExitCamera() is_InitCamera() is_ExitCamera() is_GetCameraInfo() is_GetCameraInfo() is_CameraStatus() is_GetNumberOfCameras() is_GetNumberOfCameras()
308
is_GetCurrentField() is_GetIRQ() is_GetPciSlot() is_OvlSurfaceOffWhileMove() is_ScaleDDOverlay() is_SetAGC() is_SetCaptureMode() is_SetDecimationMode() is_SetDisplaySize() is_SetHorFilter() is_SetHue() is_SetKeyOffset() is_SetParentHwnd() is_SetPassthrough() is_SetRenderMode() is_SetSync() is_SetSyncLevel() is_SetToggleMode() is_SetUpdateMode() is_SetVertFilter() is_SetVideoCrossbar() is_SetVideoInput() is_SetVideoMode() is_SetVideoSize() is_ShowColorBars() is_Watchdog() is_WatchdogTime()
309
10.6
310