Please enable JavaScript to view this site.

IDS Software Suite 4.96.1

This tab sets the focus for uEye cameras with active focus (AF).

hint_info

The control of the single autofocus is only possible in the live image and not in snapshot mode. The autofocus control is contrast-based. All image settings that minimize contrast therefore have a negative effect on the autofocus control.

Click on autofocus_aoi in the toolbar to display an area of interest (AOI) in the live image of the uEye Cockpit which defines the autofocus measure window:

Autofocus control can only be used in DIB mode.

You can move, enlarge or reduce this measure window with the mouse.

If you change the AOI, the measure window is reset to its default settings. Therefore, first set an AOI and then move the measure window.

If you select an AOI for the camera image that is smaller than the smallest possible measure window, the measure window cannot be displayed.

If you mirror the image, the measure window is not mirrored and remains in its previous position.

hint_info

The focus AOI must be reset if a camera reconnect occurs.

Fig. 141: uEye Properties - Focus

Fig. 141: uEye Properties - Focus

Depending on the lens, the following setting can be controlled via the slider:

Focus

Focus setting

oValue = 0: Lens is unfocused.

oSmall values: Lens focuses to infinity.

oLarge values: Lens focuses on near range.

Autofocus
Enables/disables automatic focus.

Run once
The control is automatically stopped as soon as a maximum sharpness value has been found or if no sharpness value has been found after a certain number of iterations.

Show measured values
Opens a separate window in which the pairs of focus/sharpness measured values are displayed. For the calculation of the sharpness values, only image data within the measure window is used.

Fig. 142: Measured values for autofocus

Fig. 142: Measured values for autofocus

Advanced settings (Autofocus)

hint_info

The advanced settings for autofocus are disabled when you activate the continuous autofocus ("Run once" option is not enabled). The continuous autofocus uses the Tenengrad algorithm to calculate the sharpness. To stop the continuous autofocus, click on "Stop".

Sharpness calculation
Select the algorithm for the sharpness calculation.

oTenengrad
Sobel factors in x- and y-direction and summation of the euclidean distances.

oMean Score
Summation of the difference between two mean values from two pixel values each in x- and y-direction.

oHistogram Variance
Standard deviation of the gray values in the histogram of the mean value.

Peak search algorithm
Select the algorithm for the maximum value search.
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.

oGolden 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.

oHill 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.

oGlobal 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, 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.

oFull Scan
Within the preset interval range, the focus function scans with a constant step width for an optimal result (step width: hysteresis).

Focus search range

The focus search range affects whether and where a maximum value is found.

Limit min.
Sets the minimum limit of the focus search range for the peak search algorithm.

Limit max.
Sets the maximum limit of the focus search range for the peak search algorithm.

Hysteresis
Defines the size of the interval range after which the peak search algorithm terminates the search.

Recommended procedure to determine the focus search area

1.Mount the lens as described in the mounting instructions.

2.Determine the approximate focus search area (minimum and maximum limits) within which you want to focus.

3.Set the minimum limit -100 via the slider.

4.Set the maximum limit +100 via the slider.

Depending on the acquisition conditions, several "sharpness maximum values" may be possible in the AOI. This may result in an error in control, especially with continuous autofocus, which can be reduced by the procedure described above.

hint_info

These steps must be performed for each camera as there is no guarantee that a focal point set manually will lead to a reproducible focal distance. A focal value determined with one model will not necessarily result in the same focal point for a different model.

Application notes

The focus search area should be selected accordingly depending on the application. This means that the focus search area should be as large as possible, but if possible only the object to be focused is visible (or objects at the same distance). It is possible that default values do not work optimally for certain use cases.

If the focus search area cannot be selected in such a way that only the object to be focused is visible in it, the focus search area should be restricted accordingly.

Small AOIs can cause the focus to fluctuate constantly so that an optimal focus cannot be found.

If necessary, a low-contrast background should be selected.

© 2022 IDS Imaging Development Systems GmbH