We present an effective method for defocus map estimation from a single natural image. It is inspired by the observation that defocusing can significantly affect the spectrum amplitude at the object edge locations in an image. By establishing the relationship between the amount of spatially varying defocus blur and spectrum contrast at edge locations, we first estimate the blur amount at these edge locations, then a full defocus map can be obtained by propagating the blur amount at edge locations over the entire image with a nonhomogeneous optimization procedure. The proposed method takes into consideration not only the affect of light refraction but also the blur texture of an image. Experimental results demonstrate that our proposed method is more reliable in defocus map estimation compared to various state-of-the-art methods. The former usually use a set of images captured by multiple camera focus settings, then defocus estimation is finished by a machine learning process. The latter mainly estimate accurate defocus at the edge locations, then the full defocus map is obtained using a propagation method. The multiple images-based methods have some limitations in practical applications due to their suffering from occlusion problem and requirement of a scene to be static. In contrast, defocus recovery from only a single image is more practical. Elder and Zucker [11] found the locations and the blur amount of edges according to the first-and second-order derivatives of the input image, they only got a sparse defocus map. Bae and Durand [3] extended this work to get a full defocus map from the sparse map by a defocus interpolation method. Namboodiri and Chaudhuri [12] modeled the defocus blur as a heat diffusion process and estimated defocus blur at edge locations using the inhomogeneous inversion heat diffusion. Zhuo and Sim [10] calculated defocus blur amount from the ratio between the gradients of input and reblurred images at edge locations, then obtained a full defocus map by propagating the blur amount at edge locations to the entire image. In this Letter, we propose a different and effective defocus estimation method from a single image captured by an uncalibrated conventional camera. Due to the fact that the amount of blur can be estimated reliably only in areas of an image that has significant frequency content [3], we focus on the spectrum contrast at edge locations to estimate defocus blur amount and then obtain the full defocus map by a blur propagation process. In particular, we take into account the chromatic aberration caused by wavelength-dependent variation of the index of refraction of lens to reduce the error of edge detection. In order to remove high-frequency noise and texture ambiguity, a Gaussian filter with small kernel is used before calculating spectrum contrast. Our defocus map is more accurate and reliable compared to the results of other various state-of-the-art methods.
Tang et. al. REF utilizes spectrum contrast to estimate defocus amount at edge locations.
Defocus map estimation from a single image via spectrum contrast.
Optics letters
Optics letters
Physics Medicine