IDS peak AFL v2.1.0
Loading...
Searching...
No Matches
peak_afl_advanced_auto_brightness.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
19
22
23#include <memory>
24#include <utility>
25#include <vector>
26
27namespace peak
28{
29namespace pipeline
30{
31namespace modules
32{
33namespace autofeature
34{
35
79{
80 using ProcessingCallback = std::function<void()>;
81
82public:
83 friend BrightnessComponent;
84
101 explicit AdvancedAutoBrightness(peak::afl::Manager& manager, ProcessingCallback callback)
102 : IController(manager)
103 , m_genericController{ manager, std::move(callback),
106 {}
107
113 ~AdvancedAutoBrightness() override = default;
114
124 PEAK_COMMON_NO_DISCARD std::string GetName() const override
125 {
126 return "AdvancedAutoBrightness";
127 }
128
149 {
150 m_genericController.Serialize(archive);
151 }
152
169 {
170 m_genericController.Deserialize(archive);
171 }
172
182 PEAK_COMMON_NO_DISCARD ControllerType GetType() const override
183 {
184 return m_genericController.GetType();
185 }
186
198 void SetMode(ControllerMode mode) override
199 {
200 m_genericController.SetMode(mode);
201 }
202
214 PEAK_COMMON_NO_DISCARD ControllerMode GetMode() const override
215 {
216 return m_genericController.GetMode();
217 }
218
230 PEAK_COMMON_NO_DISCARD bool IsRunning() const override
231 {
232 return m_genericController.IsRunning();
233 }
234
250 PEAK_COMMON_NO_DISCARD features::SkipFrames& SkipFrames()
251 {
252 return m_genericController.SkipFrames();
253 }
254
270 PEAK_COMMON_NO_DISCARD features::AutoTarget& AutoTarget()
271 {
272 return m_genericController.AutoTarget();
273 }
274
290 PEAK_COMMON_NO_DISCARD features::AutoTolerance& AutoTolerance()
291 {
292 return m_genericController.AutoTolerance();
293 }
294
309 PEAK_COMMON_NO_DISCARD features::AutoPercentile& AutoPercentile()
310 {
311 return m_genericController.AutoPercentile();
312 }
313
327 PEAK_COMMON_NO_DISCARD features::Roi& Roi()
328 {
329 return m_genericController.Roi();
330 }
331
347 {
348 return m_genericController.AnalysisAlgorithm();
349 }
350
367 PEAK_COMMON_NO_DISCARD BrightnessComponent& Exposure() const
368 {
369 return m_genericController.ExposureComponent();
370 }
371
383 PEAK_COMMON_NO_DISCARD bool HasExposure() const
384 {
385 return m_genericController.HasExposureComponent();
386 }
387
406 PEAK_COMMON_NO_DISCARD BrightnessComponent& AnalogGain() const
407 {
408 return m_genericController.AnalogGainComponent();
409 }
410
422 PEAK_COMMON_NO_DISCARD bool HasAnalogGain() const
423 {
424 return m_genericController.HasAnalogGainComponent();
425 }
426
445 PEAK_COMMON_NO_DISCARD BrightnessComponent& DigitalGain() const
446 {
447 return m_genericController.DigitalGainComponent();
448 }
449
461 PEAK_COMMON_NO_DISCARD bool HasDigitalGain() const
462 {
463 return m_genericController.HasDigitalGainComponent();
464 }
465
484 PEAK_COMMON_NO_DISCARD BrightnessComponent& CombinedGain() const
485 {
486 return m_genericController.CombinedGainComponent();
487 }
488
500 PEAK_COMMON_NO_DISCARD bool HasCombinedGain() const
501 {
502 return m_genericController.HasCombinedGainComponent();
503 }
504
523 PEAK_COMMON_NO_DISCARD BrightnessComponent& HostGain() const
524 {
525 return m_genericController.HostGainComponent();
526 }
527
539 PEAK_COMMON_NO_DISCARD bool HasHostGain() const
540 {
541 return m_genericController.HasHostGainComponent();
542 }
543
560 PEAK_COMMON_NO_DISCARD std::vector<BrightnessComponent*> GetComponents() const
561 {
562 return m_genericController.GetComponents();
563 }
564
580 PEAK_COMMON_NO_DISCARD BrightnessComponent* GetComponent(BrightnessComponentType componentType) const
581 {
582 return m_genericController.GetComponent(componentType);
583 }
584
603 void ResetToDefault() override
604 {
605 m_genericController.ResetToDefault();
606 }
607
624 IController::FinishedCallbackHandle RegisterFinishedCallback(const IController::FinishedCallback& callback)
625 {
626 return m_genericController.RegisterFinishedCallback(callback);
627 }
628
641 void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
642 {
643 m_genericController.UnregisterFinishedCallback(callbackHandle);
644 }
645
646private:
647 detail::GenericAutoBrightness m_genericController;
648};
649
650} // namespace autofeature
651} // namespace modules
652} // namespace pipeline
653} // namespace peak
Central coordination object for automatic camera feature control.
Definition peak_afl.hpp:708
Interface for a hierarchical key-value archive system.
Definition peak_common_iarchive.hpp:54
features::BrightnessAlgorithm & AnalysisAlgorithm()
Gets access to the brightness algorithm feature for algorithm selection.
Definition peak_afl_advanced_auto_brightness.hpp:346
void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
Unregisters a previously registered completion callback.
Definition peak_afl_advanced_auto_brightness.hpp:641
features::AutoTolerance & AutoTolerance()
Gets access to the auto tolerance feature for brightness stability control.
Definition peak_afl_advanced_auto_brightness.hpp:290
features::AutoTarget & AutoTarget()
Gets access to the auto target feature for brightness target configuration.
Definition peak_afl_advanced_auto_brightness.hpp:270
BrightnessComponent & DigitalGain() const
Gets access to the digital gain component for post-processing gain control.
Definition peak_afl_advanced_auto_brightness.hpp:445
~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:214
BrightnessComponent * GetComponent(BrightnessComponentType componentType) const
Gets a specific brightness component by type.
Definition peak_afl_advanced_auto_brightness.hpp:580
features::AutoPercentile & AutoPercentile()
Gets access to the auto percentile feature used for automatic brightness adjustment.
Definition peak_afl_advanced_auto_brightness.hpp:309
std::vector< BrightnessComponent * > GetComponents() const
Gets a vector of all available brightness components.
Definition peak_afl_advanced_auto_brightness.hpp:560
std::string GetName() const override
Gets the name identifier for this controller.
Definition peak_afl_advanced_auto_brightness.hpp:124
features::SkipFrames & SkipFrames()
Gets access to the skip frames feature.
Definition peak_afl_advanced_auto_brightness.hpp:250
bool HasDigitalGain() const
Checks if the digital gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:461
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:148
bool HasExposure() const
Checks if the exposure component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:383
bool HasHostGain() const
Checks if the host gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:539
BrightnessComponent & AnalogGain() const
Gets access to the analog gain component for sensor-level gain control.
Definition peak_afl_advanced_auto_brightness.hpp:406
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:624
BrightnessComponent & HostGain() const
Gets access to the host gain component for software-based gain control.
Definition peak_afl_advanced_auto_brightness.hpp:523
void SetMode(ControllerMode mode) override
Sets the operation mode for the brightness controller.
Definition peak_afl_advanced_auto_brightness.hpp:198
bool HasCombinedGain() const
Checks if the combined gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:500
void Deserialize(const peak::common::serialization::IArchive &archive) override
Deserializes controller state and configuration from an archive.
Definition peak_afl_advanced_auto_brightness.hpp:168
ControllerType GetType() const override
Gets the controller type identifier.
Definition peak_afl_advanced_auto_brightness.hpp:182
void ResetToDefault() override
Resets all controller settings and components to their default values.
Definition peak_afl_advanced_auto_brightness.hpp:603
BrightnessComponent & CombinedGain() const
Gets access to the combined gain component for unified gain control.
Definition peak_afl_advanced_auto_brightness.hpp:484
bool IsRunning() const override
Checks if the brightness controller is currently running.
Definition peak_afl_advanced_auto_brightness.hpp:230
BrightnessComponent & Exposure() const
Gets access to the exposure component for exposure time control.
Definition peak_afl_advanced_auto_brightness.hpp:367
bool HasAnalogGain() const
Checks if the analog gain component is available on the current device.
Definition peak_afl_advanced_auto_brightness.hpp:422
AdvancedAutoBrightness(peak::afl::Manager &manager, ProcessingCallback callback)
Constructs an AdvancedAutoBrightness controller with the specified manager and callback.
Definition peak_afl_advanced_auto_brightness.hpp:101
features::Roi & Roi()
Gets access to the region of interest (ROI) feature for selective brightness analysis.
Definition peak_afl_advanced_auto_brightness.hpp:327
Abstract base interface for all automatic controllers.
Definition peak_afl_icontroller.hpp:223
Auto percentile feature implementation for auto controllers.
Definition peak_afl_auto_percentile.hpp:54
AutoPercentile(std::shared_ptr< peak::afl::Controller > controller)
Constructs an AutoPercentile feature with the specified controller.
Definition peak_afl_auto_percentile.hpp:68
Auto target feature implementation for auto controllers.
Definition peak_afl_auto_target.hpp:55
AutoTarget(std::shared_ptr< peak::afl::Controller > controller)
Constructs an AutoTarget feature with the specified controller.
Definition peak_afl_auto_target.hpp:69
Auto tolerance feature implementation for auto controllers.
Definition peak_afl_auto_tolerance.hpp:57
AutoTolerance(std::shared_ptr< peak::afl::Controller > controller)
Constructs an AutoTolerance feature with the specified controller.
Definition peak_afl_auto_tolerance.hpp:71
Brightness algorithm feature implementation for auto controllers.
Definition peak_afl_brightness_algorithm.hpp:171
Region of Interest (ROI) feature implementation for auto controllers.
Definition peak_afl_roi.hpp:57
Roi(std::shared_ptr< peak::afl::Controller > controller)
Constructs a Roi feature with the specified controller.
Definition peak_afl_roi.hpp:71
Skip frames feature implementation for auto controllers.
Definition peak_afl_skip_frames.hpp:53
SkipFrames(std::shared_ptr< peak::afl::Controller > controller)
Constructs a SkipFrames feature with the specified controller.
Definition peak_afl_skip_frames.hpp:67
ControllerMode
Controller operation mode enumeration.
Definition peak_afl_icontroller.hpp:55
ControllerType
Controller type enumeration.
Definition peak_afl_icontroller.hpp:36
BrightnessComponentType
Brightness component type enumeration.
Definition peak_afl_brightness_component.hpp:34
@ CombinedGain
Combined gain component - both analog and digital (combined) gain.
Definition peak_afl_brightness_component.hpp:44
@ AnalogGain
Analog gain component - hardware gain applied before digitization.
Definition peak_afl_brightness_component.hpp:40
@ DigitalGain
Digital gain component - gain applied after digitization.
Definition peak_afl_brightness_component.hpp:42
@ HostGain
Host gain component - software-based gain processing.
Definition peak_afl_brightness_component.hpp:46
@ Exposure
Exposure time component - controls sensor integration time.
Definition peak_afl_brightness_component.hpp:38
Interface definitions and implementations for individual module types used within a pipeline.
Definition peak_afl_generic_auto_brightness.hpp:35
Interfaces and implementations for defining and controlling data processing pipelines.
Definition peak_afl_generic_auto_brightness.hpp:33