Autofocus for Event Cameras

Shijie Lin, Yinqiang Zhang, Lei Yu, Bin Zhou, Xiaowei Luo, Jia PanOpenReview 2022

Abstract: Focus control (FC) is crucial for cameras to capture sharp images in challenging real-world scenarios. The autofocus (AF) facilitates the FC by automatically adjusting the focus settings. However, due to the lack of effective AF methods for the recently introduced event cameras, their FC still relies on naive AF like manual focus adjustments, leading to poor adaptation in challenging real-world conditions. In particular, the inherent differences between event and frame data in terms of sensing modality, noise, temporal resolutions, etc., bring many challenges in designing an effective AF method for event cameras. To address these challenges, we develop a novel event-based autofocus framework consisting of an event-specific focus measure called event rate (ER) and a robust search strategy called event-based golden search (EGS). To verify the performance of our method, we have collected an event-based autofocus dataset (EAD) containing well-synchronized frames, events, and focal positions in a wide variety of challenging scenes with severe lighting and motion conditions. The experiments on this dataset and additional real-world scenarios demonstrated the superiority of our method over state-of-the-art approaches in terms of efficiency and accuracy.

Introduction

Event cameras, or neuromorphic sensors, represent a paradigm shift in visual sensing. Unlike traditional cameras that capture frames at fixed intervals, event cameras report pixel-level brightness changes as an asynchronous stream of events. While this modality offers a high dynamic range (>130 dB) and microsecond-level latency, it renders standard autofocus (AF) algorithms—which rely on 2D image gradients—ineffective.

Existing attempts to adapt AF for event cameras often involve reconstructing artificial frames from event streams. However, this process is computationally expensive, slow, and highly sensitive to noise. The core challenge lies in the fundamental differences in data modality, the inherent noise of event data, and the massive volume of events generated during high-speed motion.

The Event-based Autofocus Framework

To overcome these hurdles, this research proposes a lightweight framework that operates directly on the event stream without image reconstruction. The framework consists of two primary components: a dedicated focus measure and an optimized search strategy.

Event Rate (ER) Focus Measure

The researchers mathematically demonstrated that the rate of events generated is proportional to the norm of the image gradient. In practical terms, when a lens is at its optimal focal position, image edges are sharpest. Moving the lens across these sharp edges—even in a static scene due to the "breathing" effect of lens magnification—generates the maximum number of events. The Event Rate (ER) metric is highly efficient, as it simply counts events within a specific time window to determine sharpness.

Overview of the event-based autofocus framework, showing the relationship between focal position and the event-based focus measure.

Event-based Golden Search (EGS)

Finding the peak ER across all focal positions is a 1D optimization problem. The authors developed the Event-based Golden Search (EGS), an adaptation of the Golden Section Search algorithm. EGS iteratively narrows the focal range by adaptively tuning the event accumulation interval. This makes the search robust to varying lighting conditions and motion speeds, ensuring the system finds the global optimum efficiently.

The Event-based Golden Search (EGS) iteratively narrows the focal range to find the optimal position.

Experimental Evaluation

To benchmark the framework, the authors introduced the Event-based Autofocus Dataset (EAD). This dataset includes 28 sequences across static and dynamic scenes under both well-lit and extremely dark conditions (as low as 0.7 Lux).

Key Results

  • Accuracy: The ER+EGS method achieved a Mean Absolute Error (MAE) of 56.3, significantly outperforming the best traditional frame-based method (DCTM), which had an MAE of 1245.1.
  • Low-Light Performance: The system successfully focused in environments with 0.7 Lux, where standard cameras produced images too dark or blurred for traditional AF to function.
  • Efficiency: By avoiding spatial convolutions and image rendering, the method is suitable for low-power edge devices such as drones and micro-robots.

Conclusion

The proposed ER+EGS framework provides a robust, real-time solution for event camera autofocus. By treating the event stream as a statistical signal rather than a visual one, the method achieves high accuracy and noise immunity even in extreme conditions. Future work will focus on addressing temporal delays in high-contrast scenarios to further refine focus synchronization.

Summary updated

BibTeX
@misc{lin2022autofocus,
  author = {Shijie Lin and Yinqiang Zhang and Lei Yu and Bin Zhou and Xiaowei Luo and Jia Pan},
  title = {{Autofocus for Event Cameras}},
  year = {2022},
  eprint = {2203.12321},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.12321},
  howpublished = {OpenReview},
}
Figure