Bad Pixel Removal

Features:

Enables rapid removing of spikes from the dataset

Bad pixel removal is a common preprocessing step for hyperspectral datasets to remove pixels that are noisy or have other artifacts. One way to do this is to use a median filter to smooth the data and identify pixels that are more than a certain distance from the median.

Steps:

Select Edit Bad Pixel Removal.

In the dialog box enter the Median average value n that will perform (n × n), the default value is 3.

Enter Median absolute deviation (MAD) for each pixel using the median function. The algorithm identifies bad pixels as those that are more than m MADs from the median, the default value is 5.

The completion of the algorithm will be notified with the message box. 

The example below shows the effect of Bad Pixel Removal different values on the dataset. A vertical line can be mostly removed by this function.

Click Reset to return to the original dataset.

 

Additional Information:

This algorithm first applies a median filter to each individual band of the dataset using function. The resulting filtered data is temporarily stored. The algorithm then calculates the Median and Median absolute deviation (MAD) for each pixel using the median function. The algorithm identifies bad pixels as those that are more than m MADs from the median, and replace them with the median value. Finally, the algorithm displays the corrected hyperspectral image.

The median absolute deviation (MAD) is a robust measure of variability or dispersion of a dataset. It is defined as the median of the absolute deviations of the data points from the median of the dataset. In other words, it measures the average distance of each data point from the median. MAD is calculated using the following formula:

MAD = median(|xi - median(X)|)

where X is the dataset, xi is the i-th data point, and |.| denotes the absolute value.

MAD is a useful measure of dispersion when the dataset contains outliers or is not normally distributed. It is less sensitive to extreme values than the standard deviation, which makes it a better choice for skewed or heavy-tailed distributions. MAD is often used in conjunction with the median to estimate the spread of a dataset. In hyperspectral data analysis, the median ± m × MAD is used to define the range of "normal" values, where m is a scaling factor chosen to reflect the variability of the dataset.

 

Previous
Previous

Macros

Next
Next

View a heatmap