IDS peak AFL v2.0.1
Loading...
Searching...
No Matches

Brightness analysis algorithms for automatic exposure and gain control. More...

Enumerations

enum  peak_afl_controller_brightness_algorithm { PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEDIAN , PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEAN }
 Brightness calculation algorithms. More...

Functions

PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Set (peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm algorithm)
 Set the brightness analysis algorithm for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Get (peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm *algorithm)
 Get the current brightness analysis algorithm for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if brightness algorithm configuration is supported for a controller.

Detailed Description

Brightness analysis algorithms for automatic exposure and gain control.

Sets the algorithm which will be used for the auto brightness calculation.

Available Algorithms

Mean Algorithm

With mean the average value is calculated by adding all pixel values and dividing by the number of pixels.

Median Algorithm

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.

Enumeration Type Documentation

◆ peak_afl_controller_brightness_algorithm

Brightness calculation algorithms.

Defines the mathematical algorithms used to calculate representative brightness values from image data. Different algorithms may be more suitable for different image content and lighting conditions.

See also
peak_afl_AutoController_BrightnessAlgorithm_Set()
peak_afl_AutoController_BrightnessAlgorithm_Get()
Enumerator
PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEDIAN 

Median-based brightness calculation.

Uses the median value of pixel intensities in the analysis region. More robust against outliers and extreme values, providing stable brightness measurements in scenes with high contrast or noise.

Note
Recommended for scenes with varying lighting or high contrast
PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEAN 

Mean-based brightness calculation.

Uses the arithmetic mean (average) of pixel intensities in the analysis region. Provides faster computation and smooth brightness transitions but may be affected by extreme pixel values.

Note
Recommended for evenly lit scenes with consistent lighting

Function Documentation

◆ peak_afl_AutoController_BrightnessAlgorithm_Get()

PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Get ( peak_afl_controller_handle controller,
peak_afl_controller_brightness_algorithm * algorithm )

Get the current brightness analysis algorithm for a controller.

Retrieves the current brightness analysis algorithm configuration for the specified brightness controller. The algorithm determines how the controller evaluates image brightness and calculates appropriate parameter adjustments. This information is useful for understanding the controller's analysis behavior and for debugging brightness control performance.

Parameters
[in]controllerController handle to query for brightness algorithm
[out]algorithmPointer to receive the current brightness analysis algorithm. The value indicates which statistical method is being used for brightness evaluation. See peak_afl_controller_brightness_algorithm for possible values and their meanings.
Returns
PEAK_AFL_STATUS_SUCCESS Brightness algorithm retrieved successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or NULL algorithm pointer
PEAK_AFL_STATUS_NOT_SUPPORTED Brightness algorithm configuration is not supported
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Check support with peak_afl_AutoController_BrightnessAlgorithm_IsSupported() before calling
The returned algorithm reflects the current active configuration
This function only applies to brightness-type controllers
Use this to verify algorithm settings after configuration
See also
peak_afl_AutoController_BrightnessAlgorithm_IsSupported()
peak_afl_AutoController_BrightnessAlgorithm_Set()
peak_afl_controller_brightness_algorithm
Since
1.6

◆ peak_afl_AutoController_BrightnessAlgorithm_IsSupported()

PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_IsSupported ( peak_afl_controller_handle controller,
peak_afl_BOOL8 * supported )

Check if brightness algorithm configuration is supported for a controller.

Determines whether the specified controller supports brightness algorithm configuration. Brightness algorithm configuration allows selection of different statistical methods for analyzing image brightness, such as mean calculation, percentile analysis, or weighted averaging. Not all controllers support algorithm selection, and this feature is typically available only for brightness-type controllers.

Parameters
[in]controllerController handle to check for brightness algorithm support
[out]supportedPointer to receive support status:
  • PEAK_AFL_TRUE: Brightness algorithm configuration is supported
  • PEAK_AFL_FALSE: Brightness algorithm configuration is not supported
Returns
PEAK_AFL_STATUS_SUCCESS Operation completed successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or NULL supported pointer
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Check this function before attempting to configure brightness algorithms
This feature is typically available only for brightness-type controllers
Algorithm support may vary between different controller implementations
Available algorithms are defined in peak_afl_controller_brightness_algorithm
See also
peak_afl_AutoController_BrightnessAlgorithm_Set()
peak_afl_AutoController_BrightnessAlgorithm_Get()
peak_afl_controller_brightness_algorithm
Since
1.6

◆ peak_afl_AutoController_BrightnessAlgorithm_Set()

PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Set ( peak_afl_controller_handle controller,
peak_afl_controller_brightness_algorithm algorithm )

Set the brightness analysis algorithm for a controller.

Configures the algorithm used by the brightness controller to analyze image brightness and determine appropriate exposure or gain adjustments. Different algorithms use various statistical methods to evaluate image brightness, such as mean calculation, percentile analysis, or weighted averaging. The choice of algorithm affects how the controller responds to different lighting conditions and image content.

Parameters
[in]controllerController handle for which to set the brightness algorithm
[in]algorithmBrightness analysis algorithm to use. Available algorithms include different statistical methods for brightness evaluation. See peak_afl_controller_brightness_algorithm for available options.
Returns
PEAK_AFL_STATUS_SUCCESS Brightness algorithm configured successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or unsupported algorithm
PEAK_AFL_STATUS_NOT_SUPPORTED Brightness algorithm configuration is not supported
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Check support with peak_afl_AutoController_BrightnessAlgorithm_IsSupported() before using
Algorithm changes take effect for subsequent image processing operations
Different algorithms may perform better under different lighting conditions
The algorithm affects how target brightness values are interpreted
This setting applies only to brightness-type controllers
See also
peak_afl_AutoController_BrightnessAlgorithm_IsSupported()
peak_afl_AutoController_BrightnessAlgorithm_Get()
peak_afl_controller_brightness_algorithm
Since
1.6