A method of estimating an in-focus level of a target in an image scanning apparatus, the target comprising a biological specimen, wherein the image scanning apparatus comprises a first line scan detector configured to obtain one or more image scan lines of the target and a second line scan detector configured to obtain one or more focus scan lines of the target, the method comprising the following steps: (i) obtaining at least one image scan line of the target using the first line scan detector , each at least one image scan line being obtained at a respective focus level; (ii) obtaining at least one focus scan line of the target using the second line scan detector , each at least one focus scan line being obtained at a respective focus level; (iii) calculating a focus merit value for each of the first line scan detector and the second line scan detector using the respective at least one image scan line and at least one focus scan line, the focus merit value providing a numerical value which is dependent upon the amount of fine detail within the image, the focus merit value having a maximum value representing an in-focus level; (iv) estimating a nominal in-focus level of the target using the calculated focus parameters; (v) adjusting the focus level of the first line scan detector to the nominal in-focus level; (vi) moving the target relative to the first and second line scan detectors so as to cause the first line scan detector to obtain image information from another location on the target; and (vii) repeating steps (i) to (vi) so as to form a swathe from image scan lines obtained using the first line scan detector from a number of locations upon the target, wherein the focus level of the first line scan detector is adjusted to the nominal in-focus level in real time during the formation of the swathe such that the image scan lines within the swathe are obtained at different focus levels; characterised in that the focus level of the at least one image scan line is different from the focus level of the at least one focus scan line. (i) obtaining at least one image scan line of the target using the first line scan detector , each at least one image scan line being obtained at a respective focus level; (ii) obtaining at least one focus scan line of the target using the second line scan detector , each at least one focus scan line being obtained at a respective focus level; (iii) calculating a focus merit value for each of the first line scan detector and the second line scan detector using the respective at least one image scan line and at least one focus scan line, the focus merit value providing a numerical value which is dependent upon the amount of fine detail within the image, the focus merit value having a maximum value representing an in-focus level; (iv) estimating a nominal in-focus level of the target using the calculated focus parameters; (v) adjusting the focus level of the first line scan detector to the nominal in-focus level; (vi) moving the target relative to the first and second line scan detectors so as to cause the first line scan detector to obtain image information from another location on the target; and (vii) repeating steps (i) to (vi) so as to form a swathe from image scan lines obtained using the first line scan detector from a number of locations upon the target, wherein the focus level of the first line scan detector is adjusted to the nominal in-focus level in real time during the formation of the swathe such that the image scan lines within the swathe are obtained at different focus levels; <EOS>