Using the XMP Filtering

XMP filtering allows you to perform post treatment on result maps to remove or balance noise, average the pixels' signal as well as smooth down irregularities.

Warning: Filtering is usually used to improve the rendering of the results but has an impact on measures. Indeed, the filtering algorithm modifies the value of each pixel with the values of its neighbors. For an accurate measurement, you should disable any filter as it can lead to measure bias.

Prerequisite: To apply a XMP Filtering, the XMP map must be at least a 3x3 pixels matrix. Otherwise the filtering may wrongly modify the result.

To access the filtering, click Filtering, XMP Filtering.

Note: The level of filtering is displayed in the status bar of the viewer. By clicking the filter value in the status bar, you can open the filtering box.

Pass Number

The Pass number allows you to determine how many times the filtering algorithm is called to be performed on the map.

A value of 0 means there is no filtering done on the map. N number of pass means that all pixels of the map have been post treated N times.

Types of Filter

Note: Depending on the map type, different types of XMP filtering are available.
Let's Consider a pixel of the map (Pixel 5 - Area 4). The pixel 5 represents the central pixel of a 3x3 matrix.



Important: In the Measures table, values are always interpolated. Calculations are done with Interpolate values deactivated. The values used are found hovering the mouse over each area:
Area Area Area_1 Area_2 Area_3 Area_4 Area_5 Area_6 Area_7 Area_8
Value 4904.31 2384.44 5130.92 3713.98 7472.28 3572.73 2561.59 5444.86 5054.8

None

When None is selected, no filtering is applied on the map, the data correspond to raw measurement data.

Each pixel keeps its raw data:

Average / Weighted Average

  • The Average filter allows you to balance the overall noise by replacing the pixel value by the average of its direct neighbors.

    The filter only uses neighbors without any considerations regarding values of these neighbors.

    Average formula:

  • For colorimetric or spectral maps, Average is replaced by Weighted Average.

    Weighted Average formula:



Remove Highest Peaks

The Remove highest peaks filter allows you to reduce noise by removing high values from the map.

This filter replaces a pixel value by the median value of its 8 direct neighbors if the initial pixel value is N times higher or lower than the neighbor's average.

N corresponds to the Threshold you need to define.

Example:

Pixel 5 value is compared to the average of the 8 pixels surrounding it (its 8 neighbors).

First, the two formula Average*N and Average/N are dedicated to create an interval.

Then:
  • Case 1: If P5 is inferior to Average/N (meaning it's not included in the interval), the filtering is applied to replace P5 value by the median value.
  • Case 2: If P5 is superior to Average*N (meaning it's not included in the interval), the filtering is applied to replace P5 value by the median value.
  • Case 3 : IF P5 is included in the interval, P5 is kept as it is.


Remove Highest Peak formula when P5 higher Remove Highest Peak formula when P5 lower Result
Result before filtering. Pixels with high values are visible and create noise on the result. Result after several passes of remove highest peaks algorithm.

Anisotropic

Warning: Anisotropic filtering should not be used for high dynamic images as it could generate problems and alter/change colors.

The Anisotropic filter algorithm allows you to avoid blur and help filter low dynamic images by computing the mean of neighboring pixels according an edge detection criteria.

It acts as if the pixels influence spreads on its neighbors circularly in uniform regions, and elliptically in edge regions to keep borders and object's edges in the image.

Filter shape when arriving near an image's border

At each diffusion pass, a diffusion step is applied in two directions.

  • In Min Diffusion box, you must type the minimal diffusion value. Minimal diffusion indicates the relative size of the smallest ellipse axis in the edge direction.
  • In Max Diffusion box, you must type the maximal diffusion value. Maximal diffusion indicates the relative size of the tallest ellipse axis in the orthogonal edge direction.
  • In Time step box, you must type the time step value. Time step is proportional to the number of pixels taken into account during filtering in each ellipse direction. It is according ellipse shape given by minimal and maximal diffusion.