1. An image processing method for constructing a composite image with extended depth of field, from a plurality of source images of a scene stored in at least one image stack, the plurality of source images being taken at substantially identical fields of view, the method comprising: aligning the images in the image stack such that every image in the image stack is aligned with other images in the stack, wherein the images are aligned by a bi-directional image alignment method, the bi-directional image alignment method includes, arranging the images in a sequence in the image stack; selecting a first reference image, such that the first reference image is the substantially central image in the image sequence; aligning the first reference image with immediate left side and immediate right side images in the sequence; and repeating the alignment process for the next image on left side and right side of the reference image with respect to the aligned images; performing illumination and color correction on the aligned images in the image stack; generating an energy matrix for each pixel of each illumination and color corrected image in the image stack by computing energy content for each pixel; generating a raw index map that contains the location of every pixels having maximum energy level among all the images in the image stack; generating degree of defocus map by comparing the energy content at a particular pixel in all the images against a reference signal and repeating the process for all the pixels; and constructing the composited image using the raw index map and the degree of defocus map.