IDS peak AFL v2.0.2
Loading...
Searching...
No Matches
peak_afl_basic_auto_white_balance.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <peak_afl/peak_afl.hpp>
17
19
20namespace peak
21{
22namespace pipeline
23{
24namespace modules
25{
26namespace autofeature
27{
28
54{
56 using ProcessingCallback = std::function<void()>;
57
58public:
69 explicit BasicAutoWhiteBalance(peak::afl::Manager& manager, ProcessingCallback callback)
70 : IController(manager)
71 , m_genericController(manager, std::move(callback))
72 {}
73
80 ~BasicAutoWhiteBalance() override = default;
81
89 void SetMode(ControllerMode mode) override
90 {
91 m_genericController.SetMode(mode);
92 }
93
100 PEAK_COMMON_NO_DISCARD ControllerMode GetMode() const override
101 {
102 return m_genericController.GetMode();
103 }
104
111 PEAK_COMMON_NO_DISCARD bool IsRunning() const override
112 {
113 return m_genericController.IsRunning();
114 }
115
123 void ResetToDefault() override
124 {
125 m_genericController.ResetToDefault();
126 }
127
139 void SetSkipFrames(uint32_t value)
140 {
141 m_genericController.SkipFrames().Set(value);
142 }
143
150 PEAK_COMMON_NO_DISCARD uint32_t GetSkipFrames() const
151 {
152 return m_genericController.SkipFrames().Get();
153 }
154
162 PEAK_COMMON_NO_DISCARD peak::common::RangeU GetSkipFramesRange() const
163 {
164 return m_genericController.SkipFrames().GetRange();
165 }
166
181 {
182 m_genericController.Roi().Set(roi);
183 }
184
192 PEAK_COMMON_NO_DISCARD peak::common::Rectangle GetRoi()
193 {
194 return m_genericController.Roi().Get();
195 }
196
209 IController::FinishedCallbackHandle RegisterFinishedCallback(const IController::FinishedCallback& callback)
210 {
211 return m_genericController.RegisterFinishedCallback(callback);
212 }
213
221 void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
222 {
223 m_genericController.UnregisterFinishedCallback(callbackHandle);
224 }
225
226private:
227 detail::GenericWhiteBalance m_genericController;
228
235 PEAK_COMMON_NO_DISCARD std::string GetName() const override
236 {
237 return "BasicAutoWhiteBalance";
238 }
239
249 void Serialize(peak::common::serialization::IArchive& archive) const override
250 {
251 m_genericController.Serialize(archive);
252 }
253
263 void Deserialize(const peak::common::serialization::IArchive& archive) override
264 {
265 m_genericController.Deserialize(archive);
266 }
267
274 PEAK_COMMON_NO_DISCARD ControllerType GetType() const override
275 {
276 return m_genericController.GetType();
277 }
278};
279
280} // namespace autofeature
281} // namespace modules
282} // namespace pipeline
283} // 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
void SetRoi(const peak::common::Rectangle &roi)
Sets the region of interest (ROI) for white balance evaluation.
Definition peak_afl_basic_auto_white_balance.hpp:180
void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
Unregisters a previously registered finished callback.
Definition peak_afl_basic_auto_white_balance.hpp:221
peak::common::RangeU GetSkipFramesRange() const
Gets the valid range for the skip frames parameter.
Definition peak_afl_basic_auto_white_balance.hpp:162
BasicAutoWhiteBalance(peak::afl::Manager &manager, ProcessingCallback callback)
Constructs a BasicAutoWhiteBalance controller.
Definition peak_afl_basic_auto_white_balance.hpp:69
ControllerMode GetMode() const override
Gets the current operating mode of the auto white balance controller.
Definition peak_afl_basic_auto_white_balance.hpp:100
uint32_t GetSkipFrames() const
Gets the current number of frames being skipped.
Definition peak_afl_basic_auto_white_balance.hpp:150
peak::common::Rectangle GetRoi()
Gets the current region of interest for white balance evaluation.
Definition peak_afl_basic_auto_white_balance.hpp:192
IController::FinishedCallbackHandle RegisterFinishedCallback(const IController::FinishedCallback &callback)
Registers a callback function to be called when white balance operations complete.
Definition peak_afl_basic_auto_white_balance.hpp:209
void SetMode(ControllerMode mode) override
Sets the operating mode of the auto white balance controller.
Definition peak_afl_basic_auto_white_balance.hpp:89
void SetSkipFrames(uint32_t value)
Sets the number of frames to skip during auto white balance operations.
Definition peak_afl_basic_auto_white_balance.hpp:139
void ResetToDefault() override
Resets all controller parameters to their default values.
Definition peak_afl_basic_auto_white_balance.hpp:123
bool IsRunning() const override
Checks if the auto white balance controller is currently running.
Definition peak_afl_basic_auto_white_balance.hpp:111
Abstract base interface for all automatic controllers.
Definition peak_afl_icontroller.hpp:227
virtual std::string GetName() const =0
Gets the unique name of this controller.
virtual ControllerType GetType() const =0
Gets the type of this controller.
ControllerMode
Controller operation mode enumeration.
Definition peak_afl_icontroller.hpp:59
ControllerType
Controller type enumeration.
Definition peak_afl_icontroller.hpp:40
detail::RectangleT< int32_t, uint32_t > Rectangle
Rectangle with integer coordinates and unsigned dimensions.
Definition peak_common_rectangle.hpp:236
detail::RangeT< uint32_t > RangeU
Alias for a range of 32-bit unsigned integers.
Definition peak_common_range.hpp:172
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