1. A camera array, comprising: a plurality of cameras configured to capture images of a scene, where each camera comprises: optics comprising at least one lens element and at least one aperture; and a sensor comprising a two-dimensional array of pixels and control circuitry for controlling imaging parameters; a processor configured by software to: capture a plurality of images from different viewpoints using the plurality of cameras, where each image captured by the plurality of cameras includes pixels that are occluded in at least one other image captured by the plurality of cameras; and normalize the plurality of images based upon calibration data to enable scan-line based parallax searches; measure parallax between the normalized images by adaptively comparing the similarity of neighborhoods of pixels for different parallax-induced shifts along scan-lines; identify occluded pixels based upon the measured parallax information; generate a depth map using the measured parallax information; select at least one distance as an “in best focus” distance; and blur an image produced by the camera array based upon the “in best focus” distance and distance information from the depth map.