Please enable JavaScript to view this site.

IDS peak 2.10.0 / uEye+ firmware 3.34

IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.

You can control the focus settings for specific camera models with the "Focus/image sharpness" dialog, see also OpticControl.

Click on icon-focusto open the dialog.

Fig. 237: Focus/image sharpness

Fig. 237: Focus/image sharpness

You can choose between the following settings for the autofocus:

Off (default): Automatic focus is disabled. You can adjust the focus manually.

Once: The focus is adapted once by the device. Once it has converged, it returns to the “Off” state.

Continuous: The focus is constantly adapted by the device to maximize the dynamic range.

ContinuousSingleScan: The focus is detecting scene changes and triggers a single scan if there are sufficient changes.

hint_info

If you use the auto functions, such as auto white balance, a sufficiently bright and low-noise image must be available.

Use the "Focus setting" slider to control the focus manually:

uEye+ XC USB 3: Small values mean that the lens focuses at close range, while great values mean that the lens focuses towards infinity.

uEye+ LE USB 3.1 AF Rev. 1.2: The value "0" means that the lens is not focused. Small values mean that the lens focuses towards infinity, while great values mean that the lens focuses at close range.

Search and focus algorithms for uEye+ LE USB 3.1 AF Rev. 1.2

hint_info

The advanced autofocus settings are inactive when you enable continuous autofocus ("Once" option is not enabled). The continuous autofocus uses the Tenengrad algorithm for sharpness calculation.

Select the algorithm for the maximum value search under "Search algorithm".
Note on search: If no maximum value can be found after 300 iterations, the search is aborted and the focus value is reset to the previous value.

Golden 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 is continued 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 is continued until the interval range is less than or equal to the set hysteresis.

Global search
Within the preset interval range, the focus function scans completely with medium step width and memorizes the maximum that occurred in it. Based on the maximum, the interval range and the step width, the interval range and the step width are reduced and the scan is repeated within this interval. This process is continued 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).

Select the algorithm for the sharpness calculation under “Sharpness calculation”. Due to the different calculation bases, the algorithms differ in the calculation time of the sharpness value per image. Complex pixel transformations, e.g. Sobel filters, generate a higher computing load than the simple calculation of the standard deviation from the mean gray value. Analyzing larger image areas (see ROI for autofocus) therefore can affect the frame rate of the camera. Depending on the scene and the requirements of your application, you can influence the speed and accuracy of the measurement by selecting an available search algorithm. The calculation methods "Mean score" and "Histogram variance" are more suitable for time-critical calculations on average PC hardware. The efficiency of the Tenengrad calculation, on the other hand, can quickly be at the expense of the achievable frame rate with larger image areas.

Tenengrad
Sobel factors in x- and y-directions and summation of euclidean distances.

Mean score
Summation of the difference between two mean values from two pixel values in both x- and y-direction.

Histogramm variance
Standard deviation of the gray values in the histogram of the mean value.

Use the search range to limit the range for the focus setting, i.e. the search range affects whether and where a maximum value is found. Depending on the distance between the lens and the image scene and the depth of field of the lens used, a small area is sufficient. This also reduces the search time, as fewer sharpness calculations are required.

Search range min.
Sets the minimum limit of the search range for the search algorithm.

Search range max.
Sets the maximum limit of the search range for the search algorithm.

Skip frames
Here, enter the number of frames that will be skipped in freerun mode for auto control. The higher the frame rate, the higher the value should be. If the value is too small, the control may starts to oscillate, or the system may be overloaded. Increase the value in this case.

Hysteresis
Defines the size of the interval range when the search algorithm stops searching.

ROI for autofocus

For autofocus, use the ROI for autofocus to define the image detail on which to focus (see SubRegionSelector). By default, the ROI is in the image center and must be within the camera image ROI.

You can either set the ROI with the camera image ROI or set it separately. Set the ROI for the camera image first and then set the ROI (see “Position and size” dialog).

1.Click icon-open-roi-settings to open the settings for the ROI. The ROI is bound to the camera image ROI by default.

2.Click on icon-roi-locked to set the ROI separately from the camera image ROI.

3.Click on icon-image-show-roi to display the ROI in the camera image.

4.You can set the ROI via the Width and Height sliders and then move the ROI via X/Y offset. The ROI must be within the camera image ROI (see Sub-regions for auto-algorithms (Exposure, Gain, BalanceWhite, Autofocus)).

5.Or click on icon-draw-roi to draw the ROI directly in the camera window with the mouse.

6.To reset the ROI, click on icon-reset-roi.

© 2024 IDS Imaging Development Systems GmbH