n the image gradient, pixel count, power, variance, entropy, and autocorrelation. The best functions produce a single maximum with a sharp peak when the image is in focus, have a large range between the local minima on either side of the maximum, and are robust to noise in the image.</p>

<p>Here, the image sharpness is estimated using the function <code><a href="sharpness.html">sharpness</a></code>. This implements three focus functions that generally perform well: the Brenner gradient, the Tenenbaum gradi