Background and Gradient Removal

Often we are taking images under less than ideal circumstances. Light pollution, full moon, and other effects can cause a large variation in the background across the image plane. A bright background, which otherwise could be simply subtracted, may become highly visible if there is vignetting in the optical system, which causes a fall-off of brightness towards the edges of the frame.

Simple gradients can be effectively removed by creating an artificial image containing only a smooth plane, with a slope matching that of the background of your image. If you then subtract this artificial image from your image, the background will be leveled out and the gradient eliminated.

The Flatten Background command does exactly this, when Background Fit is set to Simple (bilinear). Areas of the image that contain only background are first identified. Measurements are made in each area, and then a plane is fitted to the data. Finally this plane is subtracted off, eliminating the gradient. The measurements can be made automatically, but it is difficult for the software to determine which areas contain only background. It is always best to specify these areas manually using the mouse. Point the mouse at the image and, using the right-click menu, set a medium aperture size – large enough to collect a good sample of background, but not so large that it will be hard to fit in-between the stars. Now click on a few widely spaced areas of the image that are obviously background, and then click OK.

If you have vignetting, the light level will fall off towards the edges. In some cases you may have glows with an odd pattern, due to a light leak or readout amplifier glow. The Flatten Background command also allows you to correct for this. Set Background Fit to Complex (8th order). First select a dozen or so points around the image, then turn on the Auto Full Screen preview. Do not turn on the preview at first, otherwise when you have just a few points, the poorly-constrained model may make it difficult to see what you are doing. If parts of the image background still look to bright or too faint, add measurement points in those regions. If you click in the wrong spot, grab the circle with the mouse and move it. Once the image background looks smooth and level, click OK to make the changes permanent.

The strong gradients associated with light pollution can cause color gradients in the image background. The Remove Background Color command can help reduce the impact of color gradients.