Patent ID: 7095904

Claim:
A method of determining a best focus position of an object relative to a reference position in an optical imaging system, comprising the steps of: a) forming a dark-field image of the object at different focus positions, each said dark-field image having a corresponding image intensity distribution with an average intensity and a variance of intensity; b) forming a set of contrast values by calculating a contrast value for each said dark-field image based on said variance and said average intensity; and c) determining the best focus position by fitting a Lorentzian function to said set of contrast values plotted as a function of said different focus positions; wherein said step b) further includes the steps of: d) digitizing each said dark-field image such that said image intensity distribution for each said dark-field image is a digitized image intensity distribution comprising discrete gray-scale intensity levels I n corresponding to a discrete plurality of n pixels; and e) arranging each said digitized image intensity distribution into a histogram, H(I n ), of an amount of said pixels having a given said gray-scale intensity level, I n .