Describes the way to control the camera exposure.
More...
Describes the way to control the camera exposure.
Exposure Time And Integration Control
Exposure Time
The light sensitive elements of the photoelectric sensor accumulate the charge that is generated by the incident light. The duration of this The duration of this process is called exposure time. Because of accumulation of the charges it is called also integration time. This both terms refer to the same process, the API functions SK_SETEXPOSURETIME and SK_SETINTEGRATIONTIME are identical. The longer exposure time the higher the intensity of the line scan signal, assuming constant illumination conditions.
Every line scan camera has a specific minimum exposure period, which is a function of sensor length and pixel clock frequency. Thus, the minimum exposure period determines the maximum line frequency of that camera and this is declared in the data sheet of the particular camera type.
Integration Control
Integration Control is a specific feature of the most sensors. It works like a shutter by stopping pixel charge accumulation within an exposure period, thereby restricting the integration of the signal. The Integration Control function is useful at very strong light, such as laser light, direct sunlight, or flash, to avoid over exposure of the sensor.
Example:
Adjustment of exposure time with varying effects on line frequency Camera: SK2048U3PD, 60 MHz pixel clock frequency
-
0.036 [ms] → SK_SETEXPOSURETIME(CamID, 0.036): exposure time = 0.036 ms –> line frequency = 27.777 kHz (= maximum)
-
0.106 [ms] → SK_SETEXPOSURETIME(CamID, 0.106): exposure time = 0.106 ms –> line frequency = 9.433 kHz
-
0.021 [ms] → SK_SETEXPOSURETIME(CamID, 0.021): exposure time = 0.021 ms –> line frequency = 27.777 kHz
In example 3, the integration time is shorter than the minimum exposure period, and the camera performs in Integration Control mode automatically. The shorter integration time means that the signal intensity is reduced, but the line frequency remains at the maximum of 27.777 kHz.
Line Frequency
To acquire an image in correct aspect ratio, the scanning speed and the image acquisition process must be synchronized. This is most easily achieved by adjusting the transport speed to the line frequency of the camera. However, in practice, it is usually the transport speed and the image resolution that are constraining and these predefine the line frequency.
At constant transport speeds, such as when examining objects on a conveyer belt, a line scan camera can be allowed to operate in a free-running mode. Conversely, any velocity fluctuations or discordant movements require the coordinated triggering of the line camera over equally spaced increments. The most convenient solution is for the software control unit of the transport motor to be made responsible for coordinating the individual line scans also. This precise synchronization guarantees images with a reproducible resolution and correct aspect ratio (see the figure below). The line frequency
can be calculated for a given object speed
and field width
, sensor length
and pixel width
from
Decoupling Line Frequency
This feature allows the decoupling of line frequency and exposure time. In normally the changing of exposure time causes a changing of line frequency. If the feature is activated, the camera holds the current line frequency constant. The expsoure time can be controlled in the range from the reciprocal value of the fixed line frequency down to the shortest possible exposure time.
This function is useful e.g. in untriggered image acquisition in Free Run mode, if the line frequency is synchronized with the scan velocity and must be constant, but the integration time has to be reduced because of too much light.
Example for the SK2048U3PD:
Pixel Frequency
The pixel frequency is the clock rate at which the freed charges are read out of the sensor. The maximum pixel frequency is a individual characteristic of each sensor. Cameras from Schaefter+Kirchhoff are able to work with maximum or the half of maximum pixel frequency.
Together with the sensor length, the pixel clock determines the exposure period and the maximum line frequency. The higher the pixel frequency, the higher the camera speed. But, also the power consumption of the camera is higher. If a camera should be connected at a USB 2.0 port, it can be needed to select a lower pixel frequency.
int SK_DECOUPLINGLF |
( |
int |
CamID, |
|
|
bool |
enable |
|
) |
| |
Decoupling of line frequency.
If the line frequency is decoupled, it is possible to adjust the integration time in a range of reciprocal of this line frequency to SK_GETMINEXPOSURETIME, wherein the line frequency is unchanged.
- See also
- SK_GETDECOUPLINGLF
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
enable | true = enable line frequency decoupling,
false = disable line frequency decoupling |
- Returns
- SK_RESULT_OK on success, else see Error Code Table
int SK_GETDECOUPLINGLF |
( |
int |
CamID | ) |
|
Returns the status of line frequency decoupling.
- See also
- SK_DECOUPLINGLF
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
- Returns
- 0 = line frequency decoupling not active
1 = line frequency decoupling active
else see Error Code Table
double SK_GETEXPOSURETIME |
( |
int |
CamID | ) |
|
double SK_GETEXPOSURETIME_BLUE |
( |
int |
CamID | ) |
|
double SK_GETEXPOSURETIME_GREEN |
( |
int |
CamID | ) |
|
double SK_GETEXPOSURETIMEFROMCAMERA |
( |
int |
CamID | ) |
|
double SK_GETINTEGRATIONTIME |
( |
int |
CamID | ) |
|
double SK_GETINTEGRATIONTIME_BLUE |
( |
int |
CamID | ) |
|
Get the current integration time for blue channel in milliseconds.
- Deprecated:
- see SK_GETEXPOSURETIME_BLUE
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
- Returns
- integration time in milliseconds for blue channel, else see Error Code Table
double SK_GETINTEGRATIONTIME_GREEN |
( |
int |
CamID | ) |
|
double SK_GETLINEFREQUENCY |
( |
int |
CamID | ) |
|
double SK_GETMAXEXPOSURETIME |
( |
int |
CamID | ) |
|
double SK_GETMAXLINEFREQUENCY |
( |
int |
CamID | ) |
|
double SK_GETMAXLINEFREQUENCYFROMCAMERA |
( |
int |
CamID | ) |
|
double SK_GETMAXPIXELFREQUENCY |
( |
int |
CamID | ) |
|
double SK_GETMINEXPOSURETIME |
( |
int |
CamID | ) |
|
double SK_GETMINLINEFREQUENCY |
( |
int |
CamID | ) |
|
double SK_GETMINPIXELFREQUENCY |
( |
int |
CamID | ) |
|
double SK_GETPIXELFREQUENCY |
( |
int |
CamID | ) |
|
int SK_SETEXPOSURETIME |
( |
int |
CamID, |
|
|
double |
exposureTimeMs |
|
) |
| |
int SK_SETEXPOSURETIME_BLUE |
( |
int |
CamID, |
|
|
double |
exposureTimeMs |
|
) |
| |
int SK_SETEXPOSURETIME_GREEN |
( |
int |
CamID, |
|
|
double |
exposureTimeMs |
|
) |
| |
int SK_SETINTEGRATIONTIME |
( |
int |
CamID, |
|
|
double |
integrationTimeMs |
|
) |
| |
Integration time control.
- Deprecated:
- See SK_SETEXPOSURETIME
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
integrationTimeMs | integration time in milliseconds [ms] |
- Returns
- SK_RESULT_OK on success, else see Error Code Table
int SK_SETINTEGRATIONTIME_BLUE |
( |
int |
CamID, |
|
|
double |
integrationTimeMs |
|
) |
| |
Integration time control for blue channel.
- Deprecated:
- See SK_SETEXPOSURETIME_BLUE
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
integrationTimeMs | integration time for blue channel in milliseconds [ms] |
- Returns
- SK_RESULT_OK on success, else see Error Code Table
int SK_SETINTEGRATIONTIME_GREEN |
( |
int |
CamID, |
|
|
double |
integrationTimeMs |
|
) |
| |
Integration time control for green channel.
Sets the integration time for green channel in milliseconds
- Note
- This function is available only for color line scan cameras and if decoupling of line frequency is enabled.
- Since
- camera revision 1.22 / 2.22
- Deprecated:
- See SK_SETEXPOSURETIME_GREEN
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
integrationTimeMs | integration time for green channel in milliseconds [ms] |
- Returns
- SK_RESULT_OK on success, else see Error Code Table
int SK_SETLINEFREQUENCY |
( |
int |
CamID, |
|
|
float |
kHz |
|
) |
| |
int SK_SETPIXELFREQUENCY |
( |
int |
CamID, |
|
|
int |
clockDivider |
|
) |
| |
Pixel frequency setting.
This function sets the pixel frequency of the camera via a clock divider.
- See also
- SK_GETMAXPIXELFREQUENCY
-
SK_GETMINPIXELFREQUENCY
-
SK_GETPIXELFREQUENCY
- Parameters
-
CamID | id of camera from 0 ... n - 1, 0 = 1st camera |
clockDivider | 0 = maximum pixel clock rate (return of serial command 'I5'),
1 = lower pixel frequency (return of serial command 'I4') |
- Returns
- SK_RESULT_OK on success, else see Error Code Table