FlattenBackground

Syntax

Document.FlattenBackground()

Parameters

None

Returns

Nothing

Remarks

Removes or reduces variability in the background level across the image, such as is caused by moonlight, light pollution, or vignetting in the optical system. FlattenBackground works by estimating the background level at different points in the image, fitting a two-dimensional polynomial to those values, and evaluating and subtracting the polynomial from every pixel.

FlattenBackground can be misled by large nebulae, galaxies, etc., which occupy a significant part of the image. It is best applied to star fields. RemoveGradient will often handle linear gradients better in the presence of foreground objects.

This method is equivalent to the Auto Flatten Background command.