![]() |
IDS peak AFL v2.0.0
|
Automatic focus control for lens focus positioning and sharpness optimization. More...
Topics | |
| Skip frames | |
| Frame processing optimization by skipping frames to reduce computational load. | |
| Hysteresis | |
| Focus stability control to prevent hunting and oscillation. | |
| Limit | |
| Focus position range limits and boundaries. | |
| Weighted region of interest | |
| Multi-region focus evaluation with configurable weights. | |
| Region of interest presets | |
| Predefined region of interest configurations for focus control. | |
| Sharpness algorithm | |
| Sharpness measurement algorithms for focus evaluation. | |
| Mode | |
| Operation mode configuration for automatic control functionality. | |
| Peak search algorithm | |
| Focus search algorithms for optimal focus positioning. | |
| Callbacks | |
| Event notification callbacks for automatic control operations. | |
Automatic focus control for lens focus positioning and sharpness optimization.
The autofocus controller will automatically adjusts the lens to focus on a subject.
For ongoing adaptations the Continuous mode has to be used so that it responds to deviations from the target value. To disable the control functionality automatically once the target value has been reached, (approximately) use the Once mode.
The Skip frames setting defines how many frames should be skipped between processing operations. This parameter strongly influences both control speed and system stability.
When skip frames is set to N, the controller will:
Example: Skip frames = 3 means process every 4th frame (process 1, skip 3, process 1, skip 3...)
Skip frames can be adjusted dynamically based on conditions:
Defines the size of the interval range after which the algorithm terminates the search.
With the minimum and maximum limit the focus search range for the focus_algorithm can be limited. The focus_limit affects whether and where a maximum value is found.
The Weighted Region of Interest (Weighted ROI) is a concept to prioritize certain areas of an image over others. In the context of autofocus systems, the Weighted ROI is used to assign more importance to specific regions of the image, such as where the main subject is likely located, to ensure optimal focus.
In the context of autofocus, a Region of Interest (ROI) preset defines a specific, predefined area of the camera’s image where the autofocus algorithm should evaluate sharpness and adjust focus. Instead of manually specifying the ROI dimensions and location, ROI presets offer a convenient way to apply common autofocus patterns — reducing configuration time and promoting consistency across systems.
These presets are especially useful when the autofocus behavior needs to follow standard framing assumptions, such as focusing on the center of the image, which is typical in most photography and machine vision applications.
For example, the PEAK_AFL_CONTROLLER_ROI_PRESET_CENTER preset instructs the autofocus controller to evaluate and adjust focus based only on the central portion of the image. This is ideal when the primary subject is expected to appear near the center of the frame.
Sets the algorithm for the sharpness calculation.
Sets the algorithm for the maximum value search.
It is possible to be informed for specific events via callbacks. Callbacks provide real-time feedback about controller operations and enable responsive application behavior.
Finished will be called when the controller has completed its operation and reached the target value.
When called:
Processing will be called during image processing to provide real-time feedback.
When called:
Important Threading Notes: