| Home > C: Programming > Function descriptions > | History back Previous chapter Next chapter Print |
is_Exposure |
|
uEye Camera Manual Version 4.00
|
|
USB 2.0 USB 3.0 GigE |
USB 2.0 USB 3.0 GigE |
Syntax
INT is_Exposure (HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)
Description
Using is_Exposure() you can query the exposure time ranges available in your camera, and set new exposure times.
The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the cbSizeOfParam input parameter.
|
|
|
|
Applying new settings
In freerun 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. See also the Applying new parameters chapter.
Accuracy of the exposure time setting
The increments for setting the exposure time (IS_GET_EXPOSURE_INCREMENT) depend on the sensor's current timing settings (pixel clock, frame rate). The smallest increment usually corresponds to the duration of one pixel row, which is the time it takes the sensor to read out one pixel row.
You can query the actual exposure time setting with the IS_EXPOSURE_CMD_GET_EXPOSURE parameter.
Some sensors allow setting the exposure time in smaller increments. Using the IS_EXPOSURE_CMD_GET_CAPS parameter, you can check whether your sensor supports this function.
For minimum and maximum exposure times as well as other sensor-based dependencies, please refer to the Camera and sensor data chapter.
Rounding errors from increments
When calculating a new exposure time based on the returned increment, note that calculations with floating point values in the PC will always be subject to rounding errors. Therefore, an addition or subtraction of the n*INCREMENT value might not always produce the exact desired result. In this case, the uEye API rounds down the floating point value and sets the exposure time to the next lower value.
You can avoid this behavior by additionally adding the value INCREMENT/2.f (half increment) when calculating with n*INCREMENT. This ensures that the desired value will be set even after rounding.
|
|
Input parameters
hCam |
Camera handle |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
pParam |
Pointer to a function parameter, whose function depends on nCommand. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
cbSizeOfParam |
Size (in bytes) of the memory area to which pParam refers. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents of the EXPOSURE_CAPS structure
INT |
IS_EXPOSURE_CAP_EXPOSURE |
The exposure time setting is supported |
INT |
IS_EXPOSURE_CAP_FINE_INCREMENT |
Fine exposure time increments are supported |
INT |
IS_EXPOSURE_CAP_LONG_EXPOSURE |
Long time exposure is supported |
Return values
IS_CANT_OPEN_DEVICE |
An attempt to initialize or select the camera failed (no camera connected or initialization error). |
IS_CANT_COMMUNICATE_WITH_DRIVER |
Communication with the driver failed because no driver has been loaded. |
IS_INVALID_CAMERA_TYPE |
The camera type defined in the .ini file does not match the current camera model. |
IS_INVALID_CAMERA_HANDLE |
Invalid camera handle |
IS_INVALID_MODE |
Camera is in standby mode, function not allowed UI-146x/UI-546x models: Function not allowed because the camera is in freerun synchronization mode. |
IS_INVALID_PARAMETER |
One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. |
IS_IO_REQUEST_FAILED |
An IO request from the uEye driver failed. Possibly the versions of the ueye_api.dll (API) and the driver file (ueye_usb.sys or ueye_eth.sys) do not match. |
IS_NO_SUCCESS |
General error message |
IS_NOT_CALIBRATED |
The camera does not contain any calibration data. |
IS_NOT_SUPPORTED |
The camera model used here does not support this function or setting. |
IS_SUCCESS |
Function executed successfully |
IS_TIMED_OUT |
A timeout occurred. An image capturing process could not be terminated within the allowable period. |
Related functions
UINT nCaps = 0;
INT nRet = is_Exposure(m_hCam, IS_EXPOSURE_CMD_GET_CAPS, (void*)&nCaps, sizeof(nCaps));
if (nRet == IS_SUCCESS)
{
if (nCaps & IS_EXPOSURE_CAP_FINE_INCREMENT)
{
// Fine increment supported
}
}
double dblMin, dblMax, dblInc;
INT nRet = is_Exposure(m_hCam,
IS_EXPOSURE_CMD_GET_FINE_INCREMENT_RANGE_MIN,
(void*)&dblMin,
sizeof(dblMin)
);
INT nRet = is_Exposure(m_hCam,
IS_EXPOSURE_CMD_GET_FINE_INCREMENT_RANGE_MAX,
(void*)&dblMax,
sizeof(dblMax)
);
INT nRet = is_Exposure(m_hCam,
IS_EXPOSURE_CMD_GET_FINE_INCREMENT_RANGE_INC,
(void*)&dblInc,
sizeof(dblInc)
);
double dblRange[3];
double dblMin, dblMax, dblInc;
INT nRet = is_Exposure(m_hCam,
IS_EXPOSURE_CMD_GET_FINE_INCREMENT_RANGE,
(void*)dblRange,
sizeof(dblRange)
);
if (nRet == IS_SUCCESS)
{
dblMin = dblRange[0];
dblMax = dblRange[1];
dblInc = dblRange[2];
}