IDS peak AFL v2.0.2
Loading...
Searching...
No Matches
Pipeline Controller

Specialized automatic control implementations for camera features within the pipeline module framework. More...

Data Structures

class  IController
 Abstract base interface for all automatic controllers. More...
class  AdvancedAutoBrightness
 Advanced automatic brightness controller with comprehensive feature set. More...
class  AdvancedAutoFocus
 Advanced automatic focus controller with comprehensive feature set. More...
class  AdvancedAutoWhiteBalance
 Advanced automatic white balance controller with comprehensive feature set. More...
class  BasicAutoBrightness
 Basic automatic brightness controller implementation. More...
class  BasicAutoFocus
 Basic automatic focus controller implementation. More...
class  BasicAutoWhiteBalance
 Basic automatic white balance controller implementation. More...

Enumerations

enum class  ControllerType { Focus , Brightness , WhiteBalance }
 Controller type enumeration. More...
enum class  ControllerMode { Off , Continuous , Once }
 Controller operation mode enumeration. More...

Functions

std::string ToString (ControllerType mode)
 Converts ControllerType enumeration to string representation.
std::string ToString (ControllerMode mode)
 Converts ControllerMode enumeration to string representation.

Detailed Description

Specialized automatic control implementations for camera features within the pipeline module framework.

Pipeline Controllers

The Pipeline Controllers provide specialized automatic control implementations for camera features within the pipeline module framework. These controllers offer both basic and advanced interfaces for brightness, focus, and white balance control.

The following pipeline controller classes are available:

Basic Controllers

The features within the advanced controller are accessed via the direct function interface.

Advanced Controllers

The features within the advanced controller are accessed via the feature interface.

Key Features

Basic Controllers

  • Simplified Interface: Direct setter methods for common parameters
  • Policy-Based Control: Unified control strategies (e.g., ExposureAndGain, ExposureOnly, GainOnly)
  • Essential Parameters: Core functionality with reduced complexity
  • Streamlined Configuration: Fewer options, easier setup

Advanced Controllers

  • Granular Control: Component-specific parameter adjustment
  • Extended Features: Additional configuration options and fine-tuning (brightness components)
  • Professional Applications: Optimized for demanding imaging requirements

Basic Controllers Usage

BasicAutoBrightness

The BasicAutoBrightness controller provides essential brightness control through exposure and gain adjustment with simplified configuration.

auto& brightness = basicAutoFeature.AutoBrightness();
// Configure brightness policy
// Set target brightness and tolerance
brightness.SetAutoTarget(128);
brightness.SetAutoTolerance(15);
// Configure exposure and gain limits
brightness.SetExposureLimit({ 0.001, 0.1 }); // 1ms to 100ms
brightness.SetGainLimit({ 1.0, 16.0 }); // 1x to 16x gain
// Set analysis algorithm
// Enable continuous mode

BasicAutoFocus

The BasicAutoFocus controller offers standard focus control with essential search and sharpness algorithms.

auto& focus = basicAutoFeature.AutoFocus();
// Configure search and sharpness algorithms
// Set focus limits and hysteresis
focus.SetFocusLimit({ 100, 900 });
focus.SetHysteresis(8);
// Configure weighted ROIs for focus evaluation
std::vector<peak::pipeline::modules::autofeature::WeightedROI> rois = { { { { 200, 200 }, { 400, 300 } },
focus.SetWeightedROIs(rois);
// Set skip frames for performance
focus.SetSkipFrames(2);
// Enable once mode for single focus operation

BasicAutoWhiteBalance

The BasicAutoWhiteBalance controller provides fundamental color correction capabilities.

// Create white balance controller with callback
auto& whiteBalance = basicAutoFeature.AutoWhiteBalance();
// Set region of interest for analysis
whiteBalance.SetRoi({ { 150, 150 }, { 300, 200 } });
// Configure frame skipping
whiteBalance.SetSkipFrames(3);
// Enable continuous mode

Advanced Controllers Usage

AdvancedAutoBrightness

The AdvancedAutoBrightness controller provides sophisticated brightness control with component-specific configuration.

// Create advanced brightness controller
auto& brightness = advancedAutoFeature.AutoBrightness();
// Configure advanced analysis algorithms
brightness.AnalysisAlgorithm().Set(
brightness.AutoPercentile().Set(85.0);
// Set target and tolerance with precision
brightness.AutoTarget().Set(135);
brightness.AutoTolerance().Set(6);
// Component-specific configuration (advanced feature)
// Configure individual exposure, analog gain, digital gain components
// with separate limits and modes for each component
// Enable continuous mode

AdvancedAutoFocus

The AdvancedAutoFocus controller offers professional focus control with advanced algorithms and features.

// Create advanced focus controller
auto& focus = advancedAutoFeature.AutoFocus();
// Configure advanced search algorithms
focus.SharpnessAlgorithm().Set(
// Advanced ROI configuration with multiple weighted regions
std::vector<peak::pipeline::modules::autofeature::WeightedROI> advancedRois = {
{ { { 100, 100 }, { 150, 150 } },
{ { { 300, 150 }, { 100, 100 } },
{ { { 200, 300 }, { 120, 80 } },
};
focus.WeightedROIs().Set(advancedRois);
// Fine-tuned parameters
focus.FocusLimit().Set({ 50, 950 });
focus.Hysteresis().Set(3);
focus.SkipFrames().Set(1);
// Enable once mode

AdvancedAutoWhiteBalance

The AdvancedAutoWhiteBalance controller provides sophisticated color correction with custom algorithms.

// Create advanced white balance controller
auto& whiteBalance = advancedAutoFeature.AutoWhiteBalance();
// Precise ROI configuration
whiteBalance.Roi().Set({ { 160, 120 }, { 320, 240 } });
// Advanced algorithm configuration
// Custom white balance algorithms and parameters available
// Performance optimization
whiteBalance.SkipFrames().Set(2);
// Enable continuous mode

Controller Comparison

Basic vs Advanced Controllers

Feature Basic Controllers Advanced Controllers
Interface Simplified methods Granular control
Configuration Policy-based Component-specific
Algorithms Standard set Extended + custom
Parameters Essential only Full parameter set

Common Patterns

Mode Configuration

// All controllers support the same modes
whiteBalance.SetMode(peak::pipeline::modules::autofeature::ControllerMode::Once); // Single operation

Callback Registration

// Register completion callbacks
auto handle = brightness.RegisterFinishedCallback([]() { std::cout << "Processing complete" << std::endl; });
// Unregister when no longer needed
brightness.UnregisterFinishedCallback(handle);
Note
All pipeline controllers inherit from the base IController interface and provide consistent behavior patterns.
Basic controllers are recommended for most applications, while advanced controllers should be used when specific algorithmic control or component-level configuration is required.
Controllers are designed to be used within the Pipeline Module framework but can also be used independently.

Enumeration Type Documentation

◆ ControllerMode

enum class ControllerMode
strong

Controller operation mode enumeration.

Defines the operational modes that automatic controllers can operate in. These modes control when and how the automatic algorithms are executed.

Since
1.8
Enumerator
Off 

Controller is disabled - no automatic processing.

Continuous 

Continuous operation - automatic processing on every frame.

Once 

Single operation - automatic processing triggered once.

◆ ControllerType

enum class ControllerType
strong

Controller type enumeration.

Defines the different types of automatic controllers available in the auto feature pipeline system. Each controller type specializes in a specific aspect of automatic camera control.

Since
1.8
Enumerator
Focus 

Automatic focus controller - manages lens focus positioning.

Brightness 

Automatic brightness controller - manages exposure and gain.

WhiteBalance 

Automatic white balance controller - manages color correction.

Function Documentation

◆ ToString() [1/2]

std::string ToString ( ControllerMode mode)
inline

Converts ControllerMode enumeration to string representation.

Parameters
[in]modeThe controller mode to convert
Returns
String representation of the controller mode
Exceptions
peak::afl::error::InvalidParameterExceptionif mode is unknown
Since
1.8

◆ ToString() [2/2]

std::string ToString ( ControllerType mode)
inline

Converts ControllerType enumeration to string representation.

Parameters
[in]modeThe controller type to convert
Returns
String representation of the controller type
Exceptions
peak::afl::error::InvalidParameterExceptionif type is unknown
Since
1.8