IDS peak AFL v2.0.0
Loading...
Searching...
No Matches
peak_afl.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <peak_ipl/backend/peak_ipl_backend.h>
20#include <peak/backend/peak_backend.h>
21
22/* Function declaration modifiers */
23#if defined(_WIN32)
24# ifndef PEAK_AFL_NO_DECLSPEC_STATEMENTS
25# ifdef PEAK_AFL_EXPORTING
26# define PEAK_AFL_EXPORT __declspec(dllexport)
27# else
28# define PEAK_AFL_EXPORT __declspec(dllimport)
29# endif
30# else
31# define PEAK_AFL_EXPORT
32# endif
33# if defined(_M_IX86) || defined(__i386__)
34# define PEAK_AFL_CALLCONV __cdecl
35# else
36# define PEAK_AFL_CALLCONV
37# endif
38#else
39# define PEAK_AFL_EXPORT
40# define PEAK_AFL_CALLCONV
41#endif
42
43#ifdef __cplusplus
44# include <cstddef>
45# include <cstdint>
46
47extern "C" {
48#else
49# include <stddef.h>
50# include <stdint.h>
51#endif
52
53#if !defined(PEAK_AFL_NO_WARN_DEPRECATED)
54# if defined(__cplusplus) && __cplusplus >= 201402L || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) \
55 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
56# define PEAK_AFL_DEPRECATED_ATTR [[deprecated]]
57# define PEAK_AFL_DEPRECATED_ATTR_MSG(X) [[deprecated(X)]]
58# define PEAK_AFL_DEPRECATED(X) X PEAK_AFL_DEPRECATED_ATTR
59# define PEAK_AFL_DEPRECATED_MSG(X, Y) X [[deprecated(Y)]]
60# elif defined(__GNUC__)
61# define PEAK_AFL_DEPRECATED_ATTR __attribute__((deprecated))
62# define PEAK_AFL_DEPRECATED_ATTR_MSG(X) __attribute__((deprecated(X)))
63# define PEAK_AFL_DEPRECATED(X) X PEAK_AFL_DEPRECATED_ATTR
64# define PEAK_AFL_DEPRECATED_MSG(X, Y) X __attribute__((deprecated(Y)))
65# else
66# define PEAK_AFL_DEPRECATED_ATTR
67# define PEAK_AFL_DEPRECATED_ATTR_MSG(X)
68# define PEAK_AFL_DEPRECATED(X) X
69# define PEAK_AFL_DEPRECATED_MSG(X, Y) X
70# endif
71# if defined(__cplusplus) && __cplusplus >= 201703L || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) \
72 || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
73# define PEAK_AFL_DEPRECATED_ENUM_ATTR [[deprecated]]
74# elif defined(__GNUC__)
75# define PEAK_AFL_DEPRECATED_ENUM_ATTR __attribute__((deprecated))
76# else
77# define PEAK_AFL_DEPRECATED_ENUM_ATTR
78# endif
79#else
80# define PEAK_AFL_DEPRECATED_ATTR
81# define PEAK_AFL_DEPRECATED_ENUM_ATTR
82# define PEAK_AFL_DEPRECATED_ATTR_MSG(X)
83# define PEAK_AFL_DEPRECATED(X) X
84# define PEAK_AFL_DEPRECATED_MSG(X, Y) X
85#endif
86
87#if defined(_MSC_VER)
88# define PEAK_AFL_BEGIN_DISABLE_DEPRECATED_WARNINGS __pragma(warning(push)) __pragma(warning(disable : 4996))
89# define PEAK_AFL_END_DISABLE_DEPRECATED_WARNINGS __pragma(warning(pop))
90#elif defined(__clang__)
91# define PEAK_AFL_BEGIN_DISABLE_DEPRECATED_WARNINGS \
92 _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
93# define PEAK_AFL_END_DISABLE_DEPRECATED_WARNINGS _Pragma("clang diagnostic pop")
94#elif defined(__GNUC__)
95# define PEAK_AFL_BEGIN_DISABLE_DEPRECATED_WARNINGS \
96 _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
97# define PEAK_AFL_END_DISABLE_DEPRECATED_WARNINGS _Pragma("GCC diagnostic pop")
98#else
99# define PEAK_AFL_BEGIN_DISABLE_DEPRECATED_WARNINGS
100# define PEAK_AFL_END_DISABLE_DEPRECATED_WARNINGS
101#endif
102
103#define PEAK_AFL_VERSION_CODE(major, minor, subminor, patch) (((major) << 24) + ((minor) << 16) + ((subminor) << 8) + (patch))
104#define PEAK_AFL_API_STATUS PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV
105
112
118
124
130
136
142
148
154
160
166
176
184
192
200
208
216
223
230
237
244
251
258
265
271
280
286
293
302
309
319
326
332
339
346
358
370
477
531
575
576
679
680
759
795
864
958
1025
1063
1113
1160
1222
1298
1358
1367typedef void(PEAK_AFL_CALLCONV* PEAK_AFL_CALLBACK_FINISHED_FUNC)(void* context);
1368
1379typedef void(PEAK_AFL_CALLCONV* PEAK_AFL_CALLBACK_PROCESSING_FUNC)(peak_afl_process_data* data, void* context);
1380
1395PEAK_AFL_DEPRECATED_ATTR typedef void(PEAK_AFL_CALLCONV* PEAK_AFL_CALLBACK_PROCESSING_DATA_FUNC)(
1396 int focusValue, int sharpnessValue, void* context);
1397
1422
1434typedef struct
1435{
1443 uint32_t width;
1444
1452 uint32_t height;
1454
1465typedef struct
1466{
1473 uint32_t x;
1474
1481 uint32_t y;
1483
1496typedef struct
1497{
1503 uint32_t x;
1504
1510 uint32_t y;
1511
1517 uint32_t width;
1518
1524 uint32_t height;
1526
1556
1568typedef struct
1569{
1576 int min;
1577
1584 int max;
1586
1598typedef struct
1599{
1606 double min;
1607
1614 double max;
1616
1628typedef uint8_t peak_afl_BOOL8;
1629
1637#define PEAK_AFL_TRUE 1
1638
1646#define PEAK_AFL_FALSE 0
1647
1664PEAK_AFL_API_STATUS peak_afl_Init(void);
1665
1683PEAK_AFL_API_STATUS peak_afl_Exit(void);
1684
1709PEAK_AFL_API_STATUS peak_afl_GetLastError(peak_afl_status* lastErrorCode, char* lastErrorMessage, size_t* lastErrorMessageSize);
1710
1730PEAK_AFL_API_STATUS peak_afl_GetVersion(
1731 uint32_t* majorVersion, uint32_t* minorVersion, uint32_t* subminorVersion, uint32_t* patchVersion);
1732
1766PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle* handle, PEAK_NODE_MAP_HANDLE nodeMapHandle);
1767
1802
1839
1869
1919PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle);
1920
1964
1991
2029
2063PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetGainIPL(peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle);
2064
2100PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetCCM(peak_afl_manager_handle handle, float* ccm, size_t ccm_size);
2101
2133
2162 peak_afl_manager_handle handle, peak_afl_controllerType controllerType, peak_afl_BOOL8* supported);
2163
2217 peak_afl_controller_handle* controller, peak_afl_controllerType controllerType);
2218
2254
2286 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
2287
2323PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count);
2324
2357PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t* count);
2358
2395 peak_afl_controller_handle controller, uint32_t* min, uint32_t* max, uint32_t* inc);
2396
2428
2465
2498
2531 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
2532
2568
2600
2637
2673
2709
2745
2778 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
2779
2812 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
2813
2892
2934
2974
3018 peak_afl_controller_brightness_component component, peak_afl_callback_type type, void* funcPtr, void* context);
3019
3053 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3054
3090
3125
3157
3184
3205PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t* average);
3206
3230 peak_afl_controller_handle controller, uint8_t* averageRed, uint8_t* averageGreen, uint8_t* averageBlue);
3231
3249 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3250
3271PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target);
3272
3293PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t* target);
3294
3325 peak_afl_controller_handle controller, uint32_t* min, uint32_t* max, uint32_t* inc);
3326
3344 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3345
3372PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance);
3373
3393PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t* tolerance);
3394
3421 peak_afl_controller_handle controller, uint32_t* min, uint32_t* max, uint32_t* inc);
3422
3440 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3441
3462PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile);
3463
3483PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double* percentile);
3484
3512 peak_afl_controller_handle controller, double* min, double* max, double* inc);
3513
3539
3559 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3560
3587
3609
3645 peak_afl_controller_handle controller, peak_afl_controller_algorithm* typeList, uint32_t* listSize);
3646
3666 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3667
3696
3718
3754 peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm* typeList, uint32_t* listSize);
3755
3786 peak_afl_controller_handle controller, peak_afl_callback_type type, void* funcPtr, void* context);
3787
3811 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
3812
3834
3863 peak_afl_controller_handle controller, const peak_afl_weighted_rectangle* weightedRoiList, uint32_t listSize);
3864
3899 peak_afl_controller_handle controller, peak_afl_weighted_rectangle* weightedRoiList, uint32_t* listSize);
3900
3923
3945
3969
3990
4014 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
4015
4035PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t* hysteresis);
4036
4059PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis);
4060
4080PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t* hysteresis);
4081
4106 peak_afl_controller_handle controller, uint8_t* min, uint8_t* max, uint8_t* inc);
4107
4140 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
4141
4183
4209
4244
4279
4306
4333
4368
4390
4413
4444
4466
4489
4519
4541
4564
4565#ifdef __cplusplus
4566} // extern "C"
4567#endif // __cplusplus
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if auto percentile is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
Set the auto percentile for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double *percentile)
Get the auto percentile for a controller.
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if auto target is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t *target)
Get the currently set auto target for a controller.
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_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
Set the auto tolerance for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if auto tolerance is supported for a controller.
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t *tolerance)
Get the current auto tolerance for a controller.
peak_afl_controllerType
Auto feature controller types.
Definition peak_afl.h:489
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_Create(peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a new auto feature controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType *type)
Get the controller type.
PEAK_AFL_API_STATUS peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
Destroy a standalone controller.
@ PEAK_AFL_CONTROLLER_TYPE_INVALID
Invalid or uninitialized controller type.
Definition peak_afl.h:496
@ PEAK_AFL_CONTROLLER_TYPE_WHITE_BALANCE
Automatic white balance controller.
Definition peak_afl.h:518
@ PEAK_AFL_CONTROLLER_TYPE_AUTOFOCUS
Automatic focus controller.
Definition peak_afl.h:529
@ PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS
Automatic brightness exposure/gain controller.
Definition peak_afl.h:507
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_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_AddController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Add a controller to an auto manager instance.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetCCM(peak_afl_manager_handle handle, float *ccm, size_t ccm_size)
Set the Color Correction Matrix (CCM) for image processing.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Process an image through the auto feature pipeline.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Destroy a controller from a manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
Get the processing status of an auto feature manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle)
Destroy an automanager instance.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle)
Destroy all controllers associated with a manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_Controller_IsSupported(peak_afl_manager_handle handle, peak_afl_controllerType controllerType, peak_afl_BOOL8 *supported)
Check if a controller type is supported by the manager.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_SetGainIPL(peak_afl_manager_handle handle, PEAK_IPL_GAIN_HANDLE gainHandle)
Set the IPL Gain for image processing.
PEAK_AFL_API_STATUS peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Remove a controller from an auto feature manager instance.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm algorithm)
Set the brightness analysis algorithm for a controller.
peak_afl_controller_brightness_algorithm
Brightness calculation algorithms.
Definition peak_afl.h:772
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_brightness_algorithm *algorithm)
Get the current brightness analysis algorithm for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if brightness algorithm configuration is supported for a controller.
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEAN
Mean-based brightness calculation.
Definition peak_afl.h:793
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_ALGORITHM_MEDIAN
Median-based brightness calculation.
Definition peak_afl.h:782
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Callback_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_callback_type type, void *funcPtr, void *context)
Set a callback function for a specific brightness component.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Status(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_controller_status *status)
Get the operational status for a specific brightness component.
peak_afl_controller_brightness_component
Brightness control components.
Definition peak_afl.h:877
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Unit_IsSupported(peak_afl_controller_handle controller, peak_afl_controller_brightness_component unit, peak_afl_BOOL8 *supported)
Check if a specific brightness component unit is supported for a controller.
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_INVALID
Invalid or uninitialized component.
Definition peak_afl.h:884
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_ANALOG_GAIN
Analog gain control.
Definition peak_afl.h:919
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_GAIN
Generic gain control.
Definition peak_afl.h:907
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_COMBINED_GAIN
Combined analog and digital gain.
Definition peak_afl.h:943
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_HOST_GAIN
Host-based software gain.
Definition peak_afl.h:955
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_DIGITAL_GAIN
Digital gain control.
Definition peak_afl.h:931
@ PEAK_AFL_CONTROLLER_BRIGHTNESS_COMPONENT_EXPOSURE
Camera exposure time control.
Definition peak_afl.h:896
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_controller_automode *mode)
Get the current automatic mode for a specific brightness component.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_controller_automode mode)
Set the automatic mode for a specific brightness component.
PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if brightness component mode configuration is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t *average)
Get the last auto average for a controller.
peak_afl_callback_type
Controller callback types.
Definition peak_afl.h:1076
PEAK_AFL_API_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.
void(PEAK_AFL_CALLCONV * PEAK_AFL_CALLBACK_PROCESSING_FUNC)(peak_afl_process_data *data, void *context)
Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING.
Definition peak_afl.h:1379
void(PEAK_AFL_CALLCONV * PEAK_AFL_CALLBACK_FINISHED_FUNC)(void *context)
Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_FINISHED.
Definition peak_afl.h:1367
@ PEAK_AFL_CONTROLLER_CALLBACK_FINISHED
Controller operation finished callback.
Definition peak_afl.h:1086
@ PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA
Legacy processing data callback.
Definition peak_afl.h:1100
@ PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING
Enhanced processing callback.
Definition peak_afl.h:1111
PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_automode *mode)
Get the current automatic processing mode for a controller.
peak_afl_controller_automode
Auto feature controller operation modes.
Definition peak_afl.h:543
PEAK_AFL_API_STATUS peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if automatic mode configuration is supported for a controller.
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_CONTROLLER_AUTOMODE_OFF
Auto feature disabled.
Definition peak_afl.h:551
@ PEAK_AFL_CONTROLLER_AUTOMODE_ONCE
Single adjustment operation.
Definition peak_afl.h:573
PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if exposure limit configuration is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set exposure time limits for automatic exposure control.
PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get the current exposure time limits for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ExposureLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature exposure limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm *algorithm)
Get the used algorithm for a controller.
peak_afl_controller_algorithm
Focus search algorithms.
Definition peak_afl.h:695
PEAK_AFL_API_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.
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_AutoController_Algorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm)
Set the used algorithm for a controller.
@ PEAK_AFL_CONTROLLER_ALGORITHM_GOLDEN_RATIO_SEARCH
Golden ratio search algorithm.
Definition peak_afl.h:716
@ PEAK_AFL_CONTROLLER_ALGORITHM_HILL_CLIMBING_SEARCH
Hill climbing search algorithm.
Definition peak_afl.h:729
@ PEAK_AFL_CONTROLLER_ALGORITHM_FULL_SCAN
Full range scan algorithm.
Definition peak_afl.h:757
@ PEAK_AFL_CONTROLLER_ALGORITHM_AUTO
Automatic algorithm selection.
Definition peak_afl.h:703
@ PEAK_AFL_CONTROLLER_ALGORITHM_GLOBAL_SEARCH
Global search algorithm.
Definition peak_afl.h:743
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature default limit.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if limit is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit)
Set the autofeature limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature analog gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature analog gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainAnalogLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature analog gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature combined gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature combined gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainCombinedLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature combined gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature digital gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature digital gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainDigitalLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature digital gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature host gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature host gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainHostLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature host gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_Set(peak_afl_controller_handle controller, peak_afl_double_limit limit)
Set autofeature gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_GetRange(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature gain limit range for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if gain limit is supported for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_GainLimit_Get(peak_afl_controller_handle controller, peak_afl_double_limit *limit)
Get autofeature gain limit for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis default.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
Set the autofeature hysteresis for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if hysteresis is supported for a controller.
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_Init(void)
Init the peak_afl auto feature library.
PEAK_AFL_API_STATUS peak_afl_Exit(void)
Exit the peak_afl auto feature library.
PEAK_AFL_API_STATUS peak_afl_GetVersion(uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
Query the library version.
PEAK_AFL_API_STATUS peak_afl_GetLastError(peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
Get the last error message.
peak_afl_roi_preset
Predefined ROI preset configurations.
Definition peak_afl.h:1410
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_Set(peak_afl_controller_handle controller, peak_afl_roi_preset roiPreset)
Set a predefined region of interest preset for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if ROI preset feature is supported for a controller.
@ PEAK_AFL_CONTROLLER_ROI_PRESET_CENTER
Center region preset.
Definition peak_afl.h:1420
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle *roi)
Get the current region of interest for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi)
Set the region of interest for automatic feature processing.
PEAK_AFL_API_STATUS peak_afl_AutoController_ROI_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if region of interest (ROI) feature is supported for a controller.
PEAK_AFL_API_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.
PEAK_AFL_API_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.
peak_afl_controller_sharpness_algorithm
Focus sharpness calculation algorithms.
Definition peak_afl.h:808
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_AutoController_SharpnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if setting a sharpness algorithm is supported by a controller.
@ PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_MEAN_SCORE
Mean score algorithm.
Definition peak_afl.h:851
@ PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_SOBEL
Sobel edge detection algorithm.
Definition peak_afl.h:840
@ PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_AUTO
Automatic algorithm selection.
Definition peak_afl.h:818
@ PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_HISTOGRAM_VARIANCE
Histogram variance algorithm.
Definition peak_afl.h:862
@ PEAK_AFL_CONTROLLER_SHARPNESS_ALGORITHM_TENENGRAD
Tenengrad gradient-based algorithm.
Definition peak_afl.h:829
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_GetRange(peak_afl_controller_handle controller, uint32_t *min, uint32_t *max, uint32_t *inc)
Get the valid range for skip frames count.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
Set number of frames to skip for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t *count)
Get the current skip frames count for a controller.
PEAK_AFL_API_STATUS peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if skip frames feature is supported for a controller.
peak_afl_status
Auto feature library status codes.
Definition peak_afl.h:383
peak_afl_controller_status
Controller operational status.
Definition peak_afl.h:589
@ PEAK_AFL_STATUS_SUCCESS
Operation completed successfully.
Definition peak_afl.h:389
@ PEAK_AFL_STATUS_INVALID_IMAGE_FORMAT
Invalid or unsupported image format.
Definition peak_afl.h:457
@ PEAK_AFL_STATUS_VALUE_ADJUSTED
Parameter value was adjusted.
Definition peak_afl.h:475
@ PEAK_AFL_STATUS_ACCESS_DENIED
Access denied to resource.
Definition peak_afl.h:427
@ PEAK_AFL_STATUS_BUSY
Resource is busy.
Definition peak_afl.h:437
@ PEAK_AFL_STATUS_NOT_SUPPORTED
Feature or operation not supported.
Definition peak_afl.h:465
@ PEAK_AFL_STATUS_INVALID_PARAMETER
Invalid parameter provided.
Definition peak_afl.h:419
@ PEAK_AFL_STATUS_BUFFER_TOO_SMALL
Provided buffer is too small.
Definition peak_afl.h:447
@ PEAK_AFL_STATUS_NOT_INITIALIZED
Library not initialized.
Definition peak_afl.h:409
@ PEAK_AFL_STATUS_ERROR
General error occurred.
Definition peak_afl.h:399
@ PEAK_AFL_CONTROLLER_STATUS_SKIPPED
Controller skipped processing this frame.
Definition peak_afl.h:677
@ PEAK_AFL_CONTROLLER_STATUS_OFF
Controller is disabled or inactive.
Definition peak_afl.h:603
@ PEAK_AFL_CONTROLLER_STATUS_ERROR
Controller encountered an error.
Definition peak_afl.h:664
@ PEAK_AFL_CONTROLLER_STATUS_UNDEFINED
Controller status undefined.
Definition peak_afl.h:591
@ PEAK_AFL_CONTROLLER_STATUS_FINISHED
Controller completed its operation successfully.
Definition peak_afl.h:627
@ PEAK_AFL_CONTROLLER_STATUS_BUSY
Controller is busy and cannot accept new requests.
Definition peak_afl.h:639
@ PEAK_AFL_CONTROLLER_STATUS_IN_PROGRESS
Controller is actively processing.
Definition peak_afl.h:615
@ PEAK_AFL_CONTROLLER_STATUS_CANCELED
Controller operation was canceled.
Definition peak_afl.h:651
uint8_t peak_afl_BOOL8
Custom 8-bit boolean type.
Definition peak_afl.h:1628
PEAK_AFL_API_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.
PEAK_AFL_API_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.
PEAK_AFL_API_STATUS peak_afl_AutoController_Weighted_ROI_Min_Size(peak_afl_controller_handle controller, peak_afl_size *size)
Get the autofeature minimum size for the weighted region of interest for a controller.
PEAK_AFL_API_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.
peak_afl_roi_weight
ROI weight values for focus control.
Definition peak_afl.h:1038
@ PEAK_AFL_CONTROLLER_ROI_WEIGHT_WEAK
Low importance weight.
Definition peak_afl.h:1045
@ PEAK_AFL_CONTROLLER_ROI_WEIGHT_STRONG
High importance weight.
Definition peak_afl.h:1061
@ PEAK_AFL_CONTROLLER_ROI_WEIGHT_MEDIUM
Medium importance weight.
Definition peak_afl.h:1053
peak_afl_controller_whitebalance_component
White balance control components.
Definition peak_afl.h:971
PEAK_AFL_API_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.
@ PEAK_AFL_CONTROLLER_WHITEBALANCE_COMPONENT_COMBINED_GAIN
Combined analog and digital gain control (combined)
Definition peak_afl.h:1011
@ PEAK_AFL_CONTROLLER_WHITEBALANCE_COMPONENT_DIGITAL_GAIN
Digital gain white balance control.
Definition peak_afl.h:1000
@ PEAK_AFL_CONTROLLER_WHITEBALANCE_COMPONENT_INVALID
Invalid or uninitialized component.
Definition peak_afl.h:978
@ PEAK_AFL_CONTROLLER_WHITEBALANCE_COMPONENT_ANALOG_GAIN
Analog gain white balance control.
Definition peak_afl.h:989
@ PEAK_AFL_CONTROLLER_WHITEBALANCE_COMPONENT_HOST_GAIN
Host-based software white balance.
Definition peak_afl.h:1022
void * peak_afl_controller_handle
Opaque handle for auto feature controllers.
Definition peak_afl.h:357
void * peak_afl_manager_handle
Opaque handle for auto feature managers.
Definition peak_afl.h:369
Controller parameter limit range.
Definition peak_afl.h:1569
int min
Minimum allowed value.
Definition peak_afl.h:1576
int max
Maximum allowed value.
Definition peak_afl.h:1584
Floating-point parameter limit range.
Definition peak_afl.h:1599
double max
Maximum allowed value.
Definition peak_afl.h:1614
double min
Minimum allowed value.
Definition peak_afl.h:1606
2D position structure
Definition peak_afl.h:1466
uint32_t y
Y-coordinate (vertical position)
Definition peak_afl.h:1481
uint32_t x
X-coordinate (horizontal position)
Definition peak_afl.h:1473
Brightness controller process data.
Definition peak_afl.h:1175
int mean
Calculated mean brightness value.
Definition peak_afl.h:1212
char reserved[64]
Reserved space for future extensions.
Definition peak_afl.h:1219
peak_afl_controller_brightness_component controller_component
Current brightness component being processed.
Definition peak_afl.h:1202
peak_afl_controller_status controller_status
Current controller status.
Definition peak_afl.h:1183
peak_afl_controllerType controller_type
Controller type (always BRIGHTNESS)
Definition peak_afl.h:1192
Focus controller process data.
Definition peak_afl.h:1312
int focus_value
Current focus position.
Definition peak_afl.h:1338
char reserved[64]
Reserved space for future extensions.
Definition peak_afl.h:1356
peak_afl_controller_status controller_status
Current controller status.
Definition peak_afl.h:1320
peak_afl_controllerType controller_type
Controller type (always AUTOFOCUS)
Definition peak_afl.h:1329
int sharpness_value
Current sharpness measurement.
Definition peak_afl.h:1349
White balance controller process data.
Definition peak_afl.h:1237
char reserved[64 - sizeof(peak_afl_controller_whitebalance_component)]
Reserved space for future extensions.
Definition peak_afl.h:1295
int mean_g
Calculated mean green channel value.
Definition peak_afl.h:1270
int mean_b
Calculated mean blue channel value.
Definition peak_afl.h:1278
peak_afl_controller_status controller_status
Current controller status.
Definition peak_afl.h:1245
peak_afl_controller_whitebalance_component controller_component
Current white balance component being processed.
Definition peak_afl.h:1288
int mean_r
Calculated mean red channel value.
Definition peak_afl.h:1262
peak_afl_controllerType controller_type
Controller type (always WHITE_BALANCE)
Definition peak_afl.h:1254
Generic process data structure.
Definition peak_afl.h:1129
char reserved[32]
Reserved space for future extensions.
Definition peak_afl.h:1157
peak_afl_controller_status controller_status
Current controller status.
Definition peak_afl.h:1139
peak_afl_controllerType controller_type
Type of controller generating this data.
Definition peak_afl.h:1150
2D rectangle structure
Definition peak_afl.h:1497
uint32_t width
Width of rectangle in pixels.
Definition peak_afl.h:1517
uint32_t height
Height of rectangle in pixels.
Definition peak_afl.h:1524
uint32_t y
Y-coordinate of top-left corner.
Definition peak_afl.h:1510
uint32_t x
X-coordinate of top-left corner.
Definition peak_afl.h:1503
2D size structure
Definition peak_afl.h:1435
uint32_t width
Width dimension in pixels.
Definition peak_afl.h:1443
uint32_t height
Height dimension in pixels.
Definition peak_afl.h:1452
Weighted region of interest for focus control.
Definition peak_afl.h:1539
peak_afl_roi_weight weight
Weight of this region.
Definition peak_afl.h:1554
peak_afl_rectangle roi
Rectangular region definition.
Definition peak_afl.h:1546