Several active and passive methods have been proposed for recovering 3-D shape of objects from their 2-D images
Shape-from-focus is one of the passive methods. An important advantage of shape/depth from focus is that, unlike stereo
and motion, it is not confronted with the correspondence problem. A lot of research has been done on the image focus
analysis to automatically focus the imaging system, or to obtain the sparse depth information from the observed scene.
In our method, the images are taken by varying the focus value in different steps, and each pixel in the image is taken as
a single measurement. According to Thin Lens Model, the pixel's energy attains the maximum at the focused plane and
decreases else where. This change in pixel's energy follows a 'Generalized Gaussian' curve. For the initial stage, we
modified the pixel intensity in the images and found the maximum value in the modified pixel intensity vector and its
corresponding frame, repeating for all the pixels to compute Raw Depth Map (RDM). The proposed algorithm is fast and
precise, as compared to previous methods. The rigid body assumption reduces the number of pixels in the image, which
are to be considered for the shape reconstruction.