Shape from focus orshape from defocus is a method of3D reconstruction which consists of the use of information about thefocus of an optical system to provide a means of measurement for 3D information.[1] One of the simplest forms of this method can be found in mostautofocus cameras today. In its most simple form, the methods analyze an image based upon overall contrast from ahistogram, the width of edges, or more commonly, thefrequency spectrum derived from afast Fourier transform of the image. That information might be used to drive aservo mechanism in the lens, focusing it until the quantity measured on one of the earlier parameters is optimized.