![]() |
IDS peak AFL v2.0.0
|
Auto tolerance feature implementation for auto controllers. More...
#include <peak_afl/pipeline/modules/controllers/features/peak_afl_auto_tolerance.hpp>
Public Member Functions | |
| AutoTolerance (std::shared_ptr< peak::afl::Controller > controller) | |
| Constructs an AutoTolerance feature with the specified controller. | |
| void | Set (const uint32_t &value) override |
| Sets the auto tolerance value. | |
| uint32_t | Get () const override |
| Gets the current auto tolerance value. | |
| peak::common::RangeU | GetRange () const override |
| Gets the valid range for auto tolerance values. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the current auto tolerance value to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes the auto tolerance value from an archive. | |
| Public Member Functions inherited from IFeature< uint32_t > | |
| virtual | ~IFeature ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Auto tolerance feature implementation for auto controllers.
The AutoTolerance class provides a feature interface for managing the auto tolerance parameter of auto controllers. This feature controls the tolerance range around the target brightness value within which the automatic algorithms consider the image to be properly exposed.
The tolerance value defines an acceptable deviation from the target brightness. For example, if the target is 128 and tolerance is 10, then brightness values between 118 and 138 would be considered acceptable, and the auto algorithms would not make further adjustments.
This class inherits from IRangeFeature<uint32_t> and provides serialization support for configuration persistence.
|
inlineexplicit |
Constructs an AutoTolerance feature with the specified controller.
| [in] | controller | Shared pointer to the auto controller that will be used to manage the auto tolerance parameter. The controller must support auto tolerance operations. |
|
inlineoverridevirtual |
Deserializes the auto tolerance value from an archive.
Loads the auto tolerance value from the provided archive and applies it to the controller. The value is expected to be stored with the key "AutoTolerance".
| [in] | archive | The archive to read the auto tolerance value from |
| May | throw serialization exceptions if the archive operation fails |
| May | throw controller exceptions if the deserialized value is invalid |
Implements ISerializable.
|
inlineoverridevirtual |
Gets the current auto tolerance value.
Retrieves the currently configured tolerance value that defines the acceptable deviation from the target brightness.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IFeature< uint32_t >.
|
inlineoverridevirtual |
Gets the valid range for auto tolerance values.
Retrieves the minimum, maximum, and increment values that are valid for the auto tolerance parameter. This information can be used to validate input values or to populate user interface controls.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IRangeFeature< uint32_t >.
|
inlineoverridevirtual |
Serializes the current auto tolerance value to an archive.
Stores the current auto tolerance value in the provided archive for configuration persistence. The value is stored with the key "AutoTolerance".
| [in,out] | archive | The archive to write the auto tolerance value to |
| May | throw serialization exceptions if the archive operation fails |
Implements ISerializable.
|
inlineoverridevirtual |
Sets the auto tolerance value.
Sets the tolerance range around the target brightness value within which the automatic algorithms consider the image to be properly exposed. A larger tolerance value makes the algorithm less sensitive to brightness variations, while a smaller tolerance makes it more precise.
| [in] | value | The tolerance value to set. This represents the acceptable deviation from the target brightness. The exact valid range can be obtained using GetRange(). |
| May | throw exceptions based on the underlying controller implementation if the value is outside the valid range or if the controller is in an invalid state. |
Implements IFeature< uint32_t >.