A method and apparatus (10) for determining a best focus position of an
object (30) relative to a reference position (e.g., axis A) of a
dark-field optical imaging system (20), with an effective focusing range
up to 10 times of the depth of field of the system. The method includes
the steps of first forming a dark-field image of the object at different
focus positions (z.sub.m). Each dark-field image has a corresponding
image intensity distribution with an average intensity and a variance of
intensity. The next step is forming a set of contrast values by
calculating a contrast value (C.sub.m) for each dark-field image based on
the variance and the average intensity. The last step is determining the
best focus position by fitting a Lorentzian function to the set of
contrast values plotted as a function of the different focus positions
and identifying the focus position associated with the maximum contract
value (C.sub.max). The second step includes digitizing each dark-field
image such that the image intensity distribution for each the dark-field
image is a digitized image intensity distribution comprising discrete
gray-scale intensity levels (I.sub.n) corresponding to a discrete
plurality of n pixels, and then arranging each the digitized image
intensity distribution into a histogram (H(I.sub.n)) of an amount of the
pixels having a given the gray-scale intensity level (I.sub.n).