IDS peak AFL v1.8.0
Loading...
Searching...
No Matches
peak_afl_advanced_auto_features.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
14
17
18namespace peak
19{
20namespace pipeline
21{
22namespace modules
23{
24
66{
67public:
86 explicit AdvancedAutoFeatures(const std::shared_ptr<peak::core::Device>& device)
87 : m_genericModule{ device }
88 {}
89
109 {
110 m_genericModule.Serialize(archive);
111 }
112
133 {
134 m_genericModule.Deserialize(archive);
135 }
136
146 PEAK_COMMON_NO_DISCARD const char* GetType() const override
147 {
148 return "AdvancedAutoFeatures";
149 }
150
172 {
173 return m_genericModule.Process(input);
174 }
175
192 void ResetToDefault() override
193 {
194 m_genericModule.ResetToDefault();
195 }
196
212 void SetGainModule(std::shared_ptr<peak::pipeline::modules::IGain> gainModule) override
213 {
214 m_genericModule.SetGainModule(gainModule);
215 }
216
236 void SetColorCorrectionMatrix(const std::array<float, 9>& ccm) override
237 {
238 m_genericModule.SetColorCorrectionMatrix(ccm);
239 }
240
257 void SetEnabled(const bool enabled) override
258 {
259 m_genericModule.SetEnabled(enabled);
260 }
261
273 PEAK_COMMON_NO_DISCARD bool IsEnabled() const override
274 {
275 return m_genericModule.IsEnabled();
276 }
277
298 {
299 auto* controller = m_genericModule.GetController(autofeature::ControllerType::Brightness);
300 if (controller != nullptr)
301 {
302 return *static_cast<autofeature::AdvancedAutoBrightness*>(controller);
303 }
304 throw peak::common::NotSupportedException("Brightness controller is not supported for the current device!");
305 }
306
319 {
320 return m_genericModule.HasController(autofeature::ControllerType::Brightness);
321 }
322
343 {
344 auto* controller = m_genericModule.GetController(autofeature::ControllerType::Focus);
345 if (controller != nullptr)
346 {
347 return *static_cast<autofeature::AdvancedAutoFocus*>(controller);
348 }
349
350 throw peak::common::NotSupportedException("Focus controller is not supported for the current device!");
351 }
352
365 {
366 return m_genericModule.HasController(autofeature::ControllerType::Focus);
367 }
368
389 {
390 auto* controller = m_genericModule.GetController(autofeature::ControllerType::WhiteBalance);
391 if (controller != nullptr)
392 {
393 return *static_cast<autofeature::AdvancedAutoWhiteBalance*>(controller);
394 }
395
396 throw peak::common::NotSupportedException("White balance controller is not supported for the current device!");
397 }
398
411 {
412 return m_genericModule.HasController(autofeature::ControllerType::WhiteBalance);
413 }
414
415
416private:
423 detail::GenericAutoFeatures m_genericModule;
424};
425
426
427} /* namespace modules */
428} /* namespace pipeline */
429} /* namespace peak */
A type-erased container for any copyable value.
Definition peak_common_any.hpp:36
Thrown when an unsupported operation or feature is used.
Definition peak_common_exceptions.hpp:150
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:59
PEAK_COMMON_NO_DISCARD bool IsEnabled() const override
Checks if advanced auto features are currently enabled.
Definition peak_afl_advanced_auto_features.hpp:273
PEAK_COMMON_NO_DISCARD bool HasAutoFocus() const
Checks if advanced focus control is available.
Definition peak_afl_advanced_auto_features.hpp:364
void SetEnabled(const bool enabled) override
Sets the enabled state for all advanced auto feature controllers.
Definition peak_afl_advanced_auto_features.hpp:257
PEAK_COMMON_NO_DISCARD autofeature::AdvancedAutoBrightness & AutoBrightness() const
Gets a reference to the advanced brightness controller.
Definition peak_afl_advanced_auto_features.hpp:297
PEAK_COMMON_NO_DISCARD bool HasAutoWhiteBalance() const
Checks if advanced white balance control is available.
Definition peak_afl_advanced_auto_features.hpp:410
PEAK_COMMON_NO_DISCARD autofeature::AdvancedAutoFocus & AutoFocus() const
Gets a reference to the advanced focus controller.
Definition peak_afl_advanced_auto_features.hpp:342
PEAK_COMMON_NO_DISCARD autofeature::AdvancedAutoWhiteBalance & AutoWhiteBalance() const
Gets a reference to the advanced white balance controller.
Definition peak_afl_advanced_auto_features.hpp:388
void SetGainModule(std::shared_ptr< peak::pipeline::modules::IGain > gainModule) override
Sets the gain module for use when host gains are applied.
Definition peak_afl_advanced_auto_features.hpp:212
PEAK_COMMON_NO_DISCARD peak::common::Any Process(const peak::common::Any &input) const override
Processes input data through all enabled advanced auto feature controllers.
Definition peak_afl_advanced_auto_features.hpp:171
PEAK_COMMON_NO_DISCARD bool HasAutoBrightness() const
Checks if advanced brightness control is available.
Definition peak_afl_advanced_auto_features.hpp:318
void SetColorCorrectionMatrix(const std::array< float, 9 > &ccm) override
Sets the color correction matrix for advanced image processing.
Definition peak_afl_advanced_auto_features.hpp:236
void Serialize(peak::common::serialization::IArchive &archive) const override
Serializes the current state of all advanced auto features to an archive.
Definition peak_afl_advanced_auto_features.hpp:108
PEAK_COMMON_NO_DISCARD const char * GetType() const override
Returns the type identifier for this advanced auto features implementation.
Definition peak_afl_advanced_auto_features.hpp:146
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes advanced auto features state from an archive.
Definition peak_afl_advanced_auto_features.hpp:132
AdvancedAutoFeatures(const std::shared_ptr< peak::core::Device > &device)
Constructs an AdvancedAutoFeatures instance with the specified device.
Definition peak_afl_advanced_auto_features.hpp:86
void ResetToDefault() override
Resets all advanced auto feature controllers to their default settings.
Definition peak_afl_advanced_auto_features.hpp:192
Interface for modules that provide auto feature functionality.
Definition peak_common_iautofeature_module.hpp:36
Advanced automatic brightness controller with comprehensive feature set.
Definition peak_afl_advanced_auto_brightness.hpp:83
Advanced automatic focus controller with comprehensive feature set.
Definition peak_afl_advanced_auto_focus.hpp:77
Advanced automatic white balance controller with comprehensive feature set.
Definition peak_afl_advanced_auto_white_balance.hpp:57
@ WhiteBalance
Automatic white balance controller - manages color correction.
Definition peak_afl_icontroller.hpp:47
@ Brightness
Automatic brightness controller - manages exposure and gain.
Definition peak_afl_icontroller.hpp:45
@ Focus
Automatic focus controller - manages lens focus positioning.
Definition peak_afl_icontroller.hpp:43
#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