1. A processor-implemented method for capturing images for later refocusing, comprising: estimating a depth map for a scene; determining a number of principal depths via selecting a plurality of depths having the largest areas in the depth map as the principal depths; capturing a set of images, each image focused at one of the principal depths; and processing captured images to produce an output image.