How to Our Product Insights

How to achieve enhanced autofocus performance with high-quality cameras

One of the challenges of Autofocus (AF) cameras is they have a default focus range, and not all applications fall into this range. Find out how to overcome this challenge to improve AF accuracy while using e-con Systems’ autofocus cameras like See3CAM_30 and See3CAM_130.

How to achieve enhanced autofocus performance with high-quality cameras

Autofocus cameras are used in many applications such as barcode scanners, kiosks, and industrial robots where working distance is in dynamic range. Autofocus is a feature that is used to capture the most focused image by adjusting the position of the lens dynamically. This algorithm is one of the 3A functionalities of the camera. Many factors affect image sharpness, such as the distance between object and camera, lens parameters, and lighting conditions. 

e-con systems’ See3CAM_130 camera is the 13MP autofocus camera, a perfect fit for the applications mentioned above. The See3CAM_130 supports AF from a working distance of 10cm to infinity by default. This value is mapped to 1-255 in the UVC control. The user can switch from auto to manual mode to control this slider value. The value 255 corresponds to 10cm, and the value 0 corresponds to the infinity position. The lens actuator used here is the Voice Coil Motor. 

e-con Systems also offers the See3CAM_30 – another AF camera that supports AF using liquid lens technology. 

In the blog, we will discuss how to use these cameras to get enhanced AF performance for specific use cases.

Read about VCM vs. Liquid Lens

Challenges faced with autofocus mechanism

Autofocus cameras come with A default focus range from 10cm to infinity with a nominal autofocus accuracy. Some specific use cases require AF performance improvements, such as:

  • It helps get better autofocus accuracy specific to use cases like scanning a smaller object in the bigger ROI. For barcode scanning applications, the object size is much lesser than the AF ROI. Hence, it results in lesser autofocus accuracy. 
  • Some use cases such as face detection and recognition applications don’t require a working distance ranging from 10cm to infinity. It’s because the object covers most of the ROI and only needs a fixed working distance. The accuracy of the autofocus will be high when the object covers the entire ROI, and so will the focus time. 
  • Such applications also require faster settling time focus, which proves to be a challenge.

Let’s look at how we can overcome these challenges and achieve improved autofocus accuracy and faster settling time with e-con’s autofocus cameras.

Solutions for improved autofocus accuracy

Here are a few solutions that can improve the autofocus accuracy with e-con’s autofocus cameras.  It’s important to note that these involve finetuning ISP settings.

  • Using the two-pass method in ISP
  • Reducing the AF scan range
  • Increasing slot values of scanning

Use of Two Pass in ISP

Conventional Method

See3CAM_130 supports a single scan of the full AF range by default (infinity to 10cm). That AF algorithm scans from infinity to macro position and can be customized in the ISP settings for specific user applications. The AF algorithm uses the hill climbing method to find the sharpest image while moving the lens actuator for every frame. The ISP calculates the edge average of each frame and obtains the relative sharpness of each lens position. Once the highest focus is achieved, then the lens position is settled, and the ISP returns the AF success status.

Working of Single Pass Scan Mode

Two-pass method

The number of scans by the ISP can be increased using the two-pass method. The ISP scans the entire range and calculates the best focus position in the first pass. In the second pass, it does a detailed scan around the best focus position – calculated in the first pass scan.

Working of Two Pass Scan Mode

Reducing the AF scan range

In barcode applications or automated kiosks, the working distance range is fixed. So, the ISP can be optimized to scan the scene only in this range instead of a full scan. For example, if the user knows that the object will be placed in a working distance range of 1m to 1.5m, the focus value will be between 100 to 120 in the See3CAM_130 by default. However, by customizing the ISP settings – this 100-120 range can be remapped into 255 steps instead of the usual 0-255 steps (covering 10cm to infinity). This results in improved AF accuracy.

Basically, the scanning range is optimized based on the working distance so that the ISP can scan the same region with higher precision.

Increase the slot values of scanning

In the single scan mode, the AF algorithm performs single focus range – scanning and calculating the best focus position. Scanning of the defined range is done with a programmable number of equidistant steps (slots). The higher the number of slots – the higher the accuracy. This can be increased in second pass scanning in the two-pass scan method, as well.

Solutions for improving AF settling time (Increase AF speed)

The time taken for the ISP to detect the best level of sharpness while moving the lens position is called hunting time. The hunting time can be improved by customizing the ISP settings with e-con’s cameras like See3CAM_130 and See3CAM_30

Methods to improve the hunting time:

  • Changing the slot value
  • Modifying the lookup table of the actuator

Changing the slot value

The AF slot value plays an important role in hunting time and accuracy levels, which go up if the slot value is increased. Conversely, if slot value is decreased, the hunting time and accuracy levels will decrease too.

Larger objects will have lesser hunting time when compared to smaller objects. And same applies to the accuracy levels, as well. Therefore, larger objects will also have a higher accuracy level than smaller ones. An ROI-based AF can be used to get higher accuracy with smaller objects. This feature is already available in e-con’s autofocus cameras.

By default, the slot value set in the camera ISP is 17. You can reduce the slot value to 11 to improve the AF speed.

Reducing SLOT Value

Modifying the lookup table of the actuator

The ISP uses a Lookup Table (LUT) for moving the actuator. By modifying this LUT, you can achieve lesser hunting time. But this will affect the accuracy of the AF algorithm – indirectly proportional to the hunting time. If one increases, then the other decreases.

The Actuator Look Up Table (ACT-LUT) is the bridge between the lens driver and ISP. The AF value set in ISP is mapped to the driver through ACT-LUT. So, modifying this table will affect the AF performance. The table values will be from 0-1023 in default settings. For AF speed improvement, this table can be remapped so that the lens position can jump to the desired range directly.

Method to increase AF speed

If you have any questions about achieving enhanced autofocus performance, please write to camerasolutions@e-consystems.com.

Interested in other AF cameras from e-con Systems? Check out these:

  1. See3CAM_130 – AR1335 sensor-based 13MP autofocus USB camera with iHDR support
  2. See3CAM_160 – 16MP color autofocus USB 3.1 Gen 1 camera based on the Sony 1/2.8″ IMX298 CMOS image sensor
  3. See3CAM_30 – AR0330 sensor-based 3.4 MP autofocus USB camera with liquid lens

Related posts

Leave a Comment