IDS peak AFL v2.0.0
Loading...
Searching...
No Matches
BasicAutoWhiteBalance Class Reference

Basic automatic white balance controller implementation. More...

#include <peak_afl/pipeline/modules/controllers/peak_afl_basic_auto_white_balance.hpp>

Inheritance diagram for BasicAutoWhiteBalance:
IController ISerializable

Public Member Functions

 BasicAutoWhiteBalance (peak::afl::Manager &manager, ProcessingCallback callback)
 Constructs a BasicAutoWhiteBalance controller.
 ~BasicAutoWhiteBalance () override=default
 Destructor.
void SetMode (ControllerMode mode) override
 Sets the operating mode of the auto white balance controller.
ControllerMode GetMode () const override
 Gets the current operating mode of the auto white balance controller.
bool IsRunning () const override
 Checks if the auto white balance controller is currently running.
void ResetToDefault () override
 Resets all controller parameters to their default values.
void SetSkipFrames (uint32_t value)
 Sets the number of frames to skip during auto white balance operations.
uint32_t GetSkipFrames () const
 Gets the current number of frames being skipped.
peak::common::RangeU GetSkipFramesRange () const
 Gets the valid range for the skip frames parameter.
void SetRoi (const peak::common::Rectangle &roi)
 Sets the region of interest (ROI) for white balance evaluation.
peak::common::Rectangle GetRoi ()
 Gets the current region of interest for white balance evaluation.
IController::FinishedCallbackHandle RegisterFinishedCallback (const IController::FinishedCallback &callback)
 Registers a callback function to be called when white balance operations complete.
void UnregisterFinishedCallback (IController::FinishedCallbackHandle callbackHandle)
 Unregisters a previously registered finished callback.
Public Member Functions inherited from IController
virtual ~IController ()=default
 Virtual destructor for proper cleanup of derived classes.
 IController (const IController &)=delete
 Copy constructor deleted to prevent copying.
IController & operator= (const IController &)=delete
 Copy assignment deleted to prevent copying.
 IController (IController &&)=delete
 Move constructor deleted to prevent moving.
IController & operator= (IController &&)=delete
 Move assignment deleted to prevent moving.

Additional Inherited Members

Public Types inherited from IController
using FinishedCallback
 Callback function type for operation completion notifications.
using FinishedCallbackHandle
 Handle type for managing callback registrations.
Protected Member Functions inherited from IController
peak::afl::Manager & GetManager ()
 Gets a reference to the API manager.

Detailed Description

Basic automatic white balance controller implementation.

The BasicAutoWhiteBalance class provides a streamlined interface for automatic white balance control. This controller offers essential color correction capabilities with simplified configuration options suitable for most standard white balance requirements.

Key Features:

  • ROI-based analysis: Region-of-interest selection for targeted white balance areas
  • Processing callbacks: Real-time notifications during white balance operations
  • Multiple control modes: Continuous, once, and manual white balance modes
  • Serialization support: Configuration persistence and restoration
Note
This controller requires a valid manager instance for camera communication
White balance capability depends on underlying device support
See also
AdvancedAutoWhiteBalance
detail::IController
features::Roi
Since
1.8

Constructor & Destructor Documentation

◆ BasicAutoWhiteBalance()

BasicAutoWhiteBalance ( peak::afl::Manager & manager,
ProcessingCallback callback )
inlineexplicit

Constructs a BasicAutoWhiteBalance controller.

Parameters
managerReference to the API manager instance that will manage this controller. The manager must remain valid for the lifetime of this controller.
callbackProcessing callback function that will be invoked during white balance processing operations. This callback allows for custom processing or notification when white balance adjustments are being performed.
Since
1.8

◆ ~BasicAutoWhiteBalance()

~BasicAutoWhiteBalance ( )
overridedefault

Destructor.

Cleans up resources and ensures proper shutdown of the auto white balance controller.

Since
1.8

Member Function Documentation

◆ GetMode()

ControllerMode GetMode ( ) const
inlineoverridevirtual

Gets the current operating mode of the auto white balance controller.

Returns
The current controller mode.
Since
1.8

Implements IController.

◆ GetRoi()

peak::common::Rectangle GetRoi ( )
inline

Gets the current region of interest for white balance evaluation.

Returns
Rectangle representing the current ROI used for white balance calculations. If no ROI has been set, this typically returns the entire image area.
Since
1.8

◆ GetSkipFrames()

uint32_t GetSkipFrames ( ) const
inline

Gets the current number of frames being skipped.

Returns
The number of frames currently being skipped between white balance evaluations.
Since
1.8

◆ GetSkipFramesRange()

peak::common::RangeU GetSkipFramesRange ( ) const
inline

Gets the valid range for the skip frames parameter.

Returns
Range object containing the minimum and maximum allowed values for the skip frames setting.
Since
1.8

◆ IsRunning()

bool IsRunning ( ) const
inlineoverridevirtual

Checks if the auto white balance controller is currently running.

Returns
true if the controller is running (mode is not Off), false otherwise.
Since
1.8

Implements IController.

◆ RegisterFinishedCallback()

IController::FinishedCallbackHandle RegisterFinishedCallback ( const IController::FinishedCallback & callback)
inline

Registers a callback function to be called when white balance operations complete.

The callback will be invoked when the auto white balance operation finishes, whether it succeeds or fails. This allows for asynchronous monitoring of white balance operations and integration with application workflows.

Parameters
callbackFunction object to be called upon white balance operation completion. The callback should accept parameters indicating the operation result.
Returns
Handle that can be used to unregister the callback later.
Since
1.8

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets all controller parameters to their default values.

This method restores the controller to its initial configuration, resetting all settings including skip frames and ROI to their default values.

Since
1.8

Implements IController.

◆ SetMode()

void SetMode ( ControllerMode mode)
inlineoverridevirtual

Sets the operating mode of the auto white balance controller.

Parameters
modeThe desired controller mode (e.g., Off, On, Auto, Manual). See ControllerMode enumeration for available options.
Since
1.8

Implements IController.

◆ SetRoi()

void SetRoi ( const peak::common::Rectangle & roi)
inline

Sets the region of interest (ROI) for white balance evaluation.

The ROI defines the specific area of the image that will be used for white balance calculations. This allows the system to focus on particular regions that are more representative of the desired color temperature, ignoring areas that might contain misleading color information.

Parameters
roiRectangle defining the region of interest in image coordinates. The rectangle should be within the bounds of the image and contain sufficient pixel data for accurate white balance calculation.
Since
1.8

◆ SetSkipFrames()

void SetSkipFrames ( uint32_t value)
inline

Sets the number of frames to skip during auto white balance operations.

Frame skipping can be used to reduce computational load by processing only every nth frame during white balance operations. This can improve performance while maintaining acceptable color correction quality.

Parameters
valueNumber of frames to skip between white balance evaluations. Must be within the valid range returned by GetSkipFramesRange().
Since
1.8

◆ UnregisterFinishedCallback()

void UnregisterFinishedCallback ( IController::FinishedCallbackHandle callbackHandle)
inline

Unregisters a previously registered finished callback.

Parameters
callbackHandleHandle returned by RegisterFinishedCallback() that identifies the callback to be removed.
Since
1.8

The documentation for this class was generated from the following file: