IDS peak AFL v2.0.0
Loading...
Searching...
No Matches
AutoController

Specific controllers that represent automatic control functionality for camera features. More...

Topics

 Auto focus
 Automatic focus control for lens focus positioning and sharpness optimization.
 Auto whitebalance
 Automatic white balance control for color correction and temperature adjustment.
 Auto brightness
 Automatic brightness control through exposure and gain adjustment.
 Controller settings
 Common configuration settings and parameters for auto feature controllers.

Enumerations

enum  peak_afl_controllerType { PEAK_AFL_CONTROLLER_TYPE_INVALID , PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS , PEAK_AFL_CONTROLLER_TYPE_WHITE_BALANCE , PEAK_AFL_CONTROLLER_TYPE_AUTOFOCUS }
 Auto feature controller types. More...

Functions

PEAK_AFL_API_STATUS peak_afl_AutoController_Create (peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
 Create a new auto feature controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy (peak_afl_controller_handle controller)
 Destroy a standalone controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Status (peak_afl_controller_handle controller, peak_afl_controller_status *status)
 Get the status for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Type_Get (peak_afl_controller_handle controller, peak_afl_controllerType *type)
 Get the controller type.

Detailed Description

Specific controllers that represent automatic control functionality for camera features.

Auto controller

The Auto controller represents a specific controller. A controller is always assigned to an Auto manager

It is possible to add multiple controllers to an Auto manager therefore the images will be processed in sequence.

Example

// create auto manager
peak_afl_AutoFeatureManager_Create(&hManager, nodemapHandle);
// create a brightness controller within our manager
peak_afl_controller_handle hBrightnessController = 0;
hManager, &hBrightnessController, PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS);
// run the auto exposure and auto gain component in continuous mode
// create a whitebalance controller within our manager
peak_afl_controller_handle hWhitebalanceController = 0;
hManager, &hWhitebalanceController, PEAK_AFL_CONTROLLER_TYPE_WHITE_BALANCE);
while (acquisitionRunning)
{
// submit the images
peak_afl_AutoFeatureManager_Process(hManager, imageHandle);
}
// remove && destroy the white balance controller
peak_afl_AutoFeatureManager_RemoveController(hManager, hWhitebalanceController);
peak_afl_AutoController_Destroy(hWhitebalanceController);
// destroy all left controllers
// destroy the auto manager

Enumeration Type Documentation

◆ peak_afl_controllerType

Auto feature controller types.

Defines the available types of automatic feature controllers that can be created and managed by the auto feature system. Each controller type specializes in controlling specific camera parameters.

See also
peak_afl_AutoController_Create()
Enumerator
PEAK_AFL_CONTROLLER_TYPE_INVALID 

Invalid or uninitialized controller type.

This value indicates an invalid controller type and should not be used for controller creation.

PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS 

Automatic brightness exposure/gain controller.

Controls camera exposure time, gain settings, and other parameters to maintain optimal image brightness. Can work with multiple gain types (analog, digital, combined, host) and exposure settings.

See also
Auto brightness
PEAK_AFL_CONTROLLER_TYPE_WHITE_BALANCE 

Automatic white balance controller.

Adjusts color channel gains to correct for different lighting conditions and maintain accurate color reproduction. Supports various white balance algorithms and manual/automatic operation modes.

See also
Auto whitebalance
PEAK_AFL_CONTROLLER_TYPE_AUTOFOCUS 

Automatic focus controller.

Automatically adjusts camera focus to achieve maximum image sharpness using various focus algorithms and search strategies. Supports both continuous and single-shot focus operations.

See also
Auto focus

Function Documentation

◆ peak_afl_AutoController_Create()

PEAK_AFL_API_STATUS peak_afl_AutoController_Create ( peak_afl_controller_handle * controller,
peak_afl_controllerType controllerType )

Create a new auto feature controller.

Creates a new automatic feature controller of the specified type. Controllers are responsible for analyzing images and adjusting specific camera parameters to achieve optimal results. The created controller can be added to managers for coordinated processing.

Parameters
[out]controllerPointer to receive the new controller handle. Must not be NULL. The handle will be set to a valid controller instance on success.
[in]controllerTypeType of controller to create:
  • PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS: Automatic brightness/exposure control
  • PEAK_AFL_CONTROLLER_TYPE_WHITE_BALANCE: Automatic white balance control
  • PEAK_AFL_CONTROLLER_TYPE_AUTOFOCUS: Automatic focus control
Returns
PEAK_AFL_STATUS_SUCCESS Controller created successfully
PEAK_AFL_STATUS_NOT_INITIALIZED Library not initialized - call peak_afl_Init() first
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller pointer or unsupported controller type
PEAK_AFL_STATUS_ERROR Internal error during controller creation
Note
The created controller must be destroyed with peak_afl_AutoController_Destroy()
Controllers are initially configured with default settings
Controllers must be added to a manager before they can process images
Multiple controllers of the same type can be created for different configurations
Example:
// Create a brightness controller
peak_afl_controller_handle brightnessCtrl = NULL;
if (status == PEAK_AFL_STATUS_SUCCESS) {
// Configure controller
// Add to manager for processing
// Clean up when done
}
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
Set the auto target for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Create(peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a new auto feature controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
Destroy a standalone controller.
@ PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS
Automatic brightness exposure/gain controller.
Definition peak_afl.h:507
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_CreateController(peak_afl_manager_handle handle, peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a controller and append it to Manager.
PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_automode mode)
Set the automatic processing mode for a controller.
@ PEAK_AFL_CONTROLLER_AUTOMODE_CONTINUOUS
Continuous automatic adjustment.
Definition peak_afl.h:562
peak_afl_status
Auto feature library status codes.
Definition peak_afl.h:383
@ PEAK_AFL_STATUS_SUCCESS
Operation completed successfully.
Definition peak_afl.h:389
void * peak_afl_controller_handle
Opaque handle for auto feature controllers.
Definition peak_afl.h:357
See also
peak_afl_AutoController_Destroy()
peak_afl_AutoFeatureManager_CreateController()
peak_afl_controllerType
Since
1.0

◆ peak_afl_AutoController_Destroy()

PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy ( peak_afl_controller_handle controller)

Destroy a standalone controller.

Destroys an automatic feature controller that is not currently associated with any manager. This function releases all resources allocated for the controller and invalidates the handle. Controllers that are currently added to a manager cannot be destroyed directly and must first be removed from the manager using peak_afl_AutoFeatureManager_RemoveController().

Parameters
[in]controllerController handle to destroy. Must be a valid controller handle obtained from peak_afl_AutoController_Create() and not currently associated with any auto feature manager.
Returns
PEAK_AFL_STATUS_SUCCESS Controller destroyed successfully; handle is now invalid
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle or handle is NULL
PEAK_AFL_STATUS_ACCESS_DENIED Controller is currently associated with a manager; remove it from the manager first
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Warning
After this operation, the controller handle becomes invalid and must not be used
Controllers associated with managers cannot be destroyed directly
Note
Controllers must be removed from managers before they can be destroyed independently
Use peak_afl_AutoFeatureManager_DestroyController() to remove and destroy in one operation
Controllers are automatically destroyed when their associated manager is destroyed
This function is primarily used for controllers that were created but never added to a manager
See also
peak_afl_AutoController_Create()
peak_afl_AutoFeatureManager_RemoveController()
peak_afl_AutoFeatureManager_DestroyController()
Since
1.0

◆ peak_afl_AutoController_Status()

PEAK_AFL_API_STATUS peak_afl_AutoController_Status ( peak_afl_controller_handle controller,
peak_afl_controller_status * status )

Get the status for a controller.

Retrieves the current operational status of the specified auto controller. This function provides information about whether the controller is active, idle, processing, or in an error state. The status can be used to monitor the controller's operation and determine if it's ready to accept new commands or if it's currently busy processing image data.

See peak_afl_controller_status for a list of possible status values.

Note
This function can be called at any time to check the controller state.
The status may change rapidly during active processing operations.
Parameters
[in]controllercontroller handle
[out]statuscontroller status
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_INVALID_PARAMETER The argument is invalid.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0

◆ peak_afl_AutoController_Type_Get()

PEAK_AFL_API_STATUS peak_afl_AutoController_Type_Get ( peak_afl_controller_handle controller,
peak_afl_controllerType * type )

Get the controller type.

Retrieves the type of the specified auto controller, which indicates what kind of automatic adjustment it performs (e.g., brightness, white balance, focus). The controller type determines which features and parameters are available and how the controller processes image data.

This information is useful for determining the capabilities of a controller and for configuring type-specific parameters.

See peak_afl_controllerType for a list of possible controller types.

Parameters
[in]controllercontroller handle
[out]typeauto controller type
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_INVALID_PARAMETER The argument is invalid.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0