26 #undef PEAK_AFL_EXPORT 27 #define PEAK_AFL_EXPORT 28 #undef PEAK_AFL_CALLCONV 29 #define PEAK_AFL_CALLCONV 39 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_Init)(void );
40 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_Exit)(void );
41 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_GetLastError)(
peak_afl_status * lastErrorCode,
char * lastErrorMessage,
size_t * lastErrorMessageSize);
42 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_GetVersion)(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion);
43 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Create)(
peak_afl_manager_handle * handle, PEAK_NODE_MAP_HANDLE nodeMapHandle);
47 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_Process)(
peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle);
49 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoFeatureManager_DestroyAllController)(
peak_afl_manager_handle handle);
55 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_Set)(
peak_afl_controller_handle controller, uint32_t count);
56 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_Get)(
peak_afl_controller_handle controller, uint32_t * count);
57 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_SkipFrames_GetRange)(
peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
67 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GetLastAutoAverage)(
peak_afl_controller_handle controller, uint8_t * average);
68 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_GetLastAutoAverages)(
peak_afl_controller_handle controller, uint8_t * averageRed, uint8_t * averageGreen, uint8_t * averageBlue);
70 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_Set)(
peak_afl_controller_handle controller, uint32_t target);
71 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_Get)(
peak_afl_controller_handle controller, uint32_t * target);
72 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTarget_GetRange)(
peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
74 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_Set)(
peak_afl_controller_handle controller, uint32_t tolerance);
75 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_Get)(
peak_afl_controller_handle controller, uint32_t * tolerance);
76 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoTolerance_GetRange)(
peak_afl_controller_handle controller, uint32_t * min, uint32_t * max, uint32_t * inc);
78 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_Set)(
peak_afl_controller_handle controller,
double percentile);
79 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_Get)(
peak_afl_controller_handle controller,
double * percentile);
80 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_AutoPercentile_GetRange)(
peak_afl_controller_handle controller,
double * min,
double * max,
double * inc);
100 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Default)(
peak_afl_controller_handle controller, uint8_t * hysteresis);
101 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Set)(
peak_afl_controller_handle controller, uint8_t hysteresis);
102 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_Get)(
peak_afl_controller_handle controller, uint8_t * hysteresis);
103 typedef PEAK_AFL_API_STATUS (*dyn_peak_afl_AutoController_Hysteresis_GetRange)(
peak_afl_controller_handle controller, uint8_t * min, uint8_t * max, uint8_t * inc);
111 static DynamicLoader& instance()
113 static DynamicLoader dynamicLoader{};
114 return dynamicLoader;
116 bool loadLib(
const char* file);
118 bool setPointers(
bool load);
123 static bool isLoaded();
128 static PEAK_AFL_API_STATUS
peak_afl_GetVersion(uint32_t * majorVersion, uint32_t * minorVersion, uint32_t * subminorVersion, uint32_t * patchVersion);
192 void* m_handle =
nullptr;
193 dyn_peak_afl_Init m_peak_afl_Init{};
194 dyn_peak_afl_Exit m_peak_afl_Exit{};
195 dyn_peak_afl_GetLastError m_peak_afl_GetLastError{};
196 dyn_peak_afl_GetVersion m_peak_afl_GetVersion{};
197 dyn_peak_afl_AutoFeatureManager_Create m_peak_afl_AutoFeatureManager_Create{};
198 dyn_peak_afl_AutoFeatureManager_Destroy m_peak_afl_AutoFeatureManager_Destroy{};
199 dyn_peak_afl_AutoFeatureManager_AddController m_peak_afl_AutoFeatureManager_AddController{};
200 dyn_peak_afl_AutoFeatureManager_RemoveController m_peak_afl_AutoFeatureManager_RemoveController{};
201 dyn_peak_afl_AutoFeatureManager_Process m_peak_afl_AutoFeatureManager_Process{};
202 dyn_peak_afl_AutoFeatureManager_CreateController m_peak_afl_AutoFeatureManager_CreateController{};
203 dyn_peak_afl_AutoFeatureManager_DestroyAllController m_peak_afl_AutoFeatureManager_DestroyAllController{};
204 dyn_peak_afl_AutoFeatureManager_DestroyController m_peak_afl_AutoFeatureManager_DestroyController{};
205 dyn_peak_afl_AutoFeatureManager_Status m_peak_afl_AutoFeatureManager_Status{};
206 dyn_peak_afl_AutoController_Create m_peak_afl_AutoController_Create{};
207 dyn_peak_afl_AutoController_Destroy m_peak_afl_AutoController_Destroy{};
208 dyn_peak_afl_AutoController_SkipFrames_IsSupported m_peak_afl_AutoController_SkipFrames_IsSupported{};
209 dyn_peak_afl_AutoController_SkipFrames_Set m_peak_afl_AutoController_SkipFrames_Set{};
210 dyn_peak_afl_AutoController_SkipFrames_Get m_peak_afl_AutoController_SkipFrames_Get{};
211 dyn_peak_afl_AutoController_SkipFrames_GetRange m_peak_afl_AutoController_SkipFrames_GetRange{};
212 dyn_peak_afl_AutoController_ROI_IsSupported m_peak_afl_AutoController_ROI_IsSupported{};
213 dyn_peak_afl_AutoController_ROI_Set m_peak_afl_AutoController_ROI_Set{};
214 dyn_peak_afl_AutoController_ROI_Get m_peak_afl_AutoController_ROI_Get{};
215 dyn_peak_afl_AutoController_ROI_Preset_IsSupported m_peak_afl_AutoController_ROI_Preset_IsSupported{};
216 dyn_peak_afl_AutoController_ROI_Preset_Set m_peak_afl_AutoController_ROI_Preset_Set{};
217 dyn_peak_afl_AutoController_Mode_IsSupported m_peak_afl_AutoController_Mode_IsSupported{};
218 dyn_peak_afl_AutoController_Mode_Set m_peak_afl_AutoController_Mode_Set{};
219 dyn_peak_afl_AutoController_Mode_Get m_peak_afl_AutoController_Mode_Get{};
220 dyn_peak_afl_AutoController_Status m_peak_afl_AutoController_Status{};
221 dyn_peak_afl_AutoController_GetLastAutoAverage m_peak_afl_AutoController_GetLastAutoAverage{};
222 dyn_peak_afl_AutoController_GetLastAutoAverages m_peak_afl_AutoController_GetLastAutoAverages{};
223 dyn_peak_afl_AutoController_AutoTarget_IsSupported m_peak_afl_AutoController_AutoTarget_IsSupported{};
224 dyn_peak_afl_AutoController_AutoTarget_Set m_peak_afl_AutoController_AutoTarget_Set{};
225 dyn_peak_afl_AutoController_AutoTarget_Get m_peak_afl_AutoController_AutoTarget_Get{};
226 dyn_peak_afl_AutoController_AutoTarget_GetRange m_peak_afl_AutoController_AutoTarget_GetRange{};
227 dyn_peak_afl_AutoController_AutoTolerance_IsSupported m_peak_afl_AutoController_AutoTolerance_IsSupported{};
228 dyn_peak_afl_AutoController_AutoTolerance_Set m_peak_afl_AutoController_AutoTolerance_Set{};
229 dyn_peak_afl_AutoController_AutoTolerance_Get m_peak_afl_AutoController_AutoTolerance_Get{};
230 dyn_peak_afl_AutoController_AutoTolerance_GetRange m_peak_afl_AutoController_AutoTolerance_GetRange{};
231 dyn_peak_afl_AutoController_AutoPercentile_IsSupported m_peak_afl_AutoController_AutoPercentile_IsSupported{};
232 dyn_peak_afl_AutoController_AutoPercentile_Set m_peak_afl_AutoController_AutoPercentile_Set{};
233 dyn_peak_afl_AutoController_AutoPercentile_Get m_peak_afl_AutoController_AutoPercentile_Get{};
234 dyn_peak_afl_AutoController_AutoPercentile_GetRange m_peak_afl_AutoController_AutoPercentile_GetRange{};
235 dyn_peak_afl_AutoController_Type_Get m_peak_afl_AutoController_Type_Get{};
236 dyn_peak_afl_AutoController_Algorithm_IsSupported m_peak_afl_AutoController_Algorithm_IsSupported{};
237 dyn_peak_afl_AutoController_Algorithm_Set m_peak_afl_AutoController_Algorithm_Set{};
238 dyn_peak_afl_AutoController_Algorithm_Get m_peak_afl_AutoController_Algorithm_Get{};
239 dyn_peak_afl_AutoController_Algorithm_GetList m_peak_afl_AutoController_Algorithm_GetList{};
240 dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported{};
241 dyn_peak_afl_AutoController_SharpnessAlgorithm_Set m_peak_afl_AutoController_SharpnessAlgorithm_Set{};
242 dyn_peak_afl_AutoController_SharpnessAlgorithm_Get m_peak_afl_AutoController_SharpnessAlgorithm_Get{};
243 dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList m_peak_afl_AutoController_SharpnessAlgorithm_GetList{};
244 dyn_peak_afl_AutoController_Callback_Set m_peak_afl_AutoController_Callback_Set{};
245 dyn_peak_afl_AutoController_Weighted_ROI_IsSupported m_peak_afl_AutoController_Weighted_ROI_IsSupported{};
246 dyn_peak_afl_AutoController_Weighted_ROI_Min_Size m_peak_afl_AutoController_Weighted_ROI_Min_Size{};
247 dyn_peak_afl_AutoController_Weighted_ROI_Set m_peak_afl_AutoController_Weighted_ROI_Set{};
248 dyn_peak_afl_AutoController_Weighted_ROI_Get m_peak_afl_AutoController_Weighted_ROI_Get{};
249 dyn_peak_afl_AutoController_Limit_IsSupported m_peak_afl_AutoController_Limit_IsSupported{};
250 dyn_peak_afl_AutoController_Limit_Default m_peak_afl_AutoController_Limit_Default{};
251 dyn_peak_afl_AutoController_Limit_Set m_peak_afl_AutoController_Limit_Set{};
252 dyn_peak_afl_AutoController_Limit_Get m_peak_afl_AutoController_Limit_Get{};
253 dyn_peak_afl_AutoController_Hysteresis_IsSupported m_peak_afl_AutoController_Hysteresis_IsSupported{};
254 dyn_peak_afl_AutoController_Hysteresis_Default m_peak_afl_AutoController_Hysteresis_Default{};
255 dyn_peak_afl_AutoController_Hysteresis_Set m_peak_afl_AutoController_Hysteresis_Set{};
256 dyn_peak_afl_AutoController_Hysteresis_Get m_peak_afl_AutoController_Hysteresis_Get{};
257 dyn_peak_afl_AutoController_Hysteresis_GetRange m_peak_afl_AutoController_Hysteresis_GetRange{};
261 inline void* import_function(
void *module,
const char* proc_name)
264 return dlsym(module, proc_name);
266 return GetProcAddress(static_cast<HMODULE>(module), proc_name);
270 inline DynamicLoader::DynamicLoader()
272 #if defined _WIN32 || defined _WIN64 274 if (_wgetenv_s(&sz, NULL, 0, L
"aapienvvarrootpath") == 0
277 std::vector<wchar_t> env_peak_afl(sz);
278 if (_wgetenv_s(&sz, env_peak_afl.data(), sz, L
"aapienvvarrootpath") == 0)
280 if (_wgetenv_s(&sz, NULL, 0, L
"PATH") == 0
283 std::vector<wchar_t> env_path(sz);
284 if (_wgetenv_s(&sz, env_path.data(), sz, L
"PATH") == 0)
286 std::wstring peak_afl_path(env_peak_afl.data());
288 peak_afl_path.append(L
"\\aapi\\lib\\x86_64");
290 peak_afl_path.append(L
"\\aapi\\lib\\x86_32");
292 std::wstring path_var(env_path.data());
293 path_var.append(L
";").append(peak_afl_path);
294 _wputenv_s(L
"PATH", path_var.c_str());
300 loadLib(
"peak_afl.dll");
302 loadLib(
"libpeak_afl.so");
306 inline DynamicLoader::~DynamicLoader()
308 if(m_handle !=
nullptr)
314 inline bool DynamicLoader::isLoaded()
316 auto&& inst = instance();
317 return inst.m_handle !=
nullptr;
320 inline void DynamicLoader::unload()
324 if (m_handle !=
nullptr)
329 FreeLibrary(static_cast<HMODULE>(m_handle));
336 inline bool DynamicLoader::loadLib(
const char* file)
343 m_handle = dlopen(file, RTLD_NOW);
345 m_handle = LoadLibraryA(file);
347 if (m_handle !=
nullptr)
352 }
catch (
const std::exception&) {
359 throw std::runtime_error(std::string(
"Lib load failed: ") + file);
364 throw std::runtime_error(
"Filename empty");
370 inline bool DynamicLoader::setPointers(
bool load)
373 m_peak_afl_Init = (dyn_peak_afl_Init) (load ? import_function(m_handle,
"peak_afl_Init") :
nullptr);
374 if(m_peak_afl_Init ==
nullptr && load)
376 throw std::runtime_error(
"Failed to load peak_afl_Init");
379 m_peak_afl_Exit = (dyn_peak_afl_Exit) (load ? import_function(m_handle,
"peak_afl_Exit") :
nullptr);
380 if(m_peak_afl_Exit ==
nullptr && load)
382 throw std::runtime_error(
"Failed to load peak_afl_Exit");
385 m_peak_afl_GetLastError = (dyn_peak_afl_GetLastError) (load ? import_function(m_handle,
"peak_afl_GetLastError") :
nullptr);
386 if(m_peak_afl_GetLastError ==
nullptr && load)
388 throw std::runtime_error(
"Failed to load peak_afl_GetLastError");
391 m_peak_afl_GetVersion = (dyn_peak_afl_GetVersion) (load ? import_function(m_handle,
"peak_afl_GetVersion") :
nullptr);
392 if(m_peak_afl_GetVersion ==
nullptr && load)
394 throw std::runtime_error(
"Failed to load peak_afl_GetVersion");
397 m_peak_afl_AutoFeatureManager_Create = (dyn_peak_afl_AutoFeatureManager_Create) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_Create") :
nullptr);
398 if(m_peak_afl_AutoFeatureManager_Create ==
nullptr && load)
400 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_Create");
403 m_peak_afl_AutoFeatureManager_Destroy = (dyn_peak_afl_AutoFeatureManager_Destroy) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_Destroy") :
nullptr);
404 if(m_peak_afl_AutoFeatureManager_Destroy ==
nullptr && load)
406 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_Destroy");
409 m_peak_afl_AutoFeatureManager_AddController = (dyn_peak_afl_AutoFeatureManager_AddController) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_AddController") :
nullptr);
410 if(m_peak_afl_AutoFeatureManager_AddController ==
nullptr && load)
412 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_AddController");
415 m_peak_afl_AutoFeatureManager_RemoveController = (dyn_peak_afl_AutoFeatureManager_RemoveController) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_RemoveController") :
nullptr);
416 if(m_peak_afl_AutoFeatureManager_RemoveController ==
nullptr && load)
418 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_RemoveController");
421 m_peak_afl_AutoFeatureManager_Process = (dyn_peak_afl_AutoFeatureManager_Process) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_Process") :
nullptr);
422 if(m_peak_afl_AutoFeatureManager_Process ==
nullptr && load)
424 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_Process");
427 m_peak_afl_AutoFeatureManager_CreateController = (dyn_peak_afl_AutoFeatureManager_CreateController) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_CreateController") :
nullptr);
428 if(m_peak_afl_AutoFeatureManager_CreateController ==
nullptr && load)
430 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_CreateController");
433 m_peak_afl_AutoFeatureManager_DestroyAllController = (dyn_peak_afl_AutoFeatureManager_DestroyAllController) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_DestroyAllController") :
nullptr);
434 if(m_peak_afl_AutoFeatureManager_DestroyAllController ==
nullptr && load)
436 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_DestroyAllController");
439 m_peak_afl_AutoFeatureManager_DestroyController = (dyn_peak_afl_AutoFeatureManager_DestroyController) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_DestroyController") :
nullptr);
440 if(m_peak_afl_AutoFeatureManager_DestroyController ==
nullptr && load)
442 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_DestroyController");
445 m_peak_afl_AutoFeatureManager_Status = (dyn_peak_afl_AutoFeatureManager_Status) (load ? import_function(m_handle,
"peak_afl_AutoFeatureManager_Status") :
nullptr);
446 if(m_peak_afl_AutoFeatureManager_Status ==
nullptr && load)
448 throw std::runtime_error(
"Failed to load peak_afl_AutoFeatureManager_Status");
451 m_peak_afl_AutoController_Create = (dyn_peak_afl_AutoController_Create) (load ? import_function(m_handle,
"peak_afl_AutoController_Create") :
nullptr);
452 if(m_peak_afl_AutoController_Create ==
nullptr && load)
454 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Create");
457 m_peak_afl_AutoController_Destroy = (dyn_peak_afl_AutoController_Destroy) (load ? import_function(m_handle,
"peak_afl_AutoController_Destroy") :
nullptr);
458 if(m_peak_afl_AutoController_Destroy ==
nullptr && load)
460 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Destroy");
463 m_peak_afl_AutoController_SkipFrames_IsSupported = (dyn_peak_afl_AutoController_SkipFrames_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_SkipFrames_IsSupported") :
nullptr);
464 if(m_peak_afl_AutoController_SkipFrames_IsSupported ==
nullptr && load)
466 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SkipFrames_IsSupported");
469 m_peak_afl_AutoController_SkipFrames_Set = (dyn_peak_afl_AutoController_SkipFrames_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_SkipFrames_Set") :
nullptr);
470 if(m_peak_afl_AutoController_SkipFrames_Set ==
nullptr && load)
472 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SkipFrames_Set");
475 m_peak_afl_AutoController_SkipFrames_Get = (dyn_peak_afl_AutoController_SkipFrames_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_SkipFrames_Get") :
nullptr);
476 if(m_peak_afl_AutoController_SkipFrames_Get ==
nullptr && load)
478 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SkipFrames_Get");
481 m_peak_afl_AutoController_SkipFrames_GetRange = (dyn_peak_afl_AutoController_SkipFrames_GetRange) (load ? import_function(m_handle,
"peak_afl_AutoController_SkipFrames_GetRange") :
nullptr);
482 if(m_peak_afl_AutoController_SkipFrames_GetRange ==
nullptr && load)
484 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SkipFrames_GetRange");
487 m_peak_afl_AutoController_ROI_IsSupported = (dyn_peak_afl_AutoController_ROI_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_ROI_IsSupported") :
nullptr);
488 if(m_peak_afl_AutoController_ROI_IsSupported ==
nullptr && load)
490 throw std::runtime_error(
"Failed to load peak_afl_AutoController_ROI_IsSupported");
493 m_peak_afl_AutoController_ROI_Set = (dyn_peak_afl_AutoController_ROI_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_ROI_Set") :
nullptr);
494 if(m_peak_afl_AutoController_ROI_Set ==
nullptr && load)
496 throw std::runtime_error(
"Failed to load peak_afl_AutoController_ROI_Set");
499 m_peak_afl_AutoController_ROI_Get = (dyn_peak_afl_AutoController_ROI_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_ROI_Get") :
nullptr);
500 if(m_peak_afl_AutoController_ROI_Get ==
nullptr && load)
502 throw std::runtime_error(
"Failed to load peak_afl_AutoController_ROI_Get");
505 m_peak_afl_AutoController_ROI_Preset_IsSupported = (dyn_peak_afl_AutoController_ROI_Preset_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_ROI_Preset_IsSupported") :
nullptr);
506 if(m_peak_afl_AutoController_ROI_Preset_IsSupported ==
nullptr && load)
508 throw std::runtime_error(
"Failed to load peak_afl_AutoController_ROI_Preset_IsSupported");
511 m_peak_afl_AutoController_ROI_Preset_Set = (dyn_peak_afl_AutoController_ROI_Preset_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_ROI_Preset_Set") :
nullptr);
512 if(m_peak_afl_AutoController_ROI_Preset_Set ==
nullptr && load)
514 throw std::runtime_error(
"Failed to load peak_afl_AutoController_ROI_Preset_Set");
517 m_peak_afl_AutoController_Mode_IsSupported = (dyn_peak_afl_AutoController_Mode_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_Mode_IsSupported") :
nullptr);
518 if(m_peak_afl_AutoController_Mode_IsSupported ==
nullptr && load)
520 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Mode_IsSupported");
523 m_peak_afl_AutoController_Mode_Set = (dyn_peak_afl_AutoController_Mode_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_Mode_Set") :
nullptr);
524 if(m_peak_afl_AutoController_Mode_Set ==
nullptr && load)
526 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Mode_Set");
529 m_peak_afl_AutoController_Mode_Get = (dyn_peak_afl_AutoController_Mode_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_Mode_Get") :
nullptr);
530 if(m_peak_afl_AutoController_Mode_Get ==
nullptr && load)
532 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Mode_Get");
535 m_peak_afl_AutoController_Status = (dyn_peak_afl_AutoController_Status) (load ? import_function(m_handle,
"peak_afl_AutoController_Status") :
nullptr);
536 if(m_peak_afl_AutoController_Status ==
nullptr && load)
538 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Status");
541 m_peak_afl_AutoController_GetLastAutoAverage = (dyn_peak_afl_AutoController_GetLastAutoAverage) (load ? import_function(m_handle,
"peak_afl_AutoController_GetLastAutoAverage") :
nullptr);
542 if(m_peak_afl_AutoController_GetLastAutoAverage ==
nullptr && load)
544 throw std::runtime_error(
"Failed to load peak_afl_AutoController_GetLastAutoAverage");
547 m_peak_afl_AutoController_GetLastAutoAverages = (dyn_peak_afl_AutoController_GetLastAutoAverages) (load ? import_function(m_handle,
"peak_afl_AutoController_GetLastAutoAverages") :
nullptr);
548 if(m_peak_afl_AutoController_GetLastAutoAverages ==
nullptr && load)
550 throw std::runtime_error(
"Failed to load peak_afl_AutoController_GetLastAutoAverages");
553 m_peak_afl_AutoController_AutoTarget_IsSupported = (dyn_peak_afl_AutoController_AutoTarget_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTarget_IsSupported") :
nullptr);
554 if(m_peak_afl_AutoController_AutoTarget_IsSupported ==
nullptr && load)
556 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTarget_IsSupported");
559 m_peak_afl_AutoController_AutoTarget_Set = (dyn_peak_afl_AutoController_AutoTarget_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTarget_Set") :
nullptr);
560 if(m_peak_afl_AutoController_AutoTarget_Set ==
nullptr && load)
562 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTarget_Set");
565 m_peak_afl_AutoController_AutoTarget_Get = (dyn_peak_afl_AutoController_AutoTarget_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTarget_Get") :
nullptr);
566 if(m_peak_afl_AutoController_AutoTarget_Get ==
nullptr && load)
568 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTarget_Get");
571 m_peak_afl_AutoController_AutoTarget_GetRange = (dyn_peak_afl_AutoController_AutoTarget_GetRange) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTarget_GetRange") :
nullptr);
572 if(m_peak_afl_AutoController_AutoTarget_GetRange ==
nullptr && load)
574 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTarget_GetRange");
577 m_peak_afl_AutoController_AutoTolerance_IsSupported = (dyn_peak_afl_AutoController_AutoTolerance_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTolerance_IsSupported") :
nullptr);
578 if(m_peak_afl_AutoController_AutoTolerance_IsSupported ==
nullptr && load)
580 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTolerance_IsSupported");
583 m_peak_afl_AutoController_AutoTolerance_Set = (dyn_peak_afl_AutoController_AutoTolerance_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTolerance_Set") :
nullptr);
584 if(m_peak_afl_AutoController_AutoTolerance_Set ==
nullptr && load)
586 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTolerance_Set");
589 m_peak_afl_AutoController_AutoTolerance_Get = (dyn_peak_afl_AutoController_AutoTolerance_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTolerance_Get") :
nullptr);
590 if(m_peak_afl_AutoController_AutoTolerance_Get ==
nullptr && load)
592 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTolerance_Get");
595 m_peak_afl_AutoController_AutoTolerance_GetRange = (dyn_peak_afl_AutoController_AutoTolerance_GetRange) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoTolerance_GetRange") :
nullptr);
596 if(m_peak_afl_AutoController_AutoTolerance_GetRange ==
nullptr && load)
598 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoTolerance_GetRange");
601 m_peak_afl_AutoController_AutoPercentile_IsSupported = (dyn_peak_afl_AutoController_AutoPercentile_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoPercentile_IsSupported") :
nullptr);
602 if(m_peak_afl_AutoController_AutoPercentile_IsSupported ==
nullptr && load)
604 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoPercentile_IsSupported");
607 m_peak_afl_AutoController_AutoPercentile_Set = (dyn_peak_afl_AutoController_AutoPercentile_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoPercentile_Set") :
nullptr);
608 if(m_peak_afl_AutoController_AutoPercentile_Set ==
nullptr && load)
610 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoPercentile_Set");
613 m_peak_afl_AutoController_AutoPercentile_Get = (dyn_peak_afl_AutoController_AutoPercentile_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoPercentile_Get") :
nullptr);
614 if(m_peak_afl_AutoController_AutoPercentile_Get ==
nullptr && load)
616 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoPercentile_Get");
619 m_peak_afl_AutoController_AutoPercentile_GetRange = (dyn_peak_afl_AutoController_AutoPercentile_GetRange) (load ? import_function(m_handle,
"peak_afl_AutoController_AutoPercentile_GetRange") :
nullptr);
620 if(m_peak_afl_AutoController_AutoPercentile_GetRange ==
nullptr && load)
622 throw std::runtime_error(
"Failed to load peak_afl_AutoController_AutoPercentile_GetRange");
625 m_peak_afl_AutoController_Type_Get = (dyn_peak_afl_AutoController_Type_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_Type_Get") :
nullptr);
626 if(m_peak_afl_AutoController_Type_Get ==
nullptr && load)
628 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Type_Get");
631 m_peak_afl_AutoController_Algorithm_IsSupported = (dyn_peak_afl_AutoController_Algorithm_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_Algorithm_IsSupported") :
nullptr);
632 if(m_peak_afl_AutoController_Algorithm_IsSupported ==
nullptr && load)
634 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Algorithm_IsSupported");
637 m_peak_afl_AutoController_Algorithm_Set = (dyn_peak_afl_AutoController_Algorithm_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_Algorithm_Set") :
nullptr);
638 if(m_peak_afl_AutoController_Algorithm_Set ==
nullptr && load)
640 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Algorithm_Set");
643 m_peak_afl_AutoController_Algorithm_Get = (dyn_peak_afl_AutoController_Algorithm_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_Algorithm_Get") :
nullptr);
644 if(m_peak_afl_AutoController_Algorithm_Get ==
nullptr && load)
646 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Algorithm_Get");
649 m_peak_afl_AutoController_Algorithm_GetList = (dyn_peak_afl_AutoController_Algorithm_GetList) (load ? import_function(m_handle,
"peak_afl_AutoController_Algorithm_GetList") :
nullptr);
650 if(m_peak_afl_AutoController_Algorithm_GetList ==
nullptr && load)
652 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Algorithm_GetList");
655 m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported = (dyn_peak_afl_AutoController_SharpnessAlgorithm_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_SharpnessAlgorithm_IsSupported") :
nullptr);
656 if(m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported ==
nullptr && load)
658 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SharpnessAlgorithm_IsSupported");
661 m_peak_afl_AutoController_SharpnessAlgorithm_Set = (dyn_peak_afl_AutoController_SharpnessAlgorithm_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_SharpnessAlgorithm_Set") :
nullptr);
662 if(m_peak_afl_AutoController_SharpnessAlgorithm_Set ==
nullptr && load)
664 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SharpnessAlgorithm_Set");
667 m_peak_afl_AutoController_SharpnessAlgorithm_Get = (dyn_peak_afl_AutoController_SharpnessAlgorithm_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_SharpnessAlgorithm_Get") :
nullptr);
668 if(m_peak_afl_AutoController_SharpnessAlgorithm_Get ==
nullptr && load)
670 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SharpnessAlgorithm_Get");
673 m_peak_afl_AutoController_SharpnessAlgorithm_GetList = (dyn_peak_afl_AutoController_SharpnessAlgorithm_GetList) (load ? import_function(m_handle,
"peak_afl_AutoController_SharpnessAlgorithm_GetList") :
nullptr);
674 if(m_peak_afl_AutoController_SharpnessAlgorithm_GetList ==
nullptr && load)
676 throw std::runtime_error(
"Failed to load peak_afl_AutoController_SharpnessAlgorithm_GetList");
679 m_peak_afl_AutoController_Callback_Set = (dyn_peak_afl_AutoController_Callback_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_Callback_Set") :
nullptr);
680 if(m_peak_afl_AutoController_Callback_Set ==
nullptr && load)
682 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Callback_Set");
685 m_peak_afl_AutoController_Weighted_ROI_IsSupported = (dyn_peak_afl_AutoController_Weighted_ROI_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_Weighted_ROI_IsSupported") :
nullptr);
686 if(m_peak_afl_AutoController_Weighted_ROI_IsSupported ==
nullptr && load)
688 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Weighted_ROI_IsSupported");
691 m_peak_afl_AutoController_Weighted_ROI_Min_Size = (dyn_peak_afl_AutoController_Weighted_ROI_Min_Size) (load ? import_function(m_handle,
"peak_afl_AutoController_Weighted_ROI_Min_Size") :
nullptr);
692 if(m_peak_afl_AutoController_Weighted_ROI_Min_Size ==
nullptr && load)
694 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Weighted_ROI_Min_Size");
697 m_peak_afl_AutoController_Weighted_ROI_Set = (dyn_peak_afl_AutoController_Weighted_ROI_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_Weighted_ROI_Set") :
nullptr);
698 if(m_peak_afl_AutoController_Weighted_ROI_Set ==
nullptr && load)
700 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Weighted_ROI_Set");
703 m_peak_afl_AutoController_Weighted_ROI_Get = (dyn_peak_afl_AutoController_Weighted_ROI_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_Weighted_ROI_Get") :
nullptr);
704 if(m_peak_afl_AutoController_Weighted_ROI_Get ==
nullptr && load)
706 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Weighted_ROI_Get");
709 m_peak_afl_AutoController_Limit_IsSupported = (dyn_peak_afl_AutoController_Limit_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_Limit_IsSupported") :
nullptr);
710 if(m_peak_afl_AutoController_Limit_IsSupported ==
nullptr && load)
712 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Limit_IsSupported");
715 m_peak_afl_AutoController_Limit_Default = (dyn_peak_afl_AutoController_Limit_Default) (load ? import_function(m_handle,
"peak_afl_AutoController_Limit_Default") :
nullptr);
716 if(m_peak_afl_AutoController_Limit_Default ==
nullptr && load)
718 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Limit_Default");
721 m_peak_afl_AutoController_Limit_Set = (dyn_peak_afl_AutoController_Limit_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_Limit_Set") :
nullptr);
722 if(m_peak_afl_AutoController_Limit_Set ==
nullptr && load)
724 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Limit_Set");
727 m_peak_afl_AutoController_Limit_Get = (dyn_peak_afl_AutoController_Limit_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_Limit_Get") :
nullptr);
728 if(m_peak_afl_AutoController_Limit_Get ==
nullptr && load)
730 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Limit_Get");
733 m_peak_afl_AutoController_Hysteresis_IsSupported = (dyn_peak_afl_AutoController_Hysteresis_IsSupported) (load ? import_function(m_handle,
"peak_afl_AutoController_Hysteresis_IsSupported") :
nullptr);
734 if(m_peak_afl_AutoController_Hysteresis_IsSupported ==
nullptr && load)
736 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Hysteresis_IsSupported");
739 m_peak_afl_AutoController_Hysteresis_Default = (dyn_peak_afl_AutoController_Hysteresis_Default) (load ? import_function(m_handle,
"peak_afl_AutoController_Hysteresis_Default") :
nullptr);
740 if(m_peak_afl_AutoController_Hysteresis_Default ==
nullptr && load)
742 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Hysteresis_Default");
745 m_peak_afl_AutoController_Hysteresis_Set = (dyn_peak_afl_AutoController_Hysteresis_Set) (load ? import_function(m_handle,
"peak_afl_AutoController_Hysteresis_Set") :
nullptr);
746 if(m_peak_afl_AutoController_Hysteresis_Set ==
nullptr && load)
748 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Hysteresis_Set");
751 m_peak_afl_AutoController_Hysteresis_Get = (dyn_peak_afl_AutoController_Hysteresis_Get) (load ? import_function(m_handle,
"peak_afl_AutoController_Hysteresis_Get") :
nullptr);
752 if(m_peak_afl_AutoController_Hysteresis_Get ==
nullptr && load)
754 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Hysteresis_Get");
757 m_peak_afl_AutoController_Hysteresis_GetRange = (dyn_peak_afl_AutoController_Hysteresis_GetRange) (load ? import_function(m_handle,
"peak_afl_AutoController_Hysteresis_GetRange") :
nullptr);
758 if(m_peak_afl_AutoController_Hysteresis_GetRange ==
nullptr && load)
760 throw std::runtime_error(
"Failed to load peak_afl_AutoController_Hysteresis_GetRange");
769 auto& inst = instance();
770 if(inst.m_peak_afl_Init)
772 return inst.m_peak_afl_Init();
776 throw std::runtime_error(
"Library not loaded!");
782 auto& inst = instance();
783 if(inst.m_peak_afl_Exit)
785 return inst.m_peak_afl_Exit();
789 throw std::runtime_error(
"Library not loaded!");
795 auto& inst = instance();
796 if(inst.m_peak_afl_GetLastError)
798 return inst.m_peak_afl_GetLastError(lastErrorCode, lastErrorMessage, lastErrorMessageSize);
802 throw std::runtime_error(
"Library not loaded!");
808 auto& inst = instance();
809 if(inst.m_peak_afl_GetVersion)
811 return inst.m_peak_afl_GetVersion(majorVersion, minorVersion, subminorVersion, patchVersion);
815 throw std::runtime_error(
"Library not loaded!");
821 auto& inst = instance();
822 if(inst.m_peak_afl_AutoFeatureManager_Create)
824 return inst.m_peak_afl_AutoFeatureManager_Create(handle, nodeMapHandle);
828 throw std::runtime_error(
"Library not loaded!");
834 auto& inst = instance();
835 if(inst.m_peak_afl_AutoFeatureManager_Destroy)
837 return inst.m_peak_afl_AutoFeatureManager_Destroy(handle);
841 throw std::runtime_error(
"Library not loaded!");
847 auto& inst = instance();
848 if(inst.m_peak_afl_AutoFeatureManager_AddController)
850 return inst.m_peak_afl_AutoFeatureManager_AddController(handle, controller);
854 throw std::runtime_error(
"Library not loaded!");
860 auto& inst = instance();
861 if(inst.m_peak_afl_AutoFeatureManager_RemoveController)
863 return inst.m_peak_afl_AutoFeatureManager_RemoveController(handle, controller);
867 throw std::runtime_error(
"Library not loaded!");
873 auto& inst = instance();
874 if(inst.m_peak_afl_AutoFeatureManager_Process)
876 return inst.m_peak_afl_AutoFeatureManager_Process(handle, imageHandle);
880 throw std::runtime_error(
"Library not loaded!");
886 auto& inst = instance();
887 if(inst.m_peak_afl_AutoFeatureManager_CreateController)
889 return inst.m_peak_afl_AutoFeatureManager_CreateController(handle, controller, controllerType);
893 throw std::runtime_error(
"Library not loaded!");
899 auto& inst = instance();
900 if(inst.m_peak_afl_AutoFeatureManager_DestroyAllController)
902 return inst.m_peak_afl_AutoFeatureManager_DestroyAllController(handle);
906 throw std::runtime_error(
"Library not loaded!");
912 auto& inst = instance();
913 if(inst.m_peak_afl_AutoFeatureManager_DestroyController)
915 return inst.m_peak_afl_AutoFeatureManager_DestroyController(handle, controller);
919 throw std::runtime_error(
"Library not loaded!");
925 auto& inst = instance();
926 if(inst.m_peak_afl_AutoFeatureManager_Status)
928 return inst.m_peak_afl_AutoFeatureManager_Status(handle, running);
932 throw std::runtime_error(
"Library not loaded!");
938 auto& inst = instance();
939 if(inst.m_peak_afl_AutoController_Create)
941 return inst.m_peak_afl_AutoController_Create(controller, controllerType);
945 throw std::runtime_error(
"Library not loaded!");
951 auto& inst = instance();
952 if(inst.m_peak_afl_AutoController_Destroy)
954 return inst.m_peak_afl_AutoController_Destroy(controller);
958 throw std::runtime_error(
"Library not loaded!");
964 auto& inst = instance();
965 if(inst.m_peak_afl_AutoController_SkipFrames_IsSupported)
967 return inst.m_peak_afl_AutoController_SkipFrames_IsSupported(controller, supported);
971 throw std::runtime_error(
"Library not loaded!");
977 auto& inst = instance();
978 if(inst.m_peak_afl_AutoController_SkipFrames_Set)
980 return inst.m_peak_afl_AutoController_SkipFrames_Set(controller, count);
984 throw std::runtime_error(
"Library not loaded!");
990 auto& inst = instance();
991 if(inst.m_peak_afl_AutoController_SkipFrames_Get)
993 return inst.m_peak_afl_AutoController_SkipFrames_Get(controller, count);
997 throw std::runtime_error(
"Library not loaded!");
1003 auto& inst = instance();
1004 if(inst.m_peak_afl_AutoController_SkipFrames_GetRange)
1006 return inst.m_peak_afl_AutoController_SkipFrames_GetRange(controller, min, max, inc);
1010 throw std::runtime_error(
"Library not loaded!");
1016 auto& inst = instance();
1017 if(inst.m_peak_afl_AutoController_ROI_IsSupported)
1019 return inst.m_peak_afl_AutoController_ROI_IsSupported(controller, supported);
1023 throw std::runtime_error(
"Library not loaded!");
1029 auto& inst = instance();
1030 if(inst.m_peak_afl_AutoController_ROI_Set)
1032 return inst.m_peak_afl_AutoController_ROI_Set(controller, roi);
1036 throw std::runtime_error(
"Library not loaded!");
1042 auto& inst = instance();
1043 if(inst.m_peak_afl_AutoController_ROI_Get)
1045 return inst.m_peak_afl_AutoController_ROI_Get(controller, roi);
1049 throw std::runtime_error(
"Library not loaded!");
1055 auto& inst = instance();
1056 if(inst.m_peak_afl_AutoController_ROI_Preset_IsSupported)
1058 return inst.m_peak_afl_AutoController_ROI_Preset_IsSupported(controller, supported);
1062 throw std::runtime_error(
"Library not loaded!");
1068 auto& inst = instance();
1069 if(inst.m_peak_afl_AutoController_ROI_Preset_Set)
1071 return inst.m_peak_afl_AutoController_ROI_Preset_Set(controller, roiPreset);
1075 throw std::runtime_error(
"Library not loaded!");
1081 auto& inst = instance();
1082 if(inst.m_peak_afl_AutoController_Mode_IsSupported)
1084 return inst.m_peak_afl_AutoController_Mode_IsSupported(controller, supported);
1088 throw std::runtime_error(
"Library not loaded!");
1094 auto& inst = instance();
1095 if(inst.m_peak_afl_AutoController_Mode_Set)
1097 return inst.m_peak_afl_AutoController_Mode_Set(controller, mode);
1101 throw std::runtime_error(
"Library not loaded!");
1107 auto& inst = instance();
1108 if(inst.m_peak_afl_AutoController_Mode_Get)
1110 return inst.m_peak_afl_AutoController_Mode_Get(controller, mode);
1114 throw std::runtime_error(
"Library not loaded!");
1120 auto& inst = instance();
1121 if(inst.m_peak_afl_AutoController_Status)
1123 return inst.m_peak_afl_AutoController_Status(controller, status);
1127 throw std::runtime_error(
"Library not loaded!");
1133 auto& inst = instance();
1134 if(inst.m_peak_afl_AutoController_GetLastAutoAverage)
1136 return inst.m_peak_afl_AutoController_GetLastAutoAverage(controller, average);
1140 throw std::runtime_error(
"Library not loaded!");
1146 auto& inst = instance();
1147 if(inst.m_peak_afl_AutoController_GetLastAutoAverages)
1149 return inst.m_peak_afl_AutoController_GetLastAutoAverages(controller, averageRed, averageGreen, averageBlue);
1153 throw std::runtime_error(
"Library not loaded!");
1159 auto& inst = instance();
1160 if(inst.m_peak_afl_AutoController_AutoTarget_IsSupported)
1162 return inst.m_peak_afl_AutoController_AutoTarget_IsSupported(controller, supported);
1166 throw std::runtime_error(
"Library not loaded!");
1172 auto& inst = instance();
1173 if(inst.m_peak_afl_AutoController_AutoTarget_Set)
1175 return inst.m_peak_afl_AutoController_AutoTarget_Set(controller, target);
1179 throw std::runtime_error(
"Library not loaded!");
1185 auto& inst = instance();
1186 if(inst.m_peak_afl_AutoController_AutoTarget_Get)
1188 return inst.m_peak_afl_AutoController_AutoTarget_Get(controller, target);
1192 throw std::runtime_error(
"Library not loaded!");
1198 auto& inst = instance();
1199 if(inst.m_peak_afl_AutoController_AutoTarget_GetRange)
1201 return inst.m_peak_afl_AutoController_AutoTarget_GetRange(controller, min, max, inc);
1205 throw std::runtime_error(
"Library not loaded!");
1211 auto& inst = instance();
1212 if(inst.m_peak_afl_AutoController_AutoTolerance_IsSupported)
1214 return inst.m_peak_afl_AutoController_AutoTolerance_IsSupported(controller, supported);
1218 throw std::runtime_error(
"Library not loaded!");
1224 auto& inst = instance();
1225 if(inst.m_peak_afl_AutoController_AutoTolerance_Set)
1227 return inst.m_peak_afl_AutoController_AutoTolerance_Set(controller, tolerance);
1231 throw std::runtime_error(
"Library not loaded!");
1237 auto& inst = instance();
1238 if(inst.m_peak_afl_AutoController_AutoTolerance_Get)
1240 return inst.m_peak_afl_AutoController_AutoTolerance_Get(controller, tolerance);
1244 throw std::runtime_error(
"Library not loaded!");
1250 auto& inst = instance();
1251 if(inst.m_peak_afl_AutoController_AutoTolerance_GetRange)
1253 return inst.m_peak_afl_AutoController_AutoTolerance_GetRange(controller, min, max, inc);
1257 throw std::runtime_error(
"Library not loaded!");
1263 auto& inst = instance();
1264 if(inst.m_peak_afl_AutoController_AutoPercentile_IsSupported)
1266 return inst.m_peak_afl_AutoController_AutoPercentile_IsSupported(controller, supported);
1270 throw std::runtime_error(
"Library not loaded!");
1276 auto& inst = instance();
1277 if(inst.m_peak_afl_AutoController_AutoPercentile_Set)
1279 return inst.m_peak_afl_AutoController_AutoPercentile_Set(controller, percentile);
1283 throw std::runtime_error(
"Library not loaded!");
1289 auto& inst = instance();
1290 if(inst.m_peak_afl_AutoController_AutoPercentile_Get)
1292 return inst.m_peak_afl_AutoController_AutoPercentile_Get(controller, percentile);
1296 throw std::runtime_error(
"Library not loaded!");
1302 auto& inst = instance();
1303 if(inst.m_peak_afl_AutoController_AutoPercentile_GetRange)
1305 return inst.m_peak_afl_AutoController_AutoPercentile_GetRange(controller, min, max, inc);
1309 throw std::runtime_error(
"Library not loaded!");
1315 auto& inst = instance();
1316 if(inst.m_peak_afl_AutoController_Type_Get)
1318 return inst.m_peak_afl_AutoController_Type_Get(controller, type);
1322 throw std::runtime_error(
"Library not loaded!");
1328 auto& inst = instance();
1329 if(inst.m_peak_afl_AutoController_Algorithm_IsSupported)
1331 return inst.m_peak_afl_AutoController_Algorithm_IsSupported(controller, supported);
1335 throw std::runtime_error(
"Library not loaded!");
1341 auto& inst = instance();
1342 if(inst.m_peak_afl_AutoController_Algorithm_Set)
1344 return inst.m_peak_afl_AutoController_Algorithm_Set(controller, algorithm);
1348 throw std::runtime_error(
"Library not loaded!");
1354 auto& inst = instance();
1355 if(inst.m_peak_afl_AutoController_Algorithm_Get)
1357 return inst.m_peak_afl_AutoController_Algorithm_Get(controller, algorithm);
1361 throw std::runtime_error(
"Library not loaded!");
1367 auto& inst = instance();
1368 if(inst.m_peak_afl_AutoController_Algorithm_GetList)
1370 return inst.m_peak_afl_AutoController_Algorithm_GetList(controller, typeList, listSize);
1374 throw std::runtime_error(
"Library not loaded!");
1380 auto& inst = instance();
1381 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported)
1383 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_IsSupported(controller, supported);
1387 throw std::runtime_error(
"Library not loaded!");
1393 auto& inst = instance();
1394 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_Set)
1396 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_Set(controller, algorithm);
1400 throw std::runtime_error(
"Library not loaded!");
1406 auto& inst = instance();
1407 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_Get)
1409 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_Get(controller, algorithm);
1413 throw std::runtime_error(
"Library not loaded!");
1419 auto& inst = instance();
1420 if(inst.m_peak_afl_AutoController_SharpnessAlgorithm_GetList)
1422 return inst.m_peak_afl_AutoController_SharpnessAlgorithm_GetList(controller, typeList, listSize);
1426 throw std::runtime_error(
"Library not loaded!");
1432 auto& inst = instance();
1433 if(inst.m_peak_afl_AutoController_Callback_Set)
1435 return inst.m_peak_afl_AutoController_Callback_Set(controller, type, funcPtr, context);
1439 throw std::runtime_error(
"Library not loaded!");
1445 auto& inst = instance();
1446 if(inst.m_peak_afl_AutoController_Weighted_ROI_IsSupported)
1448 return inst.m_peak_afl_AutoController_Weighted_ROI_IsSupported(controller, supported);
1452 throw std::runtime_error(
"Library not loaded!");
1458 auto& inst = instance();
1459 if(inst.m_peak_afl_AutoController_Weighted_ROI_Min_Size)
1461 return inst.m_peak_afl_AutoController_Weighted_ROI_Min_Size(controller, size);
1465 throw std::runtime_error(
"Library not loaded!");
1471 auto& inst = instance();
1472 if(inst.m_peak_afl_AutoController_Weighted_ROI_Set)
1474 return inst.m_peak_afl_AutoController_Weighted_ROI_Set(controller, weightedRoiList, listSize);
1478 throw std::runtime_error(
"Library not loaded!");
1484 auto& inst = instance();
1485 if(inst.m_peak_afl_AutoController_Weighted_ROI_Get)
1487 return inst.m_peak_afl_AutoController_Weighted_ROI_Get(controller, weightedRoiList, listSize);
1491 throw std::runtime_error(
"Library not loaded!");
1497 auto& inst = instance();
1498 if(inst.m_peak_afl_AutoController_Limit_IsSupported)
1500 return inst.m_peak_afl_AutoController_Limit_IsSupported(controller, supported);
1504 throw std::runtime_error(
"Library not loaded!");
1510 auto& inst = instance();
1511 if(inst.m_peak_afl_AutoController_Limit_Default)
1513 return inst.m_peak_afl_AutoController_Limit_Default(controller, limit);
1517 throw std::runtime_error(
"Library not loaded!");
1523 auto& inst = instance();
1524 if(inst.m_peak_afl_AutoController_Limit_Set)
1526 return inst.m_peak_afl_AutoController_Limit_Set(controller, limit);
1530 throw std::runtime_error(
"Library not loaded!");
1536 auto& inst = instance();
1537 if(inst.m_peak_afl_AutoController_Limit_Get)
1539 return inst.m_peak_afl_AutoController_Limit_Get(controller, limit);
1543 throw std::runtime_error(
"Library not loaded!");
1549 auto& inst = instance();
1550 if(inst.m_peak_afl_AutoController_Hysteresis_IsSupported)
1552 return inst.m_peak_afl_AutoController_Hysteresis_IsSupported(controller, supported);
1556 throw std::runtime_error(
"Library not loaded!");
1562 auto& inst = instance();
1563 if(inst.m_peak_afl_AutoController_Hysteresis_Default)
1565 return inst.m_peak_afl_AutoController_Hysteresis_Default(controller, hysteresis);
1569 throw std::runtime_error(
"Library not loaded!");
1575 auto& inst = instance();
1576 if(inst.m_peak_afl_AutoController_Hysteresis_Set)
1578 return inst.m_peak_afl_AutoController_Hysteresis_Set(controller, hysteresis);
1582 throw std::runtime_error(
"Library not loaded!");
1588 auto& inst = instance();
1589 if(inst.m_peak_afl_AutoController_Hysteresis_Get)
1591 return inst.m_peak_afl_AutoController_Hysteresis_Get(controller, hysteresis);
1595 throw std::runtime_error(
"Library not loaded!");
1601 auto& inst = instance();
1602 if(inst.m_peak_afl_AutoController_Hysteresis_GetRange)
1604 return inst.m_peak_afl_AutoController_Hysteresis_GetRange(controller, min, max, inc);
1608 throw std::runtime_error(
"Library not loaded!");
peak_afl_status peak_afl_GetVersion(uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
Query the library version.
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.
peak_afl_status peak_afl_AutoFeatureManager_AddController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Add a controller to an automanager instance.
peak_afl_status peak_afl_AutoController_SkipFrames_Get(peak_afl_controller_handle controller, uint32_t *count)
Get number of frames skipped for a controller.
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.
peak_afl_controller_sharpness_algorithm
controller sharpness algorithm (focus)
Definition: peak_afl.h:199
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.
peak_afl_status peak_afl_AutoController_SkipFrames_Set(peak_afl_controller_handle controller, uint32_t count)
Set number of frames skipped for a controller.
peak_afl_status peak_afl_AutoController_Limit_Default(peak_afl_controller_handle controller, peak_afl_controller_limit *limit)
Get the autofeature default limit.
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.
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.
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.
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.
peak_afl_status peak_afl_AutoFeatureManager_Status(peak_afl_manager_handle handle, peak_afl_BOOL8 *running)
Get the status of a manager.
peak_afl_status
peak_afl Status codes
Definition: peak_afl.h:86
Definition: peak_afl.hpp:55
peak_afl Size (2D)
Definition: peak_afl.h:270
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.
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.
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.
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.
peak_afl Rectangle (2D)
Definition: peak_afl.h:304
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.
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.
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.
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.
peak_afl_status peak_afl_AutoController_Type_Get(peak_afl_controller_handle controller, peak_afl_controllerType *type)
Get the controller type.
peak_afl_status peak_afl_AutoController_AutoPercentile_Get(peak_afl_controller_handle controller, double *percentile)
Get the auto percentile for a controller.
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.
peak_afl Focus Limit
Definition: peak_afl.h:342
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. ...
peak_afl_status peak_afl_AutoFeatureManager_Destroy(peak_afl_manager_handle handle)
Destroy an automanager instance.
peak_afl_status peak_afl_AutoFeatureManager_RemoveController(peak_afl_manager_handle handle, peak_afl_manager_handle controller)
Remove a controller to an automanager instance.
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.
peak_afl_roi_preset
controller roi preset
Definition: peak_afl.h:256
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.
peak_afl_controller_automode
controller automode
Definition: peak_afl.h:133
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.
uint8_t peak_afl_BOOL8
custom boolean type
Definition: peak_afl.h:352
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.
void * peak_afl_manager_handle
opaque manager handle type
Definition: peak_afl.h:50
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.
peak_afl_status peak_afl_AutoFeatureManager_DestroyAllController(peak_afl_manager_handle handle)
Destroy all controllers for a manager.
peak_afl_status peak_afl_AutoController_AutoTarget_Set(peak_afl_controller_handle controller, uint32_t target)
Set the auto target for a controller.
peak_afl_status peak_afl_Init(void)
Init the peak_afl auto feature library.
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.
peak_afl_status peak_afl_AutoController_GetLastAutoAverage(peak_afl_controller_handle controller, uint8_t *average)
Get the last auto average for a controller.
peak_afl_controller_algorithm
controller algorithm
Definition: peak_afl.h:177
peak_afl_status peak_afl_Exit(void)
Exit the peak_afl auto feature library.
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.
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.
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.
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.
peak_afl_status peak_afl_AutoController_Destroy(peak_afl_controller_handle controller)
Destroy a controller. Will fail if it is queued inside a manager.
peak_afl_status peak_afl_AutoFeatureManager_Create(peak_afl_manager_handle *handle, PEAK_NODE_MAP_HANDLE nodeMapHandle)
Create an automanager instance.
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.
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.
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.
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.
peak_afl_status peak_afl_AutoController_Status(peak_afl_controller_handle controller, peak_afl_controller_status *status)
Get the status for a controller.
peak_afl_status peak_afl_AutoController_Hysteresis_Default(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis default.
peak_afl_status peak_afl_AutoController_AutoTolerance_Set(peak_afl_controller_handle controller, uint32_t tolerance)
Set the auto tolerance for a controller.
peak_afl Focus Rectangle
Definition: peak_afl.h:326
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.
peak_afl_status peak_afl_AutoController_AutoTolerance_Get(peak_afl_controller_handle controller, uint32_t *tolerance)
Get the current auto tolerance for a controller.
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.
peak_afl_status peak_afl_AutoController_Create(peak_afl_controller_handle *controller, peak_afl_controllerType controllerType)
Create a new controller.
peak_afl_controller_status
controller status
Definition: peak_afl.h:149
peak_afl_status peak_afl_AutoFeatureManager_Process(peak_afl_manager_handle handle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Process an image.
peak_afl_status peak_afl_AutoController_Hysteresis_Get(peak_afl_controller_handle controller, uint8_t *hysteresis)
Get the autofeature hysteresis for a controller.
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.
void * peak_afl_controller_handle
opaque controller handle type
Definition: peak_afl.h:48
peak_afl_status peak_afl_GetLastError(peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
Get the last error message.
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.
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.
peak_afl_controllerType
controller types
Definition: peak_afl.h:120
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.
peak_afl_status peak_afl_AutoController_AutoPercentile_Set(peak_afl_controller_handle controller, double percentile)
Set the auto percentile for a controller.
peak_afl_status peak_afl_AutoController_Hysteresis_Set(peak_afl_controller_handle controller, uint8_t hysteresis)
Set the autofeature hysteresis for a controller.
peak_afl_callback_type
controller callback type
Definition: peak_afl.h:237
peak_afl_status peak_afl_AutoFeatureManager_DestroyController(peak_afl_manager_handle handle, peak_afl_controller_handle controller)
Destroy a controller.