The distance of objects to an optical system is estimated. An optical mask
such as a diffractive optical element, continuous phase mask, hologram,
amplitude mask, or combination thereof is placed within the optics in
front of a sensor array such as a CCD, CID or COMAS device. The optical
mask encodes the three-dimensional response of the system. The mask is
designed to optimize depth estimation, for example, by maximizing Fisher
information. A particular implementation creates a point spread function
("PSF") that rotates as a function of the object position. The image or
images obtained with different PSFs may be digitally processed to recover
both a depth map of the scene and other parameters such as image
brightness. The digital processing used to recover the depth map of the
object may include deconvolution of a PSF from detected images.