IDSpeakAFL  v1.1.0
peak_afl.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <peak_ipl/backend/peak_ipl_backend.h>
#include <peak/backend/peak_backend.h>

Go to the source code of this file.

Data Structures

struct  peak_afl_size
 peak_afl Size (2D) More...
 
struct  peak_afl_position
 peak_afl Position (2D) More...
 
struct  peak_afl_rectangle
 peak_afl Rectangle (2D) More...
 
struct  peak_afl_weighted_rectangle
 peak_afl Focus Rectangle More...
 
struct  peak_afl_controller_limit
 peak_afl Focus Limit More...
 

Macros

#define PEAK_AFL_TRUE
 Boolean True.
 
#define PEAK_AFL_FALSE
 Boolean False.
 

Typedefs

typedef void * peak_afl_controller_handle
 opaque controller handle type
 
typedef void * peak_afl_manager_handle
 opaque manager handle type
 
typedef void(* PEAK_AFL_CALLBACK_FINISHED_FUNC) (void *)
 Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_FINISHED.
 
typedef void(* PEAK_AFL_CALLBACK_PROCESSING_DATA_FUNC) (int, int, void *)
 Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA.
 
typedef uint8_t peak_afl_BOOL8
 custom boolean type
 

Enumerations

enum  peak_afl_status {
  PEAK_AFL_STATUS_SUCCESS, PEAK_AFL_STATUS_ERROR, PEAK_AFL_STATUS_NOT_INITIALIZED, PEAK_AFL_STATUS_INVALID_PARAMETER,
  PEAK_AFL_STATUS_ACCESS_DENIED, PEAK_AFL_STATUS_BUSY, PEAK_AFL_STATUS_BUFFER_TOO_SMALL, PEAK_AFL_STATUS_INVALID_IMAGE_FORMAT,
  PEAK_AFL_STATUS_NOT_SUPPORTED
}
 peak_afl Status codes More...
 
enum  peak_afl_controllerType { PEAK_AFL_CONTROLLER_TYPE_INVALID, PEAK_AFL_CONTROLLER_TYPE_AUTOFOCUS }
 controller types More...
 
enum  peak_afl_controller_automode { PEAK_AFL_CONTROLLER_AUTOMODE_OFF, PEAK_AFL_CONTROLLER_AUTOMODE_CONTINUOUS, PEAK_AFL_CONTROLLER_AUTOMODE_ONCE }
 controller automode More...
 
enum  peak_afl_controller_status {
  PEAK_AFL_CONTROLLER_STATUS_UNDEFINED, PEAK_AFL_CONTROLLER_STATUS_OFF, PEAK_AFL_CONTROLLER_STATUS_IN_PROGRESS, PEAK_AFL_CONTROLLER_STATUS_FINISHED,
  PEAK_AFL_CONTROLLER_STATUS_BUSY, PEAK_AFL_CONTROLLER_STATUS_CANCELED, PEAK_AFL_CONTROLLER_STATUS_ERROR
}
 controller status More...
 
enum  peak_afl_controller_algorithm {
  PEAK_AFL_CONTROLLER_ALGORITHM_AUTO, PEAK_AFL_CONTROLLER_ALGORITHM_GOLDEN_RATIO_SEARCH, PEAK_AFL_CONTROLLER_ALGORITHM_HILL_CLIMBING_SEARCH, PEAK_AFL_CONTROLLER_ALGORITHM_GLOBAL_SEARCH,
  PEAK_AFL_CONTROLLER_ALGORITHM_FULL_SCAN
}
 controller algorithm More...
 
enum  peak_afl_controller_sharpness_algorithm {
  PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_AUTO, PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_TENENGRAD, PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_SOBEL, PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_MEAN_SCORE,
  PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_HISTOGRAM_VARIANCE
}
 controller sharpness algorithm (focus) More...
 
enum  peak_afl_roi_weight { PEAK_AFL_CONTROLLER_ROI_WEIGHT_WEAK, PEAK_AFL_CONTROLLER_ROI_WEIGHT_MEDIUM, PEAK_AFL_CONTROLLER_ROI_WEIGHT_STRONG }
 controller roi weight (focus) More...
 
enum  peak_afl_callback_type { PEAK_AFL_CONTROLLER_CALLBACK_FINISHED, PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA }
 controller callback type More...
 
enum  peak_afl_roi_preset { PEAK_AFL_CONTROLLER_ROI_PRESET_CENTER }
 controller roi preset More...
 

Functions

peak_afl_status peak_afl_Init (void)
 Init the peak_afl auto feature library. More...
 
peak_afl_status peak_afl_Exit (void)
 Exit the peak_afl auto feature library. More...
 
peak_afl_status peak_afl_GetLastError (peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
 Get the last error message. More...
 
peak_afl_status peak_afl_GetVersion (uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
 Query the library version. More...
 
peak_afl_status peak_afl_AutoFeatureManager_Create (peak_afl_manager_handle *handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
 Create an automanager instance. More...
 
peak_afl_status peak_afl_AutoFeatureManager_Destroy (peak_afl_manager_handle handle)
 Destroy an automanager instance. More...
 
peak_afl_status peak_afl_AutoFeatureManager_AddController (peak_afl_manager_handle handle, peak_afl_manager_handle controller)
 Add a controller to an automanager instance. More...
 
peak_afl_status peak_afl_AutoFeatureManager_RemoveController (peak_afl_manager_handle handle, peak_afl_manager_handle controller)
 Remove a controller to an automanager instance. More...
 
peak_afl_status peak_afl_AutoFeatureManager_Process (peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
 Process an image. More...
 
peak_afl_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. More...
 
peak_afl_status peak_afl_AutoFeatureManager_DestroyAllController (peak_afl_manager_handle handle)
 Destroy all controllers for a manager. More...
 
peak_afl_status peak_afl_AutoFeatureManager_DestroyController (peak_afl_manager_handle handle, peak_afl_controller_handle controller)
 Destroy a controller. More...
 
peak_afl_status peak_afl_AutoFeatureManager_Status (peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
 Get the status of a manager. More...
 
peak_afl_status peak_afl_AutoController_Create (peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
 Create a new controller. More...
 
peak_afl_status peak_afl_AutoController_Destroy (peak_afl_controller_handle controller)
 Destroy a controller. Will fail if it is queued inside a manager. More...
 
peak_afl_status peak_afl_AutoController_SkipFrames_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if skip frames is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_SkipFrames_Set (peak_afl_controller_handle controller, uint32_t count)
 Set number of frames skipped for a controller. More...
 
peak_afl_status peak_afl_AutoController_SkipFrames_Get (peak_afl_controller_handle controller, uint32_t *count)
 Get number of frames skipped for a controller. More...
 
peak_afl_status peak_afl_AutoController_SkipFrames_GetRange (peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
 Get range for frames skipped for a controller. More...
 
peak_afl_status peak_afl_AutoController_ROI_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if setting a region of interest is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_ROI_Set (peak_afl_controller_handle controller, peak_afl_rectangle roi)
 Set the autofeature region of interest for a controller. More...
 
peak_afl_status peak_afl_AutoController_ROI_Get (peak_afl_controller_handle controller, peak_afl_rectangle *roi)
 Get the autofeature region of interest for a controller. More...
 
peak_afl_status peak_afl_AutoController_ROI_Preset_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if ROI preset is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_ROI_Preset_Set (peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset)
 Set the autofeature region of interest preset for a controller. More...
 
peak_afl_status peak_afl_AutoController_Mode_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if auto mode is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_Mode_Set (peak_afl_controller_handle controller, peak_afl_controller_automode mode)
 Set the autofeature mode for a controller. More...
 
peak_afl_status peak_afl_AutoController_Mode_Get (peak_afl_controller_handle controller, peak_afl_controller_automode *mode)
 Get the current autofeature mode for a controller. More...
 
peak_afl_status peak_afl_AutoController_Status (peak_afl_controller_handle controller, peak_afl_controller_status *status)
 Get the status for a controller. More...
 
peak_afl_status peak_afl_AutoController_GetLastAutoAverage (peak_afl_controller_handle controller, uint8_t *average)
 Get the last auto average for a controller. More...
 
peak_afl_status peak_afl_AutoController_GetLastAutoAverages (peak_afl_controller_handle controller, uint8_t *averageRed, uint8_t *averageGreen, uint8_t *averageBlue)
 Get the last auto average for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTarget_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 check if auto target is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTarget_Set (peak_afl_controller_handle controller, uint32_t target)
 Set the auto target for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTarget_Get (peak_afl_controller_handle controller, uint32_t *target)
 Get the currently set auto target for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTarget_GetRange (peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
 Get the auto target range for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTolerance_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 check if auto tolerance is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTolerance_Set (peak_afl_controller_handle controller, uint32_t tolerance)
 Set the auto tolerance for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTolerance_Get (peak_afl_controller_handle controller, uint32_t *tolerance)
 Get the current auto tolerance for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoTolerance_GetRange (peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
 Get the auto tolerance range for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoPercentile_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 check if auto percentile is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoPercentile_Set (peak_afl_controller_handle controller, double percentile)
 Set the auto percentile for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoPercentile_Get (peak_afl_controller_handle controller, double *percentile)
 Get the auto percentile for a controller. More...
 
peak_afl_status peak_afl_AutoController_AutoPercentile_GetRange (peak_afl_controller_handle controller, double *min, double *max, double *inc)
 Get the auto percentile range for a controller. More...
 
peak_afl_status peak_afl_AutoController_Type_Get (peak_afl_controller_handle controller, peak_afl_controllerType *type)
 Get the controller type. More...
 
peak_afl_status peak_afl_AutoController_Algorithm_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 check if setting an algorithm is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_Algorithm_Set (peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm)
 Set the used algorithm for a controller. More...
 
peak_afl_status peak_afl_AutoController_Algorithm_Get (peak_afl_controller_handle controller, peak_afl_controller_algorithm *algorithm)
 Get the used algorithm for a controller. More...
 
peak_afl_status peak_afl_AutoController_Algorithm_GetList (peak_afl_controller_handle controller, peak_afl_controller_algorithm *typeList, uint32_t *listSize)
 Get the list of supported algorithms for a controller. More...
 
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 check setting a sharpness algorithm is supported by a controller. More...
 
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_Set (peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm)
 Set the used sharpness algorithm for a controller. More...
 
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_Get (peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm *algorithm)
 Get the used sharpness algorithm for a controller. More...
 
peak_afl_status peak_afl_AutoController_SharpnessAlgorithm_GetList (peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm *typeList, uint32_t *listSize)
 Get the list of supported sharpness algorithms for a controller. More...
 
peak_afl_status peak_afl_AutoController_Callback_Set (peak_afl_controller_handle controller, peak_afl_callback_type type, void *funcPtr, void *context)
 Set a callback for a controller. More...
 
peak_afl_status peak_afl_AutoController_Weighted_ROI_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if weighted region of interest is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_Weighted_ROI_Min_Size (peak_afl_controller_handle controller, peak_afl_size *size)
 Get the autofeature minimum size of weighted region of interest for a controller. More...
 
peak_afl_status peak_afl_AutoController_Weighted_ROI_Set (peak_afl_controller_handle controller, const peak_afl_weighted_rectangle *weightedRoiList, uint32_t listSize)
 Set the autofeature weighted region of interest for a controller. More...
 
peak_afl_status peak_afl_AutoController_Weighted_ROI_Get (peak_afl_controller_handle controller, peak_afl_weighted_rectangle *weightedRoiList, uint32_t *listSize)
 Get the autofeature weighted region of interest for a controller. More...
 
peak_afl_status peak_afl_AutoController_Limit_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if limit is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_Limit_Default (peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
 Get the autofeature default limit. More...
 
peak_afl_status peak_afl_AutoController_Limit_Set (peak_afl_controller_handle controller, peak_afl_controller_limit limit)
 Set the autofeature limit for a controller. More...
 
peak_afl_status peak_afl_AutoController_Limit_Get (peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
 Get the autofeature limit for a controller. More...
 
peak_afl_status peak_afl_AutoController_Hysteresis_IsSupported (peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
 Check if hysteresis is supported for a controller. More...
 
peak_afl_status peak_afl_AutoController_Hysteresis_Default (peak_afl_controller_handle controller, uint8_t *hysteresis)
 Get the autofeature hysteresis default. More...
 
peak_afl_status peak_afl_AutoController_Hysteresis_Set (peak_afl_controller_handle controller, uint8_t hysteresis)
 Set the autofeature hysteresis for a controller. More...
 
peak_afl_status peak_afl_AutoController_Hysteresis_Get (peak_afl_controller_handle controller, uint8_t *hysteresis)
 Get the autofeature hysteresis for a controller. More...
 
peak_afl_status peak_afl_AutoController_Hysteresis_GetRange (peak_afl_controller_handle controller, uint8_t *min, uint8_t *max, uint8_t *inc)
 Get autofeature hysteresis range for a controller. More...
 

Detailed Description

Author
IDS Imaging Development Systems GmbH
Date
2022-11-15
Since
1.0

Copyright (c) 2022 - 2023, IDS Imaging Development Systems GmbH. All rights reserved.