![]() |
IDS peak AFL v2.0.1
|
Focus search algorithms for optimal focus positioning. More...
Functions | |
| 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_Set (peak_afl_controller_handle controller, peak_afl_controller_algorithm algorithm) |
| Set the used algorithm 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_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. | |
Focus search algorithms for optimal focus positioning.
Sets the algorithm for the maximum value search.
Focus search algorithms.
Defines the search algorithms used by auto focus controllers to find the optimal focus position. Different algorithms offer trade-offs between speed, accuracy, and reliability in various conditions.
| Enumerator | |
|---|---|
| PEAK_AFL_CONTROLLER_ALGORITHM_AUTO | Automatic algorithm selection.
|
| PEAK_AFL_CONTROLLER_ALGORITHM_GOLDEN_RATIO_SEARCH | Golden ratio search algorithm. Uses golden section search to efficiently find the focus peak. Provides fast convergence with good accuracy for most scenes. Requires fewer focus steps than full scan methods.
|
| PEAK_AFL_CONTROLLER_ALGORITHM_HILL_CLIMBING_SEARCH | Hill climbing search algorithm. Iteratively moves focus position toward increasing sharpness values. Good for fine-tuning focus around the optimal position. May get trapped in local maxima with complex scenes.
|
| PEAK_AFL_CONTROLLER_ALGORITHM_GLOBAL_SEARCH | Global search algorithm. Performs a comprehensive search across the focus range to find the global optimum. More robust against local maxima but slower than other methods. Best accuracy for complex scenes.
|
| PEAK_AFL_CONTROLLER_ALGORITHM_FULL_SCAN | Full range scan algorithm. Scans the entire focus range systematically to build a complete focus curve. Provides maximum accuracy but requires the most time. Ideal for laboratory, calibration, or non-real-time applications.
|
| 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.
Retrieves the currently configured algorithm that the controller is using for automatic adjustments. This is the same algorithm that was previously set using peak_afl_AutoController_Algorithm_Set.
| [in] | controller | controller handle |
| [out] | algorithm | auto controller algorithm |
| 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.
Retrieves all algorithms that are supported by the specified controller. This function allows you to discover which algorithms are available before attempting to configure one. Different controllers may support different sets of algorithms based on their implementation and capabilities.
Uses the Two Staged Data Query principle: call first with NULL to get the required buffer size, then call again with an allocated buffer to retrieve the actual algorithm list.
To set a specific algorithm, see peak_afl_AutoController_Algorithm_Set.
| [in] | controller | controller handle |
| [out] | typeList | Pointer to a user allocated list of peak_afl_controller_algorithm. If this parameter is NULL, listSize will contain the needed count of typeList. |
| [in,out] | listSize | Size of typeList:
|
| 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.
If supported is PEAK_AFL_TRUE algorithm is supported, otherwise it is unsupported.
Call peak_afl_AutoController_Algorithm_GetList to get a list of supported algorithms.
| [in] | controller | controller handle |
| [out] | supported | boolean if controller supports setting an algorithm |
| 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.
Configures the algorithm that the controller will use for automatic adjustments. Different algorithms may provide different performance characteristics, accuracy, or speed. The choice of algorithm can significantly impact the controller's behavior and the quality of automatic adjustments.
The available algorithms depend on the controller type and implementation. To get a list of supported algorithms for this controller, call peak_afl_AutoController_Algorithm_GetList first.
| [in] | controller | controller handle |
| [in] | algorithm | auto controller algorithm |