IDS peak AFL v1.7.0
Loading...
Searching...
No Matches
Automanager

Functions

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Create (peak_afl_manager_handle *handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
 Create an automanager instance.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Destroy (peak_afl_manager_handle handle)
 Destroy an automanager instance.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_AddController (peak_afl_manager_handle handle, peak_afl_manager_handle controller)
 Add a controller to an auto manager instance.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_RemoveController (peak_afl_manager_handle handle, peak_afl_manager_handle controller)
 Remove a controller to an automanager instance.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process (peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
 Process an image.
 
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_AutoFeatureManager_DestroyAllController (peak_afl_manager_handle handle)
 Destroy all controllers for a manager.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyController (peak_afl_manager_handle handle, peak_afl_controller_handle controller)
 Destroy a controller.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetGainIPL (peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle)
 Set the IPL Gain.
 
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Status (peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
 Get the status of a manager.
 

Detailed Description

Auto manager

An Auto manager can apply multiple auto features to an image, which is achieved by registering one or more Controllers for the manager.

The following controllers are available:

An auto manager is always related to a single camera with its Nodemap.

Processing images

For the automatic control to work, images must be transferred to the manager, which will pass them to all registered controllers.

Note
The auto feature manager process function handles the images asynchronously.

With the status function the manager can be checked if an image is currently processed.

Note
If an image is passed to the process function while the manager is processing a image it will be rejected.

Setup the auto feature manager with controllers

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

Function Documentation

◆ peak_afl_AutoFeatureManager_AddController()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_AddController ( peak_afl_manager_handle handle,
peak_afl_manager_handle controller )

Add a controller to an auto manager instance.

An auto controller instance can only be added to one autofeature manager at the same time. The same type can only be added one time. To create an instance call peak_afl_AutoController_Create or call the convenience function peak_afl_AutoFeatureManager_CreateController.

Parameters
[in]handleautofeature handle
[in]controllercontroller handle
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_AutoFeatureManager_Create()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Create ( peak_afl_manager_handle * handle,
PEAK_NODE_MAP_HANDLE nodeMapHandle )

Create an automanager instance.

Creates an automanager instance. The PEAK_NODE_MAP_HANDLE can be acquired by calling Handle() from std::shared_ptr<peak::core::NodeMap>

Parameters
[out]handlepointer to an autofeature handle
[in]nodeMapHandlea handle to the device nodemap
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0

◆ peak_afl_AutoFeatureManager_CreateController()

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.

Convenience function to create an autofeature controller and add it to the manager. The same type can only be added one time.

Parameters
[in]handlemanager handle
[out]controllercontroller handle
[in]controllerTypecontroller type, see peak_afl_controllerType
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_AutoFeatureManager_Destroy()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Destroy ( peak_afl_manager_handle handle)

Destroy an automanager instance.

If the function succeeds, the handle is invalid.

Parameters
[in]handleautofeature handle
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_INVALID_PARAMETER The library is not initialized.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0

◆ peak_afl_AutoFeatureManager_DestroyAllController()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyAllController ( peak_afl_manager_handle handle)

Destroy all controllers for a manager.

After this operation, all controller handles associated with the given manager will be invalid.

Parameters
[in]handlecontroller handle
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_AutoFeatureManager_DestroyController()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyController ( peak_afl_manager_handle handle,
peak_afl_controller_handle controller )

Destroy a controller.

After this operation, the controller handle will be invalid.

Parameters
[in]handlemanager handle
[in]controllercontroller handle
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_AutoFeatureManager_Process()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process ( peak_afl_manager_handle handle,
PEAK_IPL_IMAGE_HANDLE imageHandle )

Process an image.

Processes an image. To get the handle for the image, call ImageBackendAccessor::BackendHandle(img) with img being a peak::ipl::Image

Parameters
[in]handleautofeature handle
[in]imageHandleimage handle
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_INVALID_IMAGE_FORMAT The image format is not supported
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0

◆ peak_afl_AutoFeatureManager_RemoveController()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_RemoveController ( peak_afl_manager_handle handle,
peak_afl_manager_handle controller )

Remove a controller to an automanager instance.

Remove a controller from a manager. To destroy the controller object, call peak_afl_AutoController_Destroy afterward. Or peak_afl_AutoFeatureManager_AddController to add it to another manager. For a function which destroys the object in one call, see peak_afl_AutoFeatureManager_DestroyController.

Parameters
[in]handleautofeature handle
[in]controllercontroller handle
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_AutoFeatureManager_SetGainIPL()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetGainIPL ( peak_afl_manager_handle handle,
PEAK_IPL_GAIN_HANDLE gainHandle )

Set the IPL Gain.

To get the handle for the gain, call GainBackendAccessor::BackendHandle(gain) with gain being a peak::ipl::Gain

Parameters
[in]handlepointer to an autofeature handle
[in]gainHandlea handle to the ipl gain
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.2

◆ peak_afl_AutoFeatureManager_Status()

PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Status ( peak_afl_manager_handle handle,
peak_afl_BOOL8 * running )

Get the status of a manager.

The parameter running will contain whether the manager currently processes an image (PEAK_AFL_TRUE) or is idle (PEAK_AFL_FALSE).

Parameters
[in]handlemanager handle
[out]runningmanager 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