IDS peak AFL v2.1.0
Loading...
Searching...
No Matches
peak_afl_basic_auto_white_balance.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
13
15
16namespace peak
17{
18namespace pipeline
19{
20namespace modules
21{
22namespace autofeature
23{
24
50{
52 using ProcessingCallback = std::function<void()>;
53
54public:
65 explicit BasicAutoWhiteBalance(peak::afl::Manager& manager, ProcessingCallback callback)
66 : IController(manager)
67 , m_genericController(manager, std::move(callback))
68 {}
69
76 ~BasicAutoWhiteBalance() override = default;
77
85 void SetMode(ControllerMode mode) override
86 {
87 m_genericController.SetMode(mode);
88 }
89
96 PEAK_COMMON_NO_DISCARD ControllerMode GetMode() const override
97 {
98 return m_genericController.GetMode();
99 }
100
107 PEAK_COMMON_NO_DISCARD bool IsRunning() const override
108 {
109 return m_genericController.IsRunning();
110 }
111
119 void ResetToDefault() override
120 {
121 m_genericController.ResetToDefault();
122 }
123
135 void SetSkipFrames(uint32_t value)
136 {
137 m_genericController.SkipFrames().Set(value);
138 }
139
146 PEAK_COMMON_NO_DISCARD uint32_t GetSkipFrames() const
147 {
148 return m_genericController.SkipFrames().Get();
149 }
150
158 PEAK_COMMON_NO_DISCARD peak::common::RangeU GetSkipFramesRange() const
159 {
160 return m_genericController.SkipFrames().GetRange();
161 }
162
177 {
178 m_genericController.Roi().Set(roi);
179 }
180
188 PEAK_COMMON_NO_DISCARD peak::common::Rectangle GetRoi()
189 {
190 return m_genericController.Roi().Get();
191 }
192
205 IController::FinishedCallbackHandle RegisterFinishedCallback(const IController::FinishedCallback& callback)
206 {
207 return m_genericController.RegisterFinishedCallback(callback);
208 }
209
217 void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
218 {
219 m_genericController.UnregisterFinishedCallback(callbackHandle);
220 }
221
222private:
223 detail::GenericWhiteBalance m_genericController;
224
231 PEAK_COMMON_NO_DISCARD std::string GetName() const override
232 {
233 return "BasicAutoWhiteBalance";
234 }
235
245 void Serialize(peak::common::serialization::IArchive& archive) const override
246 {
247 m_genericController.Serialize(archive);
248 }
249
259 void Deserialize(const peak::common::serialization::IArchive& archive) override
260 {
261 m_genericController.Deserialize(archive);
262 }
263
270 PEAK_COMMON_NO_DISCARD ControllerType GetType() const override
271 {
272 return m_genericController.GetType();
273 }
274};
275
276} // namespace autofeature
277} // namespace modules
278} // namespace pipeline
279} // 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
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:176
void UnregisterFinishedCallback(IController::FinishedCallbackHandle callbackHandle)
Unregisters a previously registered finished callback.
Definition peak_afl_basic_auto_white_balance.hpp:217
peak::common::RangeU GetSkipFramesRange() const
Gets the valid range for the skip frames parameter.
Definition peak_afl_basic_auto_white_balance.hpp:158
BasicAutoWhiteBalance(peak::afl::Manager &manager, ProcessingCallback callback)
Constructs a BasicAutoWhiteBalance controller.
Definition peak_afl_basic_auto_white_balance.hpp:65
ControllerMode GetMode() const override
Gets the current operating mode of the auto white balance controller.
Definition peak_afl_basic_auto_white_balance.hpp:96
uint32_t GetSkipFrames() const
Gets the current number of frames being skipped.
Definition peak_afl_basic_auto_white_balance.hpp:146
peak::common::Rectangle GetRoi()
Gets the current region of interest for white balance evaluation.
Definition peak_afl_basic_auto_white_balance.hpp:188
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:205
void SetMode(ControllerMode mode) override
Sets the operating mode of the auto white balance controller.
Definition peak_afl_basic_auto_white_balance.hpp:85
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:135
void ResetToDefault() override
Resets all controller parameters to their default values.
Definition peak_afl_basic_auto_white_balance.hpp:119
bool IsRunning() const override
Checks if the auto white balance controller is currently running.
Definition peak_afl_basic_auto_white_balance.hpp:107
Abstract base interface for all automatic controllers.
Definition peak_afl_icontroller.hpp:223
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:55
ControllerType
Controller type enumeration.
Definition peak_afl_icontroller.hpp:36
detail::RectangleT< int32_t, uint32_t > Rectangle
Rectangle with integer coordinates and unsigned dimensions.
Definition peak_common_rectangle.hpp:231
detail::RangeT< uint32_t > RangeU
Alias for a range of 32-bit unsigned integers.
Definition peak_common_range.hpp:222
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