IDS peak AFL v2.1.0
Loading...
Searching...
No Matches
Pipeline Modules

High-level interfaces for automatic camera control through integrated auto feature management. More...

Data Structures

class  AdvancedAutoFeatures
 Advanced automatic features module. More...
class  BasicAutoFeatures
 Basic automatic features module. More...

Detailed Description

High-level interfaces for automatic camera control through integrated auto feature management.

For more information see Pipeline Modules.

Pipeline Module

The Pipeline Module provides high-level interfaces for automatic camera control through integrated auto feature management. It offers two main classes that combine multiple controllers into unified, easy-to-use modules.

The following pipeline module classes are available:

Both classes provide automatic control for:

Key Features

Unified Interface

A single point of access for all auto features, eliminating the need to manage individual controllers separately.

Bulk Configuration

Convenient methods in the BasicAutoFeatures for configuring multiple controllers simultaneously:

  • SetAllModes() - Configure operation mode for all controllers
  • SetAllSkipFrames() - Set frame skipping strategy across all controllers

Device Integration

Direct integration with camera devices through the [device interface], automatically detecting and configuring available auto features based on device capabilities.

Serialization Support

Complete configuration persistence allowing you to save and restore auto feature settings.

BasicAutoFeatures vs AdvancedAutoFeatures

BasicAutoFeatures

  • Target audience: Standard auto features
  • Interface: Simplified methods with direct function access
  • Configuration: Policy-based brightness control
  • Complexity: Lower learning curve

AdvancedAutoFeatures

  • Target audience: Advanced auto features e.g. brightness component access
  • Interface: Granular control over individual feature components
  • Configuration: Component-specific parameter control
  • Complexity: Full algorithmic control

Basic Setup Example

// Create basic auto features module
auto autoFeatures = std::make_shared<peak::pipeline::modules::BasicAutoFeatures>(device);
// Configure all controllers with bulk methods
autoFeatures->SetAllSkipFrames(2); // Process every 3rd frame
// Enable the overall system
autoFeatures->SetEnabled(true);

Individual Controller Access

Brightness Control

if (autoFeatures->HasAutoBrightness())
{
auto& brightness = autoFeatures->AutoBrightness();
brightness.SetAutoTarget(128);
}

Focus Control

if (autoFeatures->HasAutoFocus())
{
auto& focus = autoFeatures->AutoFocus();
}

White Balance Control

if (autoFeatures->HasAutoWhiteBalance())
{
auto& whiteBalance = autoFeatures->AutoWhiteBalance();
whiteBalance.SetRoi({ { 100, 100 }, { 300, 200 } });
}

Controller Modes

The pipeline modules support different operation modes for each controller:

  • ControllerMode::Off - Controller is disabled
  • ControllerMode::Continuous - Automatic processing on every frame
  • ControllerMode::Once - Single operation triggered once

Frame Skipping

Reduce computational load and controller stabilization by processing only every Nth frame:

// Set for all controllers
autoFeatures->SetAllSkipFrames(4); // Process every 5th frame
// Or set individually
autoFeatures->AutoBrightness().SetSkipFrames(2);
autoFeatures->AutoFocus().SetSkipFrames(10);

Conditional Processing

Always check controller availability before configuration:

if (autoFeatures->HasAutoBrightness())
{
// Safe to configure brightness controller
}

Error Handling

Parameter Validation

// Validate parameters against supported ranges
auto targetRange = brightness.GetAutoTargetRange();
if (desiredTarget >= targetRange.GetMinimum() && desiredTarget <= targetRange.GetMaximum())
{
brightness.SetAutoTarget(desiredTarget);
}

Exception Handling

try
{
auto result = autoFeatures->Process(imageHandle);
}
{
// Handle unsupported feature
}
{
// Handle invalid parameter
}

Configuration Persistence

Saving Configuration

peak::icv::Archive archive;
autoFeatures->Serialize(archive);
// Save archive to file

Loading Configuration

// Load archive from file
autoFeatures->Deserialize(archive);
Note
The pipeline module automatically handles device capability detection and only enables supported controllers.
For maximum performance and controller stabilization, use appropriate skip frames settings and controller modes based on your application requirements.