1. A method comprising: receiving by a digital camera, a set of images corresponding to a set of non-uniform lens positions based on lens position data, the set of non-uniform lens positions determined before receiving the set of images, wherein the digital camera includes a table of object distances corresponding to the non-uniform lens positions and wherein within the table there are shorter intervals between pairs of non-uniform lens positions at a shorter object distance and longer intervals between pairs of non-uniform lens positions at a longer object distance; determining focus metric information for each of a plurality of regions of interest in each image of the set; determining an optimal lens position for each of the regions of interest, based on the focus metric information from the images in the set; generating a depth map based on the optimal lens positions and the table of object distances; and performing an image generation operation based on the generated depth map.