IDS peak AFL v1.8.0
Loading...
Searching...
No Matches

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

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

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

Public Member Functions

 AutoTarget (std::shared_ptr< peak::afl::Controller > controller)
 Constructs an AutoTarget feature with the specified controller.
 
void Set (const uint32_t &value) override
 Sets the auto target brightness value.
 
PEAK_COMMON_NO_DISCARD uint32_t Get () const override
 Gets the current auto target brightness value.
 
PEAK_COMMON_NO_DISCARD peak::common::RangeU GetRange () const override
 Gets the valid range for auto target values.
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the current auto target value to an archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Deserializes the auto target 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 target feature implementation for auto controllers.

The AutoTarget class provides a feature interface for managing the auto target parameter of auto controllers. This feature controls the target brightness value that the automatic exposure and brightness algorithms aim to achieve.

The target value represents the desired brightness level in the image, typically expressed as a value in the range of 0-255 for 8-bit images or scaled accordingly for other bit depths. The auto algorithms will adjust exposure, gain, and other parameters to achieve this target brightness in the specified region of interest.

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::SetAutoTarget()
peak::afl::Controller::GetAutoTarget()
AutoTolerance
AutoPercentile
Since
1.8

Constructor & Destructor Documentation

◆ AutoTarget()

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

Constructs an AutoTarget feature with the specified controller.

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

Member Function Documentation

◆ Deserialize()

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

Deserializes the auto target value from an archive.

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

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

PEAK_COMMON_NO_DISCARD uint32_t Get ( ) const
inlineoverridevirtual

Gets the current auto target brightness value.

Retrieves the currently configured target brightness value that the automatic algorithms are trying to achieve.

Returns
The current auto target brightness 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_NO_DISCARD peak::common::RangeU GetRange ( ) const
inlineoverridevirtual

Gets the valid range for auto target values.

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

Returns
A RangeU structure containing:
  • min: Minimum valid target brightness value
  • max: Maximum valid target brightness value
  • inc: Increment/step size for target 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 target value to an archive.

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

Parameters
[in,out]archiveThe archive to write the auto target 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 target brightness value.

Sets the target brightness value that the automatic exposure and brightness algorithms will aim to achieve. The auto algorithms will adjust camera parameters to reach this target brightness level in the analyzed region.

Parameters
[in]valueThe target brightness value to set. Typically ranges from 0 to 255 for 8-bit images. 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()
AutoTolerance::Set()
Since
1.8

Implements IFeature< uint32_t >.


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