IDS peak AFL v2.0.1
Loading...
Searching...
No Matches
AutoPercentile Class Reference

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

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

Inheritance diagram for AutoPercentile:
IRangeFeature< double > IFeature< double > ISerializable

Public Member Functions

 AutoPercentile (std::shared_ptr< peak::afl::Controller > controller)
 Constructs an AutoPercentile feature with the specified controller.
void Set (const double &value) override
 Sets the auto percentile value.
double Get () const override
 Gets the current auto percentile value.
RangeD GetRange () const override
 Gets the valid range for auto percentile values.
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the current auto percentile value to an archive.
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Deserializes the auto percentile value from an archive.
Public Member Functions inherited from IFeature< double >
virtual ~IFeature ()=default
 Virtual destructor for proper cleanup of derived classes.

Detailed Description

Auto percentile feature implementation for auto controllers.

The AutoPercentile class provides a feature interface for managing the auto percentile parameter of auto controllers. This feature controls the percentile value used in automatic exposure and brightness calculations, determining which portion of the histogram is considered for the automatic adjustments.

The percentile value typically ranges from 0.0 to 100.0, where:

  • Lower values (e.g., 10.0) focus on darker regions of the image
  • Higher values (e.g., 90.0) focus on brighter regions of the image
  • Common values like 50.0 represent the median brightness

This class inherits from IRangeFeature<double> 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 specific auto feature algorithm being used.
See also
IRangeFeature
peak::afl::Controller::SetAutoPercentile()
peak::afl::Controller::GetAutoPercentile()
Since
1.8

Constructor & Destructor Documentation

◆ AutoPercentile()

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

Constructs an AutoPercentile feature with the specified controller.

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

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

Deserializes the auto percentile value from an archive.

Loads the auto percentile value from the provided archive and applies it to the controller. The value is expected to be stored with the key "AutoPercentile".

Parameters
[in]archiveThe archive to read the auto percentile 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()

double Get ( ) const
inlineoverridevirtual

Gets the current auto percentile value.

Retrieves the currently configured percentile value used for automatic exposure and brightness calculations.

Returns
The current auto percentile value as a double
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< double >.

◆ GetRange()

RangeD GetRange ( ) const
inlineoverridevirtual

Gets the valid range for auto percentile values.

Retrieves the minimum, maximum, and increment values that are valid for the auto percentile parameter. This information can be used to validate input values or to populate user interface controls.

Returns
A RangeT<double> structure containing:
  • min: Minimum valid percentile value
  • max: Maximum valid percentile value
  • inc: Increment/step size for percentile 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< double >.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

Serializes the current auto percentile value to an archive.

Stores the current auto percentile value in the provided archive for configuration persistence. The value is stored with the key "AutoPercentile".

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

Implements ISerializable.

◆ Set()

void Set ( const double & value)
inlineoverridevirtual

Sets the auto percentile value.

Sets the percentile value used for automatic exposure and brightness calculations. The percentile determines which portion of the image histogram is considered when calculating automatic adjustments.

Parameters
[in]valueThe percentile value to set. Typically ranges from 0.0 to 100.0. 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()
Since
1.8

Implements IFeature< double >.


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