Among the various techniques that allow the acquisition of the depth of the scene, Depth from Focus (DfF) technique is a good candidate for low-resources real-time embedded systems. Indeed it relies on low complexity processing and requires one single camera. On the other hand, the large data dependency imposed by the size of a focus-cube must be tackled in order to ensure the embeddability of the algorithm. This paper presents algorithm improvement and an architecture optimized for both processing complexity and memory footprint. For full-HD images, this architecture can produce depth and confidence maps in real time using roughly 1.4p arithmetic operations per pixel, where p is the number of depth planes, without the need of a multiplier, while the needed memory footprint is equivalent to 6% of one frame. All in focus images can also be processed on-the-fly to the price of an additional 2 frames memory buffer.
Depth from focus (DfF) algorithms rely on a scene-invariant series of images captured at different focuses to evaluate the distance between objects of the scene and the camera. One limitation of this technique is the slight "focus zoom" caused by standard lenses where focus is achieved with lens translation. Focus zoom impacts the performance and complexity of DfF estimation algorithms because it requires a costly spatial transform for images registration. Liquid Crystal (LC) lenses and liquid lenses do not rely on lens translation for focus which makes them good candidates for processing-inexpensive DfF techniques. On the other hand, DfF distance resolution depends on the number of acquired images under the constraint of scene-invariance which, in turn, calls for fast framerates and hence fast focusing. LC lenses are not the fastest lenses technology available and a careful characterization of both control vs. focus and focus speed is therefore required in order to define the acquisition system specifications. This paper presents both a system and a method to control and characterize a focus tunable lens. We developed a dedicated methodology, driver and algorithms to control experimental LC lenses in order to evaluate their compliance with the application and compare them with commercial-off-the-shelf (COTS) liquid lenses. Our experimental system controls, captures and processes images to measure the speed limitation of these lenses. We discuss the LC lenses performances, compare them with liquid lenses and show an example of depth map extraction with both of these lens technologies.