Skip to main content

ImageFocus

ImageFocus [/ED=edepth /METH=method /Q/Z] stackWave

The ImageFocus operation creates in focus image(s) from a stack of images that contain in and out of focus regions. It computes the variance in a small neighborhood around each pixel and then takes the pixel value from the plane in which the highest variance is found. The computed 2D in-focus image is saved in the wave M_ImageFocus in the current data folder or in the wave specified by the /DEST flag.

Flags

/DEST=destWave
Specifies the output wave.
It is an error to specify the same wave as both stackWave and destWave.
When used in a function, ImageFocus creates a real wave reference for the destWave. See Automatic Creation of Wave References for details.
/DEST flag was added in Igor Pro 10.00.
/ED=edepthSets the effective depth in planes. For example, an effective depth of one means that it computes the best focus for each plane using a stack of three planes, which includes the current plane and any one adjacent plane above and below it. Does not affect the default method (/METH=0).
/FREECreates destWave as a free wave.
/FREE is allowed only in functions and only if destWave is a simple name or wave reference structure field.
See Free Waves for more discussion.
The /FREE flag was added in Igor Pro 10.00.
/METH=methodSpecifies the calculation method.
method =0:Computes a single plane output for the stack (default).
method =1:Computes the best image for each plane using /ED.
/QQuiet mode; no output to history area.
/ZNo error reporting.

See Also

Image Processing