![]() |
IDS peak AFL v1.8.0
|
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.
Auto: Defaults to PEAK_AFL_CONTROLLER_ALGORITHM_GOLDEN_RATIO_SEARCHGolden Ratio Search: Within the preset interval range, the focus function repeatedly divides into new intervals using the Golden Ratio. The interval range is decreased with each new calculation. This process continues until the interval range is less than or equal to the set hysteresis.Hill Climbing Search: Within the preset interval range, the focus function scans the register values for a maximum with medium step width until two falling sharpness values occur at the last two steps. Based on these values and the step width, the interval range and step width are reduced and the scan is repeated within this interval. This process continues until the interval range is less than or equal to the set hysteresis.Global Search: Within the preset interval range, the focus function completely scans with medium step width and the maximum that occurred is memorized. Based on the maximum, the interval range and the step width are reduced and the scan is repeated within this interval. This process continues until the interval range is less than or equal to the set hysteresis.Full Scan: Within the preset interval range, the focus function scans with a constant step width for an optimal result (step width: hysteresis). 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.
| 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 |
|
| 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 |