Home > C: Programming > Function Descriptions > | History back Previous chapter Next chapter Print |
is_InitCamera |
uEye Camera Manual Version 3.80
is_InitCamera
USB 2.0 GigE |
USB 2.0 GigE |
Syntax
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.
|
|
|
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. |
phCam | |
The camera is opened using the device ID instead of the camera ID. For details on device ID please refer to the is_GetCameraList() chapter. |
phCam | |
During initialization of the camera, this parameter checks 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 |
Function executed successfully |
IS_NO_SUCCESS |
General error message |
IS_STARTER_FW_UPLOAD_NEEDED |
The camera's starter firmware is not compatible with the driver and needs to be updated. |
Related Functions
• | is_GetDuration() (when a GigE uEye SE camera is used) |
• | is_SetStarterFirmware() (when a GigE uEye SE camera is used) |
//Open camera with ID 1 HIDS hCam = 1; INT nRet = is_InitCamera (&hCam, NULL);
if (nRet != IS_SUCCESS) { //Check if GigE uEye SE needs a new starter firmware if (nRet == IS_STARTER_FW_UPLOAD_NEEDED) { //Calculate time needed for updating the starter firmware INT nTime; 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#) |