Automatic brightness control through exposure and gain adjustment. More...
Topics | |
| Skip frames | |
| Frame processing optimization by skipping frames to reduce computational load. | |
| Auto target | |
| Target brightness value configuration for automatic adjustment. | |
| Auto tolerance | |
| Acceptable deviation from target brightness settings. | |
| Auto percentile | |
| Percentile-based brightness analysis configuration. | |
| Limit | |
| Brightness control range limits and boundaries. | |
| Region of interest | |
| Analysis area configuration for automatic control operations. | |
| Callbacks | |
| Event notification callbacks for automatic control operations. | |
| Algorithm | |
| Brightness analysis algorithms for automatic exposure and gain control. | |
| Component | |
| Individual brightness control components for granular parameter adjustment. | |
Functions | |
| PEAK_AFL_API_STATUS | peak_afl_AutoController_GetLastAutoAverage (peak_afl_controller_handle controller, uint8_t *average) |
| Get the last auto average for a controller. | |
Automatic brightness control through exposure and gain adjustment.
The control of the average brightness is preferably achieved by adjusting the exposure, i.e. you set the highest possible exposure time before gain is controlled. The auto exposure feature always uses the current exposure range within the active frame time. You can set separate control range limits for exposure.
The auto gain feature controls the supported camera gains and host gain. In digital imaging, a voltage proportional to the amount of incident light is output by the sensor. To increase image brightness and contrast, this signal can be amplified by an analog gain and offset before the digitizing process. The results of analog signal processing are usually better than the results of digital post-processing. Digital gain is applied after the digitizing process. Analog, Digital, and Combined gain are applied by the camera while Host gain is applied by the host. You can set separate control range limits for every supported gain. There are two different possibilities to control the gains.
The Auto Gain component automatically selects the first available gain from a list of supported gains.
With the second mode, the supported gains can be enabled individually. Also it is possible to set limits for every individual gain.
The supported or activated gains will be chosen and controlled in the following order:
- Analog
- Digital
- Host
or
- Combined
- Host
It is only possible to run one mode. Enabling a mode automatically disables the previous one.
For ongoing adaptations the Continuous mode has to be used so that it responds to deviations from the target value. To disable the control functionality automatically once the target value has been reached, (approximately) use the Once mode.
Sets the algorithm which will be used for the auto brightness calculation.
With mean the average value is calculated by adding all pixel values and dividing by the number of pixels.
With median the middle value is found by ordering all pixel values and selecting the middle one.
The algorithm can be changed dynamically during operation without affecting other controller settings.
Sets the target value for auto brightness control. The percentage of pixels, that must be brighter than the target value, is defined in target Percentile. The value of target value does not relate to the pixel format for the process image and can be specified in the range from 0 to 255.
The automatic control feature uses a tolerance function for stabilization. Automatic control is stopped when the actual value is within a range between (setpoint - tolerance value) and (setpoint + tolerance value). The control algorithm continues if the actual brightness value drops below (setpoint - tolerance value) or exceeds the desired target value (setpoint + tolerance value). If the tolerance value is increased, the control function will stop sooner. This can be useful in some situations.
Defines the percentage of pixels that must be brighter than the target value. The percentile value is only used for the Median brightness calculation algorithm.
The Skip frames setting defines how many frames should be skipped between processing operations. This parameter strongly influences both control speed and system stability.
When skip frames is set to N, the controller will:
Example: Skip frames = 3 means process every 4th frame (process 1, skip 3, process 1, skip 3...)
Skip frames can be adjusted dynamically based on conditions:
With this feature it is possible to define precisely the allowed range of the exposure time or gains for automatic adjustments, when auto brightness is enabled.
If a smaller part of the image should be processed, a region of interest (ROI) can be set. The ROI allows focusing the auto feature analysis on specific areas while ignoring irrelevant parts of the image.
It is possible to be informed for specific events via callbacks. Callbacks provide real-time feedback about controller operations and enable responsive application behavior.
Finished will be called when the controller has completed its operation and reached the target value.
When called:
Processing will be called during image processing to provide real-time feedback.
When called:
Important Threading Notes:
| PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverage | ( | peak_afl_controller_handle | controller, |
| uint8_t * | average ) |
Get the last auto average for a controller.
Used by Controllers processing a mono image. This function retrieves the most recent calculated average value from the auto feature processing. The average represents the calculated brightness level from the last processed frame.
| [in] | controller | controller handle |
| [out] | average | autofeature average |