Data Spike Removal for Images

Version 1.0.4 (4.56 KB) by Evan Czako
Rectifies pixel data spikes in images with adjustable threshold.
116 Downloads
Updated 22 Nov 2019

This code is intended to mitigate speckle noise, salt-and-pepper/impuse noise, and otherwise spikey data in images. Its intended application is image data that contains a scattering of pixels that have sharp intensity values differing significantly from those of their neighboring pixels. This type of noise is a common artifact of interferograms and radar images. Note that this function may not be an effective method of reducing other types of noise or image artifacts.

The code functions by identifying the nearest neighbors of each pixel and calculating the mean and standard deviation values of those neighbors. If the pixel of interest is further than a user-set threshold of standard deviations away from the mean value of its neighboring pixels, it will be considered a data spike. It will then be removed and replaced using the regionfill function of the Image Processing Toolbox.

NOTE: If you do not have the Image Processing Toolbox, you should replace the call to the regionfill function in this code with a call to my fill_region function (included in this folder), which accomplishes the same task with comparable computational efficiency. Either will run reasonably quickly, even for higher-resolution images.

Please read function descriptions for full instructions on their use. Please see examples embedded in function descriptions for demonstrations of use.

Cite As

Evan Czako (2024). Data Spike Removal for Images (https://github.com/EvanCzako/image-spike-removal), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.0.4

Connected to GitHub.

1.0.3

Fixed error in file

1.0.2

check

1.0.1

Changed function name to remove_spikes

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.