![]() |
IDS peak AFL v2.0.1
|
Basic automatic brightness controller implementation. More...
#include <peak_afl/pipeline/modules/controllers/peak_afl_basic_auto_brightness.hpp>
Public Member Functions | |
| BasicAutoBrightness (peak::afl::Manager &manager, ProcessingCallback callback) | |
| Constructs a BasicAutoBrightness controller with the specified manager and callback. | |
| ~BasicAutoBrightness () override=default | |
| Destructor for BasicAutoBrightness. | |
| void | SetMode (ControllerMode mode) override |
| Sets the operation mode for the brightness controller. | |
| ControllerMode | GetMode () const override |
| Gets the current operation mode of the brightness controller. | |
| bool | IsRunning () const override |
| Checks if the brightness controller is currently running. | |
| void | SetAnalysisAlgorithm (BrightnessAnalysisAlgorithm algorithm) |
| Sets the brightness analysis algorithm. | |
| BrightnessAnalysisAlgorithm | GetAnalysisAlgorithm () const |
| Gets the current brightness analysis algorithm. | |
| void | SetAutoPercentile (double value) |
| Sets the percentile value for brightness calculation. | |
| double | GetAutoPercentile () const |
| Gets the current percentile value for brightness calculation. | |
| RangeD | GetAutoPercentileRange () const |
| Gets the valid range for percentile values. | |
| void | SetAutoTarget (uint32_t value) |
| Sets the target brightness value. | |
| uint32_t | GetAutoTarget () const |
| Gets the current target brightness value. | |
| peak::common::RangeU | GetAutoTargetRange () const |
| Gets the valid range for target brightness values. | |
| void | SetAutoTolerance (uint32_t value) |
| Sets the tolerance value for brightness stability control. | |
| uint32_t | GetAutoTolerance () const |
| Gets the current tolerance value for brightness stability control. | |
| peak::common::RangeU | GetAutoToleranceRange () const |
| Gets the valid range for tolerance values. | |
| void | SetSkipFrames (uint32_t value) |
| Sets the number of frames to skip for performance optimization. | |
| uint32_t | GetSkipFrames () const |
| Gets the current number of frames to skip. | |
| peak::common::RangeU | GetSkipFramesRange () const |
| Gets the valid range for skip frames values. | |
| void | SetRoi (const peak::common::Rectangle &roi) |
| Sets the region of interest (ROI) for selective brightness analysis. | |
| peak::common::Rectangle | GetRoi () |
| Gets the current region of interest (ROI) for brightness analysis. | |
| void | SetPolicy (AutoBrightnessPolicy policy) |
| Sets the brightness adjustment policy. | |
| AutoBrightnessPolicy | GetPolicy () const |
| Gets the current brightness adjustment policy. | |
| void | ResetToDefault () override |
| Resets all controller settings to their default values. | |
| IController::FinishedCallbackHandle | RegisterFinishedCallback (const IController::FinishedCallback &callback) |
| Registers a callback function to be invoked when brightness adjustment completes. | |
| void | UnregisterFinishedCallback (IController::FinishedCallbackHandle callbackHandle) |
| Unregisters a previously registered completion callback. | |
| void | SetExposureLimit (const IntervalD &interval) |
| Sets the exposure time limits for the exposure component. | |
| IntervalD | GetExposureLimit () const |
| Gets the current exposure time limits for the exposure component. | |
| void | SetGainLimit (const IntervalD &interval) |
| Sets the gain limits for the gain component. | |
| IntervalD | GetGainLimit () const |
| Gets the current gain limits for the gain component. | |
| Public Member Functions inherited from IController | |
| virtual | ~IController ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| IController (const IController &)=delete | |
| Copy constructor deleted to prevent copying. | |
| IController & | operator= (const IController &)=delete |
| Copy assignment deleted to prevent copying. | |
| IController (IController &&)=delete | |
| Move constructor deleted to prevent moving. | |
| IController & | operator= (IController &&)=delete |
| Move assignment deleted to prevent moving. | |
Additional Inherited Members | |
| Public Types inherited from IController | |
| using | FinishedCallback |
| Callback function type for operation completion notifications. | |
| using | FinishedCallbackHandle |
| Handle type for managing callback registrations. | |
| Protected Member Functions inherited from IController | |
| peak::afl::Manager & | GetManager () |
| Gets a reference to the API manager. | |
Basic automatic brightness controller implementation.
The BasicAutoBrightness class provides a streamlined interface for automatic brightness control. This controller offers essential brightness adjustment capabilities through exposure and gain control with simplified configuration options suitable for most standard use cases.
Key Features:
Control Policies:
|
inlineexplicit |
Constructs a BasicAutoBrightness controller with the specified manager and callback.
Initializes the brightness controller with exposure and gain components. The controller will automatically detect which components are supported by the device.
| manager | Reference to the API manager for device communication |
| callback | Processing callback function that will be invoked when brightness adjustment completes |
|
overridedefault |
Destructor for BasicAutoBrightness.
Cleans up resources and ensures proper shutdown of the controller.
|
inline |
Gets the current brightness analysis algorithm.
|
inline |
Gets the current percentile value for brightness calculation.
|
inline |
Gets the valid range for percentile values.
|
inline |
Gets the current target brightness value.
|
inline |
Gets the valid range for target brightness values.
|
inline |
Gets the current tolerance value for brightness stability control.
|
inline |
Gets the valid range for tolerance values.
|
inline |
Gets the current exposure time limits for the exposure component.
| peak::afl::error::NotSupportedException | if exposure component is not available |
|
inline |
Gets the current gain limits for the gain component.
| peak::afl::error::NotSupportedException | if gain component is not available |
|
inlineoverridevirtual |
Gets the current operation mode of the brightness controller.
The returned mode reflects the actual state of the active components:
Implements IController.
|
inline |
Gets the current brightness adjustment policy.
|
inline |
Gets the current region of interest (ROI) for brightness analysis.
|
inline |
Gets the current number of frames to skip.
|
inline |
Gets the valid range for skip frames values.
|
inlineoverridevirtual |
Checks if the brightness controller is currently running.
Implements IController.
|
inline |
Registers a callback function to be invoked when brightness adjustment completes.
The callback will be called asynchronously when the brightness controller finishes processing a frame and applying adjustments.
| callback | The callback function to register for completion notification |
|
inlineoverridevirtual |
Resets all controller settings to their default values.
This will restore:
Implements IController.
|
inline |
Sets the brightness analysis algorithm.
Determines the computational method used for brightness analysis and adjustment decisions.
| algorithm | The brightness analysis algorithm to use |
|
inline |
Sets the percentile value for brightness calculation.
Determines which portion of the image histogram is used for brightness calculations, allowing for robust brightness estimation in various lighting conditions.
| value | The percentile value to use (typically 0.0 to 1.0) |
|
inline |
Sets the target brightness value.
Defines the desired brightness level that the controller will attempt to achieve through automatic adjustments.
| value | The target brightness value in device-specific units |
|
inline |
Sets the tolerance value for brightness stability control.
Defines the acceptable deviation from the target brightness before the controller triggers adjustment actions.
| value | The tolerance value in device-specific units |
|
inline |
Sets the exposure time limits for the exposure component.
Defines the minimum and maximum exposure time values that the controller is allowed to use during automatic brightness adjustment.
| interval | The interval defining the minimum and maximum exposure limits |
| peak::afl::error::NotSupportedException | if exposure component is not available |
|
inline |
Sets the gain limits for the gain component.
Defines the minimum and maximum gain values that the controller is allowed to use during automatic brightness adjustment.
| interval | The interval defining the minimum and maximum gain limits |
| peak::afl::error::NotSupportedException | if gain component is not available |
|
inlineoverridevirtual |
Sets the operation mode for the brightness controller.
The mode is applied to individual components based on the current policy:
| mode | The controller mode to set (Off, Auto, Manual, etc.) |
Implements IController.
|
inline |
Sets the brightness adjustment policy.
Determines which components are used for brightness adjustment:
| policy | The brightness adjustment policy to use |
|
inline |
Sets the region of interest (ROI) for selective brightness analysis.
Allows the controller to focus brightness analysis on specific areas of the image rather than the entire frame, providing more precise control for specific applications.
| roi | The rectangular region of interest to analyze |
|
inline |
Sets the number of frames to skip for performance optimization.
Skip frames allows the controller to process only every Nth frame instead of every frame, reducing computational load while maintaining brightness control.
| value | The number of frames to skip (0 means process every frame) |
|
inline |
Unregisters a previously registered completion callback.
| callbackHandle | Handle returned from RegisterFinishedCallback() for the callback to remove |