Shape from focus or shape from defocus is a method of
3D reconstruction
In computer vision and computer graphics, 3D reconstruction is the process of capturing the shape and appearance of real objects.
This process can be accomplished either by active or passive methods. If the model is allowed to change its shape i ...
which consists of the use of information about the
focus
Focus, or its plural form foci may refer to:
Arts
* Focus or Focus Festival, former name of the Adelaide Fringe arts festival in South Australia Film
*''Focus'', a 1962 TV film starring James Whitmore
* ''Focus'' (2001 film), a 2001 film based ...
of an optical system to provide a means of measurement for 3D information.
[Favaro, Paolo, and Stefano Soatto.]
A geometric approach to shape from defocus
" IEEE Transactions on Pattern Analysis and Machine Intelligence 27.3 (2005): 406-417. One of the simplest forms of this method can be found in most
autofocus camera
An autofocus (or AF) optical system uses a sensor, a control system and a motor to focus on an automatically or manually selected point or area. An electronic rangefinder has a display instead of the motor; the adjustment of the optical system ...
s today. In its most simple form, the methods analyze an image based upon overall contrast from a
histogram
A histogram is an approximate representation of the distribution of numerical data. The term was first introduced by Karl Pearson. To construct a histogram, the first step is to " bin" (or " bucket") the range of values—that is, divide the ent ...
, the width of edges, or more commonly, the
frequency spectrum
The power spectrum S_(f) of a time series x(t) describes the distribution of power into frequency components composing that signal. According to Fourier analysis, any physical signal can be decomposed into a number of discrete frequencies, ...
derived from a
fast Fourier transform
A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in t ...
of the image. That information might be used to drive a
servo mechanism
In control engineering a servomechanism, usually shortened to servo, is an automatic device that uses error-sensing negative feedback to correct the action of a mechanism. On displacement-controlled applications, it usually includes a built-in ...
in the lens, focusing it until the quantity measured on one of the earlier parameters is optimized.
References
{{Computer vision footer
Autofocus cameras
Optical metrology
3D imaging