Image Combining Methods


Mira provides many mathematical choices for combining a set of images. This command produces a final image in which the pixel at each coordinate is a mathematical combination of the pixels at the same coordinate in all of the source images.

In considering the combining methods described below, keep in mind that each method works by processing all the values at each (column,row) location in turn. At each point, the value is drawn from each image and combined using the selected method to create 1 output pixel. This is repeated for each point until the entire image is processed.

Averaging Methods

These methods vary from simple linear pixel merging methods to non-linear weighted averaging methods. Use them to combine images into a single, higher image having higher signal-to-noise ratio.

 

Mean

Creates an image containing the arithmetic mean value over all images at each point. The Mean method combines the pixels as a straight average with no weighting or rejection of bad values. This is the preferred method if the images can be considered to contain only well-behaved statistical noise.

Mean - Keyword weighted

Weights the images by the value of a keyword loaded from the image headers. For example, this might be used to weight by exposure time using the EXPTIME keyword. The keyword name can be specified and does not have to be a "standard" name.

Mean - Geometric

Computes the geometric mean value at each point. Use this to de-weight pixels more distant from the mean. This decreases the effect of deviant pixels while including them in the combined value rather than rejecting them. Using n images, this method computes the product of all pixel values raised to the 1/n power.

Mean - Contra Harmonic

Computes the contra-harmonic mean value at each point. This method decreases the effect of distant pixels in the tail of the Gaussian distribution by including them in a statistically more significant result than would be obtained by rejecting them from the sample. The combined value is based upon a nonlinear sum over all images using pixel value x and exponent, e, as

  x ^ (e+1) / x ^ (e).

A non-zero exponent biases the mean toward higher or lower values. An exponent e > 0 selectively emphasizes values higher than the mean, whereas e < 0 emphasizes values lower than the mean.

For example, a value e=2 does a good job when 10% of the images have negative outlying points.

Mean - Yp Weighted

Computes the power-weighted mean value at each point. This method decreases the effect of distant pixels in the tail of the Gaussian distribution by including them in a statistically more significant result than would be obtained by rejecting them from the sample. The historical name "Yp Mean" derives from raising "value x to the y power".

A non-zero exponent biases the mean toward higher or lower values. An exponent Yp = 0 gives a normal unweighted mean. A power Yp > 0 selectively emphasizes pixels higher than the mean, whereas Yp < 0 emphasizes pixels lower than the mean.

Mean - Masked by 0

Creates an image containing the mean value of pixels from all images except those with a value of 0, which are interpreted as "don't use". Pixels with a value of zero are not included in calculating the mean value. See the Register Images command for an application of this method. This also can be used in combination with the Clean Image Set and Apply Pixel Mask commands.

Sum of Values

Creates an image containing the sum of the values from all images at each point. If using this method, be sure the output data type has greater sufficient numeric range to handle the resulting values. For example, combining 100 16-bit images having peak luminance of 50,000 may result in some output pixels being as high as 5,000,000. Clearly 5,000,000 is not within the 0-65535 range of a 16 bit unsigned integer image. To handle this change the output data type to 32 bit integer or 32 bit real.

 

Rejection Methods

These methods remove deviant pixels from the sample at each point. The result is a "cleaner" image of higher signal-to-noise ratio and without abnormally bright or dark values. Use these methods to combine images when some of the pixel values are not from the same statistical population as the majority.

 

Mean - Alpha Clipped

Computes the mean value after rejecting a fixed number of values at the top and bottom of the pixel value distribution. For example, with n = 20 images and using High Alpha = 2 and Low Alpha = 4, the combined value is computed from the 14 remaining values after rejecting the 2 highest values and the 4 lowest values at each point. This is a general case of the Min/Max clipping method. Here, you specify the number of high values to clip and the number of low values to clip. In comparison, the Min/Max method rejects only the 1 highest and 1 lowest values.

Mean - Max Clipped

Creates an image with the highest value discarded from the average at each point. For a sample of n images, then, each resulting pixel value is the mean value of 19 values. Use this method when there is a good likelihood of a single outlying point, such as a cosmic ray or radioactive decay detection at any point.

Mean - Min/Max Clipped

Creates an image containing the mean value at each point after rejection of the minimum and maximum values. At each point, the minimum and maximum values are not included in computing the mean value. This is an excellent way to remove noise by discarding only 2 of the total number of images being combined. In this method, even the statistically insignificant deviations, or "true noise" at the extremes are rejected from the mean value. This method works well for bad pixel rejection using a large number of images in which it is likely that a dark or bright non-noise pixel is likely to be found at most locations. If the number of images is small, e.g., < 5, do not use this method.

Mean - Sigma Clipped

Creates an image containing the sigma-clipped mean value over all images at each point. Sigma clipping discards high and low extreme values in a way you can control with the clipping parameters. This method requires a large number of images, on the order of 20 or more in order to compute good clipping criteria at each coordinate.

Mean - Modified Trimmed

Computes the Modified Trimmed Mean, which is a hybrid of the sigma clipped mean and median methods.

Mean - Rank Clipped

Computes the mean value including only the values inside specified rank limits. For example, usingUpper Rank = 2.0 and Lower Rank = 5.0 rejects pixel values in the upper 2 percentile and in the lower 5 percentile of the sample.

 

Ranking Methods

These methods create a single image in which each point contains the ranked value of pixels in all images.

 

Median

Creates an image containing the median values of all images at each point. This method has good ability to reject extreme values. For a given number of input images, the noise in the resulting image is not as low as that which can result from Mean combining methods.

Minimum

Creates an image containing the minimum value of all images at each point. This is a good way to bright artifacts that affect a large fraction of the images at the same coordinates. For example, if 5 of 8 images have large bright areas or defects, you can remove them using this method. The advantage over simply throwing away the 5 images is that there can still be some filtering done to areas that do not show the bright defects.

Maximum

Creates an image containing the maximum value of all images at each point.

Rank Statistic

The rank statistic selects the pixel with the desired percentile value from the population of pixels at each location. For example, the median method selects the pixels with 98th percentile rank and the minimum method selects pixels with 0-th percentile rank. The Rank Statistic method can select any of these by setting the percentile to value in the range of 0 to 100.

 

Other Methods

These operations combine images to show differences or particular details from among the image set. For example, the combined image may contain the range of values in the image set at every point.

 

Range of Values

Creates an image in which each pixel value is the numeric range between the minimum and maximum values of all images at that point. This method is useful for showing the variation among images at each location.

Range - Min/Max Clipped

Creates an image in which each pixel value is the numeric range between the clipped minimum and maximum values of all images at that point. Use this method to estimate the range when there is a high likelihood of outlying positive or negative values at any point.

Standard Deviation

Creates an image containing the standard deviation among pixels at each point. This method is useful for showing the variation among images at each location.

Standard Deviation - Clipped

Creates an image of the standard deviation at each pixel position, but excludes both the highest and lowest values at each point. This is useful for measuring the variation among images when the images contain randomly located transients such as cosmic ray events. In addition, if a "dithered" set of images is registered before using this command, it gives the standard deviation independent of fixed pixel artifacts such as hot and cold pixels and other defects that end up at different coordinates after registration. Since this method discards the minimum and maximum values, it requires at least 5 images.

 

Related Topics

Combine Images, Register Images, Image Region Statistics, Clean Image Set