1. A method of estimating an optimal focus position for capturing an image, comprising: determining an initial lens positions dataset; calculating a score for each value of said initial lens position dataset producing a plurality of scores; and performing an interpolation and an extrapolation to determine an estimated optimum focus position by relating said initial lens position dataset to a score dataset, wherein said score dataset comprises said plurality of scores.