An apparatus for controlling automatic focus, comprising: (a) a computer processor configured for controlling an imaging device and associated focus control element; and (b) one or more memories comprising programming executable by said computer processor for carrying out an autofocusing process comprising: (i) capturing object images; (ii) estimating depth between captured image pairs to arrive at a depth estimation, wherein each image of the pair is taken at a different focus position, and estimating the depth is based on determining an amount of blur difference between each captured image within the image pair, the blur difference between each two captured pictures being used with a calibrated blur matching curve model to estimate the depth, wherein the calibrated blur matching curve model for a given depth is obtained from blur matching results of a step edge image sequence; (iii) performing slope correction between a blur matching curve of a natural scene and the calibrated model using an adaptive model fitting algorithm to either adaptively adjust the slope of the blur matching curve of the natural scene to fit the calibrated model or to adjust the slope of the calibrated model to fit the blur matching curve of the natural scene; (iv) determining a weighted mean of depth estimations and variance which spans both past and present depth estimations; and (v) adjusting focus with a focusing movement performed in response to said weighted mean of the depth estimations. (a) a computer processor configured for controlling an imaging device and associated focus control element; and (b) one or more memories comprising programming executable by said computer processor for carrying out an autofocusing process comprising: (i) capturing object images; (ii) estimating depth between captured image pairs to arrive at a depth estimation, wherein each image of the pair is taken at a different focus position, and estimating the depth is based on determining an amount of blur difference between each captured image within the image pair, the blur difference between each two captured pictures being used with a calibrated blur matching curve model to estimate the depth, wherein the calibrated blur matching curve model for a given depth is obtained from blur matching results of a step edge image sequence; (iii) performing slope correction between a blur matching curve of a natural scene and the calibrated model using an adaptive model fitting algorithm to either adaptively adjust the slope of the blur matching curve of the natural scene to fit the calibrated model or to adjust the slope of the calibrated model to fit the blur matching curve of the natural scene; (iv) determining a weighted mean of depth estimations and variance which spans both past and present depth estimations; and (v) adjusting focus with a focusing movement performed in response to said weighted mean of the depth estimations. (i) capturing object images; (ii) estimating depth between captured image pairs to arrive at a depth estimation, wherein each image of the pair is taken at a different focus position, and estimating the depth is based on determining an amount of blur difference between each captured image within the image pair, the blur difference between each two captured pictures being used with a calibrated blur matching curve model to estimate the depth, wherein the calibrated blur matching curve model for a given depth is obtained from blur matching results of a step edge image sequence; (iii) performing slope correction between a blur matching curve of a natural scene and the calibrated model using an adaptive model fitting algorithm to either adaptively adjust the slope of the blur matching curve of the natural scene to fit the calibrated model or to adjust the slope of the calibrated model to fit the blur matching curve of the natural scene; (iv) determining a weighted mean of depth estimations and variance which spans both past and present depth estimations; and (v) adjusting focus with a focusing movement performed in response to said weighted mean of the depth estimations.