IDS peak AFL v2.0.0
Loading...
Searching...
No Matches
AutoTolerance Class Reference

Auto tolerance feature implementation for auto controllers. More...

#include <peak_afl/pipeline/modules/controllers/features/peak_afl_auto_tolerance.hpp>

Inheritance diagram for AutoTolerance:
IRangeFeature< uint32_t > IFeature< uint32_t > ISerializable

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.

Detailed Description

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.

Note
The actual range and increment values are determined by the underlying controller implementation and may vary based on the image format and controller capabilities.
See also
IRangeFeature
peak::afl::Controller::SetAutoTolerance()
peak::afl::Controller::GetAutoTolerance()
AutoTarget
AutoPercentile
Since
1.8

Constructor & Destructor Documentation

◆ AutoTolerance()

AutoTolerance ( std::shared_ptr< peak::afl::Controller > controller)
inlineexplicit

Constructs an AutoTolerance feature with the specified controller.

Parameters
[in]controllerShared pointer to the auto controller that will be used to manage the auto tolerance parameter. The controller must support auto tolerance operations.
Precondition
controller must not be null
controller must support auto tolerance functionality
Since
1.8

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
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".

Parameters
[in]archiveThe archive to read the auto tolerance value from
Exceptions
Maythrow serialization exceptions if the archive operation fails
Maythrow controller exceptions if the deserialized value is invalid
See also
Serialize()
Since
1.8

Implements ISerializable.

◆ Get()

uint32_t Get ( ) const
inlineoverridevirtual

Gets the current auto tolerance value.

Retrieves the currently configured tolerance value that defines the acceptable deviation from the target brightness.

Returns
The current auto tolerance value as a uint32_t
Exceptions
Maythrow exceptions based on the underlying controller implementation if the controller is in an invalid state.
See also
Set()
GetRange()
Since
1.8

Implements IFeature< uint32_t >.

◆ GetRange()

peak::common::RangeU GetRange ( ) const
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.

Returns
A RangeU structure containing:
  • min: Minimum valid tolerance value
  • max: Maximum valid tolerance value
  • inc: Increment/step size for tolerance values
Exceptions
Maythrow exceptions based on the underlying controller implementation if the controller is in an invalid state.
See also
Set()
Get()
Since
1.8

Implements IRangeFeature< uint32_t >.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
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".

Parameters
[in,out]archiveThe archive to write the auto tolerance value to
Exceptions
Maythrow serialization exceptions if the archive operation fails
See also
Deserialize()
Since
1.8

Implements ISerializable.

◆ Set()

void Set ( const uint32_t & value)
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.

Parameters
[in]valueThe tolerance value to set. This represents the acceptable deviation from the target brightness. The exact valid range can be obtained using GetRange().
Exceptions
Maythrow exceptions based on the underlying controller implementation if the value is outside the valid range or if the controller is in an invalid state.
See also
Get()
GetRange()
AutoTarget::Set()
Since
1.8

Implements IFeature< uint32_t >.


The documentation for this class was generated from the following file: