IDS peak AFL v2.0.2
Loading...
Searching...
No Matches
peak_afl_advanced_auto_brightness.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <peak_afl/peak_afl.hpp>
23
26
27#include <memory>
28#include <utility>
29#include <vector>
30
31namespace peak
32{
33namespace pipeline
34{
35namespace modules
36{
37namespace autofeature
38{
39
83{
84 using ProcessingCallback = std::function<void()>;
85
86public:
87 friend BrightnessComponent;
88
105 explicit AdvancedAutoBrightness(peak::afl::Manager& manager, ProcessingCallback callback)
106 : IController(manager)
107 , m_genericController{ manager, std::move(callback),
110 {}
111
117 ~AdvancedAutoBrightness() override = default;
118
128 PEAK_COMMON_NO_DISCARD std::string GetName() const override
129 {
130 return "AdvancedAutoBrightness";
131 }
132
153 {
154 m_genericController.Serialize(archive);
155 }
156
173 {
174 m_genericController.Deserialize(archive);
175 }
176
186 PEAK_COMMON_NO_DISCARD ControllerType GetType() const override
187 {
188 return m_genericController.GetType();
189 }
190
202 void SetMode(ControllerMode mode) override
203 {
204 m_genericController.SetMode(mode);
205 }
206
218 PEAK_COMMON_NO_DISCARD ControllerMode GetMode() const override
219 {
220 return m_genericController.GetMode();
221 }
222
234 PEAK_COMMON_NO_DISCARD bool IsRunning() const override
235 {
236 return m_genericController.IsRunning();
237 }
238
254 PEAK_COMMON_NO_DISCARD features::SkipFrames& SkipFrames()
255 {
256 return m_genericController.SkipFrames();
257 }
258
274 PEAK_COMMON_NO_DISCARD features::AutoTarget& AutoTarget()
275 {
276 return m_genericController.AutoTarget();
277 }
278
294 PEAK_COMMON_NO_DISCARD features::AutoTolerance& AutoTolerance()
295 {
296 return m_genericController.AutoTolerance();
297 }
298
313 PEAK_COMMON_NO_DISCARD features::AutoPercentile& AutoPercentile()
314 {
315 return m_genericController.AutoPercentile();
316 }
317
331 PEAK_COMMON_NO_DISCARD features::Roi& Roi()
332 {
333 return m_genericController.Roi();
334 }
335
351 {
352 return m_genericController.AnalysisAlgorithm();
353 }
354
371 PEAK_COMMON_NO_DISCARD BrightnessComponent& Exposure() const
372 {
373 return m_genericController.ExposureComponent();
374 }
375
387 PEAK_COMMON_NO_DISCARD bool HasExposure() const
388 {
389 return m_genericController.HasExposureComponent();
390 }
391
410 PEAK_COMMON_NO_DISCARD BrightnessComponent& AnalogGain() const
411 {
412 return m_genericController.AnalogGainComponent();
413 }
414
426 PEAK_COMMON_NO_DISCARD bool HasAnalogGain() const
427 {
428 return m_genericController.HasAnalogGainComponent();
429 }
430
449 PEAK_COMMON_NO_DISCARD BrightnessComponent& DigitalGain() const
450 {
451 return m_genericController.DigitalGainComponent();
452 }
453
465 PEAK_COMMON_NO_DISCARD bool HasDigitalGain() const
466 {
467 return m_genericController.HasDigitalGainComponent();
468 }
469
488 PEAK_COMMON_NO_DISCARD BrightnessComponent& CombinedGain() const
489 {
490 return m_genericController.CombinedGainComponent();
491 }
492
504 PEAK_COMMON_NO_DISCARD bool HasCombinedGain() const
505 {
506 return m_genericController.HasCombinedGainComponent();
507 }
508
527 PEAK_COMMON_NO_DISCARD BrightnessComponent& HostGain() const
528 {
529 return m_genericController.HostGainComponent();
530 }
531
543 PEAK_COMMON_NO_DISCARD bool HasHostGain() const
544 {
545 return m_genericController.HasHostGainComponent();
546 }
547
564 PEAK_COMMON_NO_DISCARD std::vector<BrightnessComponent*> GetComponents() const
565 {
566 return m_genericController.GetComponents();
567 }
568
584 PEAK_COMMON_NO_DISCARD BrightnessComponent* GetComponent(BrightnessComponentType componentType) const
585 {
586 return m_genericController.GetComponent(componentType);
587 }
588
607 void ResetToDefault() override
608 {
609 m_genericController.ResetToDefault();
610 }
611
628 IController::FinishedCallbackHandle RegisterFinishedCallback(const IController::FinishedCallback& callback)
629 {
630 return m_genericController.RegisterFinishedCallback(callback);
631 }
632
645 void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
646 {
647 m_genericController.UnregisterFinishedCallback(callbackHandle);
648 }
649
650private:
651 detail::GenericAutoBrightness m_genericController;
652};
653
654} // namespace autofeature
655} // namespace modules
656} // namespace pipeline
657} // namespace peak
Central coordination object for automatic camera feature control.
Definition peak_afl.hpp:663
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:59
features::BrightnessAlgorithm & AnalysisAlgorithm()
Gets access to the brightness algorithm feature for algorithm selection.
Definition peak_afl_advanced_auto_brightness.hpp:350
void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
Unregisters a previously registered completion callback.
Definition peak_afl_advanced_auto_brightness.hpp:645
features::AutoTolerance & AutoTolerance()
Gets access to the auto tolerance feature for brightness stability control.
Definition peak_afl_advanced_auto_brightness.hpp:294
features::AutoTarget & AutoTarget()
Gets access to the auto target feature for brightness target configuration.
Definition peak_afl_advanced_auto_brightness.hpp:274
BrightnessComponent & DigitalGain() const
Gets access to the digital gain component for post-processing gain control.
Definition peak_afl_advanced_auto_brightness.hpp:449
~AdvancedAutoBrightness() override=default
Destructor for AdvancedAutoBrightness.
ControllerMode GetMode() const override
Gets the current operation mode of the brightness controller.
Definition peak_afl_advanced_auto_brightness.hpp:218
BrightnessComponent * GetComponent(BrightnessComponentType componentType) const
Gets a specific brightness component by type.
Definition peak_afl_advanced_auto_brightness.hpp:584
features::AutoPercentile & AutoPercentile()
Gets access to the auto percentile feature used for automatic brightness adjustment.
Definition peak_afl_advanced_auto_brightness.hpp:313
std::vector< BrightnessComponent * > GetComponents() const
Gets a vector of all available brightness components.
Definition peak_afl_advanced_auto_brightness.hpp:564
std::string GetName() const override
Gets the name identifier for this controller.
Definition peak_afl_advanced_auto_brightness.hpp:128
features::SkipFrames & SkipFrames()
Gets access to the skip frames feature.
Definition peak_afl_advanced_auto_brightness.hpp:254
bool HasDigitalGain() const
Checks if the digital gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:465
void Serialize(peak::common::serialization::IArchive &archive) const override
Serializes the current controller state and configuration to an archive.
Definition peak_afl_advanced_auto_brightness.hpp:152
bool HasExposure() const
Checks if the exposure component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:387
bool HasHostGain() const
Checks if the host gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:543
BrightnessComponent & AnalogGain() const
Gets access to the analog gain component for sensor-level gain control.
Definition peak_afl_advanced_auto_brightness.hpp:410
IController::FinishedCallbackHandle RegisterFinishedCallback(const IController::FinishedCallback &callback)
Registers a callback function to be invoked when brightness adjustment completes.
Definition peak_afl_advanced_auto_brightness.hpp:628
BrightnessComponent & HostGain() const
Gets access to the host gain component for software-based gain control.
Definition peak_afl_advanced_auto_brightness.hpp:527
void SetMode(ControllerMode mode) override
Sets the operation mode for the brightness controller.
Definition peak_afl_advanced_auto_brightness.hpp:202
bool HasCombinedGain() const
Checks if the combined gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:504
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes controller state and configuration from an archive.
Definition peak_afl_advanced_auto_brightness.hpp:172
ControllerType GetType() const override
Gets the controller type identifier.
Definition peak_afl_advanced_auto_brightness.hpp:186
void ResetToDefault() override
Resets all controller settings and components to their default values.
Definition peak_afl_advanced_auto_brightness.hpp:607
BrightnessComponent & CombinedGain() const
Gets access to the combined gain component for unified gain control.
Definition peak_afl_advanced_auto_brightness.hpp:488
bool IsRunning() const override
Checks if the brightness controller is currently running.
Definition peak_afl_advanced_auto_brightness.hpp:234
BrightnessComponent & Exposure() const
Gets access to the exposure component for exposure time control.
Definition peak_afl_advanced_auto_brightness.hpp:371
bool HasAnalogGain() const
Checks if the analog gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:426
AdvancedAutoBrightness(peak::afl::Manager &manager, ProcessingCallback callback)
Constructs an AdvancedAutoBrightness controller with the specified manager and callback.
Definition peak_afl_advanced_auto_brightness.hpp:105
features::Roi & Roi()
Gets access to the region of interest (ROI) feature for selective brightness analysis.
Definition peak_afl_advanced_auto_brightness.hpp:331
Abstract base interface for all automatic controllers.
Definition peak_afl_icontroller.hpp:227
Auto percentile feature implementation for auto controllers.
Definition peak_afl_auto_percentile.hpp:58
AutoPercentile(std::shared_ptr< peak::afl::Controller > controller)
Constructs an AutoPercentile feature with the specified controller.
Definition peak_afl_auto_percentile.hpp:72
Auto target feature implementation for auto controllers.
Definition peak_afl_auto_target.hpp:59
AutoTarget(std::shared_ptr< peak::afl::Controller > controller)
Constructs an AutoTarget feature with the specified controller.
Definition peak_afl_auto_target.hpp:73
Auto tolerance feature implementation for auto controllers.
Definition peak_afl_auto_tolerance.hpp:61
AutoTolerance(std::shared_ptr< peak::afl::Controller > controller)
Constructs an AutoTolerance feature with the specified controller.
Definition peak_afl_auto_tolerance.hpp:75
Brightness algorithm feature implementation for auto controllers.
Definition peak_afl_brightness_algorithm.hpp:175
Region of Interest (ROI) feature implementation for auto controllers.
Definition peak_afl_roi.hpp:61
Roi(std::shared_ptr< peak::afl::Controller > controller)
Constructs a Roi feature with the specified controller.
Definition peak_afl_roi.hpp:75
Skip frames feature implementation for auto controllers.
Definition peak_afl_skip_frames.hpp:57
SkipFrames(std::shared_ptr< peak::afl::Controller > controller)
Constructs a SkipFrames feature with the specified controller.
Definition peak_afl_skip_frames.hpp:71
ControllerMode
Controller operation mode enumeration.
Definition peak_afl_icontroller.hpp:59
ControllerType
Controller type enumeration.
Definition peak_afl_icontroller.hpp:40
BrightnessComponentType
Brightness component type enumeration.
Definition peak_afl_brightness_component.hpp:38
@ CombinedGain
Combined gain component - both analog and digital (combined) gain.
Definition peak_afl_brightness_component.hpp:48
@ AnalogGain
Analog gain component - hardware gain applied before digitization.
Definition peak_afl_brightness_component.hpp:44
@ DigitalGain
Digital gain component - gain applied after digitization.
Definition peak_afl_brightness_component.hpp:46
@ HostGain
Host gain component - software-based gain processing.
Definition peak_afl_brightness_component.hpp:50
@ Exposure
Exposure time component - controls sensor integration time.
Definition peak_afl_brightness_component.hpp:42
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