Basic automatic features module.
More...
#include <peak_afl/pipeline/modules/peak_afl_basic_auto_features.hpp>
Basic automatic features module.
The BasicAutoFeatures class provides a comprehensive yet simplified interface for managing automatic camera features. This module integrates basic controllers for brightness, focus, and white balance with streamlined configuration options suitable for most common use cases.
Integrated Controllers:
- BasicAutoBrightness: Essential exposure and gain control
- BasicAutoFocus: Standard focus algorithms and ROI support
- BasicAutoWhiteBalance: Fundamental color correction capabilities
Key Features:
- Unified Interface: Single point of access for all auto features
- Bulk Configuration: Convenient methods for configuring multiple controllers
- Serialization Support: Complete configuration persistence
Bulk Configuration Methods:
- Note
- This class requires a valid device instance that supports basic auto features
-
For advanced control, consider AdvancedAutoFeatures
- See also
- AdvancedAutoFeatures
-
IAutoFeature
-
autofeature::BasicAutoBrightness
-
autofeature::BasicAutoFocus
-
autofeature::BasicAutoWhiteBalance
- Since
- 1.8
◆ BasicAutoFeatures()
Constructs a BasicAutoFeatures instance with the specified device.
Initializes the generic module with the provided device in basic mode and sets up the basic automatic feature controllers based on device capabilities.
- Parameters
-
| device | Shared pointer to the device instance that will be used for camera operations. Must be valid and non-null. |
- Precondition
- device must be a valid, non-null shared pointer
-
device must support basic auto features for full functionality
- Exceptions
-
- Note
- The device must support basic auto features for full functionality
- Since
- 1.8
◆ AutoBrightness()
Gets a reference to the basic brightness controller.
Provides access to the basic brightness controller for standard control over automatic brightness adjustments with standard algorithms.
- Returns
- Reference to the basic AutoBrightness controller
- Precondition
- Device must support basic brightness control
- Postcondition
- Returns valid reference to brightness controller
- Exceptions
-
- Note
- Check HasAutoBrightness() before calling this method to avoid exceptions
- See also
- HasAutoBrightness()
- Since
- 1.8
◆ AutoFocus()
Gets a reference to the basic focus controller.
Provides access to the basic focus controller for standard control over automatic focus adjustments with standard algorithms.
- Returns
- Reference to the basic AutoFocus controller
- Precondition
- Device must support basic focus control
- Postcondition
- Returns valid reference to focus controller
- Exceptions
-
- Note
- Check HasAutoFocus() before calling this method to avoid exceptions
- See also
- HasAutoFocus()
- Since
- 1.8
◆ AutoWhiteBalance()
Gets a reference to the basic white balance controller.
Provides access to the basic white balance controller for standard control over automatic white balance adjustments with standard algorithms.
- Returns
- Reference to the basic AutoWhiteBalance controller
- Precondition
- Device must support basic white balance control
- Postcondition
- Returns valid reference to white balance controller
- Exceptions
-
- Note
- Check HasAutoWhiteBalance() before calling this method to avoid exceptions
- See also
- HasAutoWhiteBalance()
- Since
- 1.8
◆ Deserialize()
Deserializes basic auto features state from an archive.
Restores the configuration and state of all basic controllers from previously serialized data, including settings and parameters.
- Parameters
-
| archive | Reference to the archive containing the serialized data |
- Precondition
- archive must contain valid serialized BasicAutoFeatures data
- Postcondition
- Current controller settings are restored from archive
- Exceptions
-
- Warning
- This will overwrite current controller settings
- Note
- Basic features require less device compatibility validation during deserialization
- See also
- Serialize()
- Since
- 1.8
Implements ISerializable.
◆ GetType()
Returns the type identifier for this basic auto features implementation.
- Returns
- Constant string "BasicAutoFeatures" identifying this implementation
- Note
- This is used for type identification in serialization and factory patterns
-
Distinguishes this from the advanced auto features implementation
- Since
- 1.8
Implements IModule.
◆ HasAutoBrightness()
Checks if basic brightness control is available.
- Returns
- True if the device supports basic brightness control, false otherwise
- Note
- Use this method before calling AutoBrightness() to avoid exceptions
-
Basic brightness control may have different availability than advanced version
- See also
- AutoBrightness()
- Since
- 1.8
◆ HasAutoFocus()
Checks if basic focus control is available.
- Returns
- True if the device supports basic focus control, false otherwise
- Note
- Use this method before calling AutoFocus() to avoid exceptions
-
Basic focus control may have different availability than advanced version
- See also
- AutoFocus()
- Since
- 1.8
◆ HasAutoWhiteBalance()
Checks if basic white balance control is available.
- Returns
- True if the device supports basic white balance control, false otherwise
- Note
- Use this method before calling AutoWhiteBalance() to avoid exceptions
-
Basic white balance control may have different availability than advanced version
- See also
- AutoWhiteBalance()
- Since
- 1.8
◆ IsEnabled()
Checks if basic auto features are currently enabled.
- Returns
- True if basic auto features are enabled, false otherwise
- Note
- This returns the overall enabled state, individual controllers may have different states
-
Use individual controller GetMode() methods to check specific controller availability
- See also
- SetEnabled()
- Since
- 1.8
Implements IModule.
◆ Process()
Processes input data through all enabled basic auto feature controllers.
Applies basic automatic adjustments for brightness, focus, and white balance using standard algorithms and processing capabilities.
- Parameters
-
| input | The input data to be processed by the basic auto features |
- Returns
- Processed data with basic automatic adjustments applied
- Precondition
- input must be compatible with the underlying basic controllers
- Postcondition
- Returns processed data with automatic adjustments applied
- Exceptions
-
- Note
- Only enabled controllers will process the input
-
Processing order: brightness → white balance → focus
- See also
- SetEnabled()
- Since
- 1.8
Implements IModule.
◆ ResetToDefault()
Resets all basic auto feature controllers to their default settings.
This will restore factory defaults for all basic controllers including:
- Default processing modes
- Default parameters and thresholds
- Default enable/disable states
- Default skip frame values
- Postcondition
- All controllers are reset to factory default settings
- Warning
- This operation cannot be undone
- Note
- Basic controllers have simpler default configurations than advanced versions
-
Consider using Serialize() before calling this method to save current state
- Since
- 1.8
Implements IModule.
◆ Serialize()
Serializes the current state of all basic auto features to an archive.
Saves the configuration and state of all basic controllers including their current settings, modes, and parameters.
- Parameters
-
| archive | Reference to the archive where the serialized data will be stored |
- Precondition
- archive must be a valid, writable archive
- Postcondition
- archive contains serialized state of all basic auto features
- Note
- This method is const as it doesn't modify the object state
-
Basic controllers have simpler serialization data than advanced versions
- See also
- Deserialize()
- Since
- 1.8
Implements ISerializable.
◆ SetAllModes()
Sets the operating mode for all available auto feature controllers.
This convenience method applies the specified controller mode to all available controllers (brightness, focus, and white balance) simultaneously.
- Parameters
-
| mode | The controller mode to apply to all controllers |
- Postcondition
- All available controllers have their mode set to the specified value
- Note
- Only controllers that are supported by the device will be affected
-
This method will not fail if some controllers are not available
-
Individual controller modes can still be changed separately after this call
- See also
- autofeature::ControllerMode
-
SetAllSkipFrames()
- Since
- 1.8
◆ SetAllSkipFrames()
| void SetAllSkipFrames |
( |
uint32_t | value | ) |
|
|
inline |
Sets the skip frames value for all available auto feature controllers.
This convenience method sets the number of frames to skip before processing for all available controllers (brightness, focus, and white balance) simultaneously. Skip frames help reduce computational load by processing only every Nth frame.
- Parameters
-
| value | Number of frames to skip between processing cycles |
- Postcondition
- All available controllers have their skip frames value set to the specified value
- Note
- Only controllers that are supported by the device will be affected
-
This method will not fail if some controllers are not available
-
Individual controller skip frames can still be changed separately after this call
-
Higher skip frame values reduce computational load but may decrease responsiveness
- See also
- SetAllModes()
- Since
- 1.8
◆ SetColorCorrectionMatrix()
| void SetColorCorrectionMatrix |
( |
const std::array< float, 9 > & | ccm | ) |
|
|
inlineoverridevirtual |
Sets the color correction matrix for basic image processing.
The color correction matrix is a 3x3 matrix used by basic controllers for standard color processing and white balance calculations.
- Parameters
-
| ccm | Array of 9 float values representing the 3x3 color correction matrix in row-major order: [0,0] [0,1] [0,2] [1,0] [1,1] [1,2] [2,0] [2,1] [2,2] |
- Precondition
- ccm must contain 9 valid float values
-
Matrix values should be within reasonable ranges to avoid poor image quality
- Postcondition
- Color correction matrix is set and available for basic processing
- Exceptions
-
- Note
- Matrix elements should be in row-major order
-
Invalid matrix values may result in poor image quality
- Since
- 1.8
Implements IAutoFeature.
◆ SetEnabled()
| void SetEnabled |
( |
const bool | enabled | ) |
|
|
inlineoverridevirtual |
Sets the enabled state for all basic auto feature controllers.
Controls the overall enabled state of the basic auto features system.
- Parameters
-
| enabled | True to enable basic auto features, false to disable them |
- Postcondition
- Overall enabled state is set to the specified value
- Note
- Individual controllers can still be enabled/disabled separately
-
Basic controllers may have different enable/disable behavior than advanced versions
-
Disabling does not affect individual controller settings, only their operation
- See also
- IsEnabled()
- Since
- 1.8
Implements IModule.
◆ SetGainModule()
Sets the gain module for use when host gains are applied.
The gain module is utilized by the basic auto features when host-side gain adjustments are being used, allowing the controllers to compensate and optimize their algorithms based on the applied gain values.
- Parameters
-
| gainModule | Shared pointer to the gain module implementation. Pass nullptr to disable host gain integration. |
- Note
- Passing nullptr will disable host gain integration with auto features
-
This is only relevant when using host-side gain control rather than hardware gain
-
Basic controllers use gain information for auto white balance
- Since
- 1.8
Implements IAutoFeature.
The documentation for this class was generated from the following file: