[Go to Previous] [Go to Next]


Description of Formulas - Image Filters

The following describes each formula included in the Image Filter Formulas section of McIDAS-V.

Note: All of these formulas utilize a Select Input window to enter values to be used by the formula. You can choose if you want to save these values in a bundle if you wish to create one. Each field of the Select Input window has a Save in Bundle option (chosen by default). If you keep this option selected, the value(s) you choose will be stored in the bundle, and if all values are saved, the formula will automatically execute when you load in your bundle without any user input. If you do not save the values in your bundle, the values you use will not be saved, and the formula will not automatically execute without requiring the user to enter/change values.

Clean Image Filter (fill, bline, eline, pdiff, ldiff)

This formula cleans an image by first applying a shot noise filter to each element in the source region, and then locating and replacing bad lines. Each element is compared to the elements on either side and replaced if the values are significantly different. The average value of each line is then compared to the lines above and below and replaced if it is significantly different.

Input Parameter Definition

fill

'Average': average of surrounding values (default).

'Min': source dataset minimum value.

'Max': source dataset maximum value.

bline

The beginning line in the source image region (default=first line).

eline

The ending line in the source image region (default=last line).

pdiff

The maximum percentage of the product range to allow before a new value for the pixel is derived using the average of two adjacent pixels (default=15).

ldiff

The minimum percentage of the product range to allow before a new value for the pixel is derived using the average of two adjacent pixels (default=15).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Cloud Image Filter (replace, constant)

This formula applies a cloud filter to an image by comparing each element to the elements of another image. Use this filter to mask off a portion of the first source image.

Input Parameter Definition

replace

The replacement value (default=minimum value in either sdataset).

constant

The additive constant (default=0).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Core Image Filter (brkpoint1, brkpoint2, replace1, replace2)

This formula applies a core filter to two images by comparing elements to breakpoints. The resulting image has only two values.

Input Parameter Definition

brkpoint1

sdataset1 breakpoint value (default=minimum value in either source dataset).

brkpoint2

sdataset2 breakpoint value (default=maximum value in either source dataset).

replace1

success condition replacement value (default=maximum value in either source dataset).

replace2

failure condition replacement value (default=minimum value in either source dataset).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

if (sdataset1 > brkpoint1) and (sdataset2 > brkpoint2)
then ddataset = replace1
else ddataset = replace2

Discriminate Image Filter (brkpoint1, brkpoint2, brkpoint3, brkpoint4, replace)

This formula applies a discriminate filter to two images by comparing elements in each image to different high and low breakpoints. Use this filter to mask off a portion of the first source image.

Input Parameter Definition

brkpoint1

The low end breakpoint value for sdataset1 (default=minimum value in either sdataset).

brkpoint2

The high end breakpoint value for sdataset1 (default=maximum value in either sdataset).

brkpoint3

The low end breakpoint value for sdataset2 (default=minimum value in either sdataset).

brkpoint4

The high end breakpoint value for sdataset2 (default=maximum value in either sdataset).

replace

The replacement value (default=minimum value in either sdataset).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

if (brkpoint1 < sdataset1 < brkpoint2) and (brkpoint3 < sdataset2 < brkpoint2)
then ddataset = sdataset1
else ddataset = replace

Gradient Image Filter

This formula applies a gradient filter to the source image.

Input Parameter Definition

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

ddataset = ABSOLUTE(sdatasetn - (sdatasetn+1))

High Pass 2D Image Filter

This formula applies a two-dimensional high-pass filter to each element in the source image. It eliminates low-frequency deviations by clustering them around the distribution's midpoint. A sample average is calculated by the program using values in a two-dimensional region around the source element.

Input Parameter Definition

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

ddataset = (sdataset - (sample average ) + (sample midpoint))

High Pass Image Filter (radius, leak)

This formula applies a one-dimensional high-pass filter to each element in the source image. It eliminates low-frequency deviations by clustering them around the distribution's midpoint. A sample average is determined using values on either side of the source element and the percentage of filter efficiency.

Input Parameter Definition

radius

The sample length surrounding the source element; used for sample average (default=50).

leak

The filter efficiency (default=100).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

ddataset = (sdataset - (sample average) + (sample midpoint))

Hole Image Filter (brkpoint1, brkpoint2)

This formula searches for missing data and fills the holes in the image using the average of the surrounding element values.

Input Parameter Definition

brkpoint1

The low end breakpoint value (default=minimum sdataset value).

brkpoint2

The high end breakpoint value (default=maximum sdataset value).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

if (brkpoint1 < sdataset < brkpoint2)
then ddataset = (average of the surrounding sdataset element values)
else ddataset = sdataset

Low Pass 2D Image Filter (linecoef, elecoef)

This formula applies a two-dimensional low-pass filter to each element in the source image. It eliminates high-frequency deviations by replacing the source image data values with the average of the values in the sample defined with the line and element coefficients.

Input Parameter Definition

linecoef

The line coefficient; 0.0 < linecoef < 1.0 (default=0.5).

elecoef

The element coefficient; 0.0 < elecoef < 1.0 (default=0.5).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

ddataset = (sample average)

Low Pass Image Filter (radius, leak)

This formula applies a one-dimensional low-pass filter to each element of the source image. It eliminates high-frequency deviations by replacing the source image data values with the average of the values on either side of the source element. The sample average is determined using the percentage of filter efficiency.

Input Parameter Definition

radius

The sample length in pixels surrounding the source element; used for sample average (default=50).

leak

The filter efficiency (default=100).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

ddataset = (sample average)

Merge Image Filter (brkpoint1, brkpoint2, constant)

This formula merges two images by selecting the sdataset1 value for each element if its value is between the specified breakpoints. Otherwise, it selects the sdataset2 value minus the specified constant.
Input Parameter Definition

brkpoint1

The low end breakpoint value (default=minimum sdataset value).

brkpoint2

The high end breakpoint value (default=maximum sdataset value).

constant

The subtractive constant (default=0).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Replace Image Filter (New Value, Old Value)

This formula replaces selected elements in the defined region of the source image with the specified replacement value.

Input Parameter Definition

New Value

The replacement value (default=0).

Old Value

The source image values in the region to replace with outval; specify values in the list format, e.g., val1 val2 val3 etc., and/or a range format, e.g., bval-eval (default=0-255).

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

if sdataset lies outside the region defined by the line and element ranges
then ddataset = sdataset
else ddataset = replaceVal

Shot Image Filter (bline, eline, pdiff)

This formula cleans an image by applying a shot noise filter to each element in the source image. Each element is compared to the elements on either side and replaced if the values are significantly different.

Input Parameter Definition

bline

The beginning line in the source image to clean (default=first line).

eline

The ending line in the source image to clean (default=last line).

pdiff

The maximum percentage of the product range to allow before a new value for the pixel is derived using the average of two adjacent pixels (default=15)

stretch

The stretch applied to the data, either Histogram or Contrast (default=Histogram).

BT Min

The minimum brightness value for calibration (default=0).

BT Max

The maximum brightness value for calibration (default=255).

Equation for each ddataset element:

if the difference between sdataset and the surrounding elements is < pdiff
then ddataset = sdataset
else ddataset = (average of the surrounding sdataset element values)


[Go to Previous] [Go to Next]