![]() |
IDS peak AFL v2.0.1
|
Advanced automatic focus controller with comprehensive feature set. More...
#include <peak_afl/pipeline/modules/controllers/peak_afl_advanced_auto_focus.hpp>
Public Member Functions | |
| AdvancedAutoFocus (peak::afl::Manager &manager) | |
| Constructs an AdvancedAutoFocus instance. | |
| ~AdvancedAutoFocus () override=default | |
| Destructor. | |
| std::string | GetName () const override |
| Gets the controller name. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the controller configuration to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes the controller configuration from an archive. | |
| void | SetMode (ControllerMode mode) override |
| Sets the controller operation mode. | |
| ControllerMode | GetMode () const override |
| Gets the current controller operation mode. | |
| bool | IsRunning () const override |
| Checks if the controller is currently running. | |
| void | ResetToDefault () override |
| Resets the controller to its default configuration. | |
| features::SkipFrames & | SkipFrames () const |
| Gets the skip frames feature controller. | |
| features::Hysteresis & | Hysteresis () const |
| Gets the hysteresis feature controller. | |
| features::WeightedRois & | WeightedROIs () const |
| Gets the weighted regions of interest feature controller. | |
| features::SharpnessAlgorithm & | SharpnessAlgorithm () const |
| Gets the sharpness algorithm feature controller. | |
| features::SearchAlgorithm & | SearchAlgorithm () const |
| Gets the search algorithm feature controller. | |
| features::FocusLimit & | FocusLimit () const |
| Gets the focus limit feature controller. | |
| ControllerType | GetType () const override |
| Gets the controller type identifier. | |
| IController::FinishedCallbackHandle | RegisterFinishedCallback (const IController::FinishedCallback &callback) |
| Registers a callback for processing completion notifications. | |
| void | UnregisterFinishedCallback (IController::FinishedCallbackHandle callbackHandle) |
| Unregisters a previously registered callback. | |
| 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. | |
Advanced automatic focus controller with comprehensive feature set.
The AdvancedAutoFocus class provides a sophisticated and highly configurable interface for automatic focus control. This controller offers the complete focus feature set with granular control over all focusing mechanisms and algorithmic options.
Advanced Features:
Focus Search Algorithms:
Focus Sharpness Analysis:
|
inlineexplicit |
Constructs an AdvancedAutoFocus instance.
| manager | Reference to the API manager that handles controller lifecycle |
Initializes the focus controller with the specified manager. The controller will be ready to perform automatic focus operations once configured and activated.
|
overridedefault |
Destructor.
Default destructor that properly cleans up controller resources.
|
inlineoverridevirtual |
Deserializes the controller configuration from an archive.
| archive | Reference to the serialization archive containing configuration data |
Restores the controller configuration state from the provided archive. This allows previously saved focus controller settings to be loaded and applied.
Implements ISerializable.
|
inline |
Gets the focus limit feature controller.
The focus limit feature defines the minimum and maximum focus positions that the controller is allowed to use. This prevents the focus system from searching beyond physically meaningful or optically useful ranges.
|
inlineoverridevirtual |
Gets the current controller operation mode.
Implements IController.
|
inlineoverridevirtual |
Gets the controller name.
Implements IController.
|
inlineoverridevirtual |
Gets the controller type identifier.
Implements IController.
|
inline |
Gets the hysteresis feature controller.
The hysteresis feature prevents focus hunting by adding stability to focus decisions. It requires a minimum change in focus quality before triggering a focus adjustment, reducing oscillation around the optimal focus position.
|
inlineoverridevirtual |
Checks if the controller is currently running.
A controller is considered running when it's not in the Off mode. This indicates whether the automatic focus processing is currently active.
Implements IController.
|
inline |
Registers a callback for processing completion notifications.
| callback | The callback function to register |
Registers a callback function that will be invoked when focus operations complete. This includes both successful focus acquisitions and focus search failures. The returned handle can be used to unregister the callback later.
|
inlineoverridevirtual |
Resets the controller to its default configuration.
Restores all controller settings to their default values. This includes resetting operation mode, focus algorithms, ROI settings, and other configuration parameters to factory defaults.
Implements IController.
|
inline |
Gets the search algorithm feature controller.
The search algorithm feature controls how the focus position is adjusted to find the optimal focus. Different algorithms may use hill-climbing, binary search, or other optimization strategies to efficiently locate the best focus position.
|
inlineoverridevirtual |
Serializes the controller configuration to an archive.
| archive | Reference to the serialization archive for writing configuration data |
Saves the current controller configuration state to the provided archive. This includes all focus algorithm settings, ROI configurations, and other controller parameters for later restoration.
Implements ISerializable.
|
inlineoverridevirtual |
Sets the controller operation mode.
| mode | The desired controller operation mode |
Changes the controller's operation mode, which determines how the automatic focus behaves. Different modes may include continuous auto-focus, single-shot focus, or manual override modes.
Implements IController.
|
inline |
Gets the sharpness algorithm feature controller.
The sharpness algorithm feature controls how image sharpness is evaluated. Different algorithms may use gradient-based methods, variance calculations, or frequency domain analysis to determine focus quality.
|
inline |
Gets the skip frames feature controller.
The skip frames feature allows the controller to process only every Nth frame, which can improve performance when full-rate focus evaluation is not required. This is particularly useful for reducing computational load in high frame rate scenarios.
|
inline |
Unregisters a previously registered callback.
| callbackHandle | Handle of the callback to unregister |
Removes a previously registered callback using its handle. After unregistration, the callback will no longer be invoked for focus events.
|
inline |
Gets the weighted regions of interest feature controller.
The weighted ROIs feature allows defining multiple rectangular regions within the image with different importance weights for focus evaluation. This enables prioritizing focus on specific areas of the scene while still considering the overall image.