105 if (algorithm ==
"Median")
109 if (algorithm ==
"Mean")
128 throw peak::common::InternalErrorException(
"The given brightness algorithm is unknown!");
143 throw peak::common::InternalErrorException(
"The given brightness algorithm is unknown!");
191 : m_controller{ std::move(controller) }
215 m_controller->SetBrightnessAlgorithm(detail::ToCType(value));
236 return detail::ToBrightnessAnalysisAlgorithm(m_controller->GetBrightnessAlgorithm());
275 Set(detail::ToBrightnessAnalysisAlgorithm(archive.
GetString(
"BrightnessAlgorithm")));
286 std::shared_ptr<peak::afl::Controller> m_controller;
Thrown when a function receives an invalid parameter.
Definition peak_common_exceptions.hpp:50
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:59
virtual PEAK_COMMON_NO_DISCARD std::string GetString(const std::string &key) const =0
Retrieves a string value by key.
virtual void SetString(const std::string &key, const std::string &value)=0
Stores a UTF-8 string.
void Set(const BrightnessAnalysisAlgorithm &value) override
Sets the brightness analysis algorithm.
Definition peak_afl_brightness_algorithm.hpp:213
BrightnessAlgorithm(std::shared_ptr< peak::afl::Controller > controller)
Constructs a BrightnessAlgorithm feature with the specified controller.
Definition peak_afl_brightness_algorithm.hpp:190
PEAK_COMMON_NO_DISCARD BrightnessAnalysisAlgorithm Get() const override
Gets the current brightness analysis algorithm.
Definition peak_afl_brightness_algorithm.hpp:234
void Serialize(peak::common::serialization::IArchive &archive) const override
Serializes the current brightness algorithm to an archive.
Definition peak_afl_brightness_algorithm.hpp:253
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes the brightness algorithm from an archive.
Definition peak_afl_brightness_algorithm.hpp:273
Base interface for auto feature implementations.
Definition peak_afl_ifeature.hpp:61
PEAK_COMMON_NO_DISCARD std::string ToString(ControllerType mode)
Converts ControllerType enumeration to string representation.
Definition peak_afl_icontroller.hpp:79
BrightnessAnalysisAlgorithm
Brightness analysis algorithm enumeration.
Definition peak_afl_brightness_algorithm.hpp:41
@ Mean
Mean-based brightness calculation - uses the average value of pixel intensities.
Definition peak_afl_brightness_algorithm.hpp:45
@ Median
Median-based brightness calculation - uses the median value of pixel intensities.
Definition peak_afl_brightness_algorithm.hpp:43
peak_afl_controller_brightness_algorithm
Brightness calculation algorithms.
Definition peak_afl.h:505
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEAN
Mean-based brightness calculation.
Definition peak_afl.h:526
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEDIAN
Median-based brightness calculation.
Definition peak_afl.h:515
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.hpp:91
Interface definitions and implementations for individual module types used within a pipeline.
Definition peak_afl_generic_auto_brightness.hpp:39
Interfaces and implementations for defining and controlling data processing pipelines.
Definition peak_afl_generic_auto_brightness.hpp:37