Focus Measurement Settings

image0Enable

Enable measurement of focus quality for each image.

Gap

For methods 2 and 3, this is the number of pixels to use between background pixels and current pixel. Not used for method 1.

Noise Threshold

When measuring the difference between background and current pixel, ignore any differences below this noise threshold value.

Box %

Specify the size of the measurement window to use as a percentage of the whole image. Window is centred. The average over the whole window is used.

The measurement window + 2 x gap must be larger than the image size otherwise no measurement is made.

Method

Focus measurement method to use:

0: no measurement.

1: difference between adjacent pixels squared. F = ( px – px-1 )2

2: use two background pixels, at x-gap, and x+gap. F = p(x-gap,y) + p(x+gap,y) – 2 p(x,y)

4: use four background pixels, at x-gap, x+gap, y-gap, and y+gap.

F = p(x-gap,y) + p(x+gap,y) + p(x,y-gap) + p(x,y+gap) – 4 p(x,y)