Use case

Image-Based Autofocus Solution with Algorithms on Frame Grabber FPGA

Image-based Autofocus Solution with Algorithms on Frame Grabber FPGA

What is it all about?

The two common approaches to autofocusing are image- and laser-based autofocusing. The laser-based autofocus technique is very fast, but one of its main limitations is that the autofocus algorithm is closely tied to the hardware specifications. The integration efforts are also very high. By comparison, image-based autofocusing is more feasible for many industrial applications thanks to its convenience and flexibility.

To accomplish image-based autofocusing, you need optics (such as a liquid lens) on the front end to bring objects from different distances into the depth of field. You will also need algorithms on the back end to evaluate the multiple acquisitions made while the focus changed and select the most in-focus image.

What was the problem?

A liquid lens is also called a focus-tunable lens. To tune the focal length to the desired value, electric signals are applied that change the curvature of the optical fluids inside. In this way, the working range of the fixed focus lens can be increased and quickly adjusted.

However, system engineers still have two major tasks ahead to integrate the autofocus function into their system. The first is to synchronize the liquid lens with the selected machine vision camera. The second is to develop software algorithms able to evaluate image quality and find the best focused image among multiple acquisitions. Meanwhile, engineers also need to consider CPU resources.

At minimum, a system engineer and a vision engineer would need to work together for weeks or months to balance different hardware components and APIs, as well as developing the algorithms.

The solution

In Basler's image-based autofocus solution, the front-end optic is a liquid lens and the algorithm is developed on Basler's frame grabber FPGA.

The camera and the focus tunable lens (liquid lens) are synchronized with a trigger signal generated by the frame grabber. The camera then acquires images in time with the changing focus of the lens, so that a series of images across various focuses are acquired. Next, the pre-designed autofocus algorithm on Basler's frame grabber FPGA selects one image out of the many acquisitions and outputs the most in-focus image as the result.

Image-Based Autofocus Solution with Algorithms on Frame Grabber FPGA

Benefits

  • Flexibility: a liquid lens can work with any fixed focus lens, allowing it to adjust focus without any physical change to the working distance.

  • Save time and system resources: implementing image processing on the preloaded frame grabber FPGA saves engineers considerable development time. Plus the algorithm is run without using CPU resources.

  • More possibilities: this solution can also be implemented with high magnification optics.

Products for this solution

Looking to implement a comparable solution? These products will help you.

How can we support you?

We will be happy to advise you on product selection and find the right solution for your application.