1. An imaging device, comprising: an optical lens adapted to form a focused image at a plurality of focus distances; an image sensor adapted to transform an optical image formed by the optical lens into a digital signal representing the optical image; a memory that stores acquired sub-frames, wherein each of the acquired sub-frames comprises a digital signal representation of an optical image of an object from the image sensor, the optical image being captured at a focus distance from the optical lens corresponding to a focus position of the optical lens, the focus position being different for each of the acquired sub-frames; and processing circuitry configured to: process the acquired sub-frames and form a single output frame from the acquired sub-frames acquired at different optical lens focus positions by identifying, for each pixel in the single output frame, a value of a pixel in one of the acquired sub-frames that has an optimal focus value as compared to corresponding pixel values in remaining ones of the acquired sub-frames and using the identified value of the pixel in the single output frame, and calculate a depth map for the single output frame based at least in part on the focus positions of the acquired sub-frames, the depth map representing, for each pixel selected for the single output frame, a corresponding focus distance of the pixel, the corresponding focus distance of at least one pixel being interpolated based at least in part on another focus value of another pixel in another one of the acquired sub-frames that has a second most optimal focus value as compared to the corresponding pixel values in the remaining ones of the acquired sub-frames.