5 # ifndef PEAK_AFL_NO_DECLSPEC_STATEMENTS 6 # ifdef PEAK_AFL_EXPORTING 7 # define PEAK_AFL_EXPORT __declspec(dllexport) 9 # define PEAK_AFL_EXPORT __declspec(dllimport) 12 # define PEAK_AFL_EXPORT 14 # if defined(_M_IX86) || defined(__i386__) 15 # define PEAK_AFL_CALLCONV __cdecl 17 # define PEAK_AFL_CALLCONV 19 #elif defined(__linux__) 20 # define PEAK_AFL_EXPORT 21 # define PEAK_AFL_CALLCONV 23 # error Platform is not supported yet! 36 #include <peak_ipl/backend/peak_ipl_backend.h> 37 #include <peak/backend/peak_backend.h> 40 typedef void* peak_afl_controller_handle;
42 typedef void* peak_afl_manager_handle;
44 #define PEAK_AFL_VERSION_CODE(major, minor, subminor, patch) (((major) << 24) + ((minor) << 16) + ((subminor) << 8) + (patch)) 45 #define PEAK_AFL_API_STATUS PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 239 typedef void(PEAK_AFL_CALLCONV* PEAK_AFL_CALLBACK_FINISHED_FUNC)(
void*);
242 typedef void(PEAK_AFL_CALLCONV* PEAK_AFL_CALLBACK_PROCESSING_DATA_FUNC)(int, int,
void*);
344 typedef uint8_t peak_afl_BOOL8;
347 #define PEAK_AFL_TRUE 1 350 #define PEAK_AFL_FALSE 0 426 uint32_t* majorVersion, uint32_t* minorVersion, uint32_t* subminorVersion, uint32_t* patchVersion);
495 peak_afl_manager_handle handle, peak_afl_manager_handle controller);
532 peak_afl_manager_handle handle, peak_afl_controller_handle* controller,
peak_afl_controllerType controllerType);
564 peak_afl_manager_handle handle, peak_afl_controller_handle controller);
624 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
676 peak_afl_controller_handle controller, uint32_t* min, uint32_t* max, uint32_t* inc);
743 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
861 peak_afl_controller_handle controller, uint8_t* averageRed, uint8_t* averageGreen, uint8_t* averageBlue);
878 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
932 peak_afl_controller_handle controller, uint32_t* min, uint32_t* max, uint32_t* inc);
949 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
1002 peak_afl_controller_handle controller, uint32_t* min, uint32_t* max, uint32_t* inc);
1019 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
1073 peak_afl_controller_handle controller,
double* min,
double* max,
double* inc);
1108 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
1126 peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm);
1142 peak_afl_controller_handle controller, peak_afl_controller_algorithm* algorithm);
1168 peak_afl_controller_handle controller, peak_afl_controller_algorithm* typeList, uint32_t* listSize);
1187 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
1205 peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm algorithm);
1221 peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm* algorithm);
1246 peak_afl_controller_handle controller, peak_afl_controller_sharpness_algorithm* typeList, uint32_t* listSize);
1271 peak_afl_controller_handle controller, peak_afl_callback_type type,
void* funcPtr,
void* context);
1288 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
1428 peak_afl_controller_handle controller, peak_afl_BOOL8* supported);
1493 peak_afl_controller_handle controller, uint8_t* min, uint8_t* max, uint8_t* inc);
1497 #endif // __cplusplus uint32_t width
Width.
Definition: peak_afl.h:265
Controller algorithm global search.
Definition: peak_afl.h:181
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoTarget_Get(peak_afl_controller_handle controller, uint32_t *target)
Get the currently set auto target for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Mode_Set(peak_afl_controller_handle controller, peak_afl_controller_automode mode)
Set the autofeature mode for a controller.
Automode off.
Definition: peak_afl.h:128
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
Set the autofeature hysteresis for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Mode_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if auto mode is supported for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature default limit.
Controller sharpness algorithm auto.
Definition: peak_afl.h:194
Controller status canceled.
Definition: peak_afl.h:159
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_controller_sharpness_algorithm
controller sharpness algorithm (focus)
Definition: peak_afl.h:191
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoTolerance_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check if auto tolerance is supported for a controller.
int min
Minimum.
Definition: peak_afl.h:337
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle *handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
Create an automanager instance.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Algorithm_Get(peak_afl_controller_handle controller, peak_afl_controller_algorithm *algorithm)
Get the used algorithm for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
Library not Initialized.
Definition: peak_afl.h:87
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
Get the status of a manager.
uint32_t height
Height.
Definition: peak_afl.h:268
peak_afl_status
peak_afl Status codes
Definition: peak_afl.h:78
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
Set the auto tolerance for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
Set the auto percentile for a controller.
peak_afl Size (2D)
Definition: peak_afl.h:262
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_rectangle roi
Roi.
Definition: peak_afl.h:321
Error.
Definition: peak_afl.h:84
Controller status busy.
Definition: peak_afl.h:156
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
uint32_t width
Width.
Definition: peak_afl.h:305
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle)
Destroy an automanager instance.
Controller sharpness algorithm histogram variance.
Definition: peak_afl.h:206
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t *average)
Get the last auto average for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
Invalid image format.
Definition: peak_afl.h:102
peak_afl Rectangle (2D)
Definition: peak_afl.h:296
Controller algorithm hill climbing search.
Definition: peak_afl.h:178
peak_afl Position (2D)
Definition: peak_afl.h:279
Controller sharpness algorithm mean score.
Definition: peak_afl.h:203
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType *type)
Get the controller type.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double *percentile)
Get the auto percentile for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
Controller status in progress.
Definition: peak_afl.h:150
uint32_t x
X-Position.
Definition: peak_afl.h:299
peak_afl Focus Limit
Definition: peak_afl.h:334
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_SharpnessAlgorithm_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
check setting a sharpness algorithm is supported by a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t *tolerance)
Get the current auto tolerance for a controller.
Automode continuous.
Definition: peak_afl.h:131
Automode once.
Definition: peak_afl.h:134
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Limit_Set(peak_afl_controller_handle controller, peak_afl_controller_limit limit)
Set the autofeature limit for a controller.
peak_afl_roi_preset
controller roi preset
Definition: peak_afl.h:248
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis default.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
Controller roi weight middle.
Definition: peak_afl.h:219
peak_afl_controller_automode
controller automode
Definition: peak_afl.h:125
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Limit_Get(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature limit for a controller.
Success.
Definition: peak_afl.h:81
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
uint32_t height
Height.
Definition: peak_afl.h:308
Autofocus Controller.
Definition: peak_afl.h:118
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Create(peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a new controller.
Controller roi weight weak.
Definition: peak_afl.h:216
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle)
Destroy all controllers for a manager.
Controller status off.
Definition: peak_afl.h:147
peak_afl_roi_weight weight
Weight.
Definition: peak_afl.h:324
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status *status)
Get the status for a controller.
peak_afl_controller_algorithm
controller algorithm
Definition: peak_afl.h:169
uint32_t y
Y-Position.
Definition: peak_afl.h:302
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Mode_Get(peak_afl_controller_handle controller, peak_afl_controller_automode *mode)
Get the current autofeature mode for a controller.
int max
Maximum.
Definition: peak_afl.h:340
Not supported.
Definition: peak_afl.h:105
Controller callback type processing data.
Definition: peak_afl.h:235
uint32_t y
Y-Position.
Definition: peak_afl.h:285
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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_roi_weight
controller roi weight (focus)
Definition: peak_afl.h:213
controller roi preset center
Definition: peak_afl.h:251
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_ROI_Preset_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if ROI preset is supported for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_GetVersion(uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
Query the library version.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_Init(void)
Init the peak_afl auto feature library.
Controller roi weight strong.
Definition: peak_afl.h:222
Controller algorithm full scan.
Definition: peak_afl.h:184
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Destroy a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
Destroy a controller. Will fail if it is queued inside a manager.
Access Denied.
Definition: peak_afl.h:93
uint32_t x
X-Position.
Definition: peak_afl.h:282
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_SkipFrames_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if skip frames is supported for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
Buffer too small.
Definition: peak_afl.h:99
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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. ...
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_Exit(void)
Exit the peak_afl auto feature library.
Controller algorithm golden ratio search.
Definition: peak_afl.h:175
peak_afl Focus Rectangle
Definition: peak_afl.h:318
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
Set the auto target for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Limit_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if limit is supported for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_GetLastError(peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
Get the last error message.
Controller status error.
Definition: peak_afl.h:162
Invalid Parameter.
Definition: peak_afl.h:90
Controller status undefined.
Definition: peak_afl.h:144
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
peak_afl_controller_status
controller status
Definition: peak_afl.h:141
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t *count)
Get number of frames skipped for a controller.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_ROI_Set(peak_afl_controller_handle controller, peak_afl_rectangle roi)
Set the autofeature region of interest for a controller.
Controller algorithm auto.
Definition: peak_afl.h:172
Busy.
Definition: peak_afl.h:96
Controller status finished.
Definition: peak_afl.h:153
Controller sharpness algorithm sobel.
Definition: peak_afl.h:200
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
Set number of frames skipped for a controller.
peak_afl_controllerType
controller types
Definition: peak_afl.h:112
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV 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.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Process an image.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_ROI_Get(peak_afl_controller_handle controller, peak_afl_rectangle *roi)
Get the autofeature region of interest for a controller.
Controller callback type finished.
Definition: peak_afl.h:232
Invalid controller.
Definition: peak_afl.h:115
Controller sharpness algorithm tenengrad.
Definition: peak_afl.h:197
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_AddController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Add a controller to an automanager instance.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Remove a controller to an automanager instance.
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Algorithm_Set(peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm)
Set the used algorithm for a controller.
peak_afl_callback_type
controller callback type
Definition: peak_afl.h:229
PEAK_AFL_EXPORT peak_afl_status PEAK_AFL_CALLCONV peak_afl_AutoController_Hysteresis_IsSupported(peak_afl_controller_handle controller, peak_afl_BOOL8 *supported)
Check if hysteresis is supported for a controller.