Correct Background


The Correct Background command computes a polynomial fit to an image surface and applies the fit to the image. The fit may be subtracted from the image or divided into the image to flatten the image background. You also can choose to store the fit surface in the image data if you want to save the surface as a separate image.

Properties of the Correct Background Command

Profile

Selects the parameter profile for this command.

[Select]

Selects the source images from an image window, folder, files, pattern, or a file list.

Image

Select the image or image set to process from the drop list.

Column Terms

Select the number of polynomial terms to fit data in the horizontal direction.

Row Terms

Select the number of polynomial terms to fit data in the vertical direction.

Operation

Choose the operation you want to apply:

Subtract Fit: The surface fit is subtracted from the image. The removes additive effects, like scattered light.

Divide Fit: The surface fit is divided into every pixel of each image. Mira automatically converts the output image(s) to a real pixel type to handle the non integral luminance values that result from the division. This corrects multiplicative effects, like vignetting or sensitivity.

Replace Fit: The surface fit is replaced into the image array.

 Conserve central value

Check this box if you want the resulting image to have a similar signal level before and after subtracting or dividing the fit. Otherwise the result will end up with a typical signal near zero after subtracting the fit, or near 1 after dividing the fit.

Source Region

Specifies a rectangular region to be avoided when sampling the image values. The options are as follows:

None - Use All: The entire image is processed with no exclusion rectangle.

Image Cursor: The region to be excluded is selected using the Image Cursor .

Rectangle: The region specified by Min and Max limits for Column and Row coordinates is excluded.

Column and Row, Min and Max: When Rectangle is selected, these values specify the column and row limits to be excluded.

Overview of Background Fitting

This command calculates and (optionally) corrects either an additive effect, like scattered light, or a multiplicative effect, like vignetting, by fitting and applying a polynomial surface to the image. The polynomial ranges from 1x1 to 10x10 (100 terms). Clearly, 1x1 represents a constant value, but 1x2 and 2x1 represent a slope parallel to 1 axis. A 2x2 polynomial models a warped plane. A 3x3 fit involves a paraboloid and often is a good starting point for correcting calibrated images that appear to show poorly corrected vignetting which results from the optical axis shifting relative to the flat field images.

In general you should use the lowest order that adequately flattens the background. The quality of the correction can be assessed by carefully examining the image at high contrast or after adjusting the palette, by making a contour plot, or by evaluating horizontal and vertical cross sectional plots at various places on the image (see the example, below).

Example

The following example shows the power of this command by correcting an extreme example of background curvature. The "before" image below shows a flat field frame, which was selected because it had a large amount of background curvature:

 

Below are shown cross sectional plots which illustrate the degree of non-flatness in the image. Black curves show the original image, red shows the corrected image. The small dips in the upper curves are caused by dust shadows on the flat field image and are not related to the background curvature. The data were over-plotted using the Plot Series Properties command and the Copy+Paste capability of Plot windows.

The "after" image below shows the result of correcting the background using the Conserve signal as image center option. In this view, the palette was stretched to high contrast for close evaluation of the image flatness. Notice that the deviations from flatness are now significantly below the noise level over all but the extreme edges of the image.

Related Topics

Math Commands