Salt and pepper noise removal

6 ビュー (過去 30 日間)
Luca Pecoriello
Luca Pecoriello 2019 年 12 月 11 日
回答済み: Gayathri 2025 年 1 月 3 日
Hi
I have a set of thermographic data in the form of pixel-pixel-time (third order tensor). At some point, I want to remove the salt and pepper noise from the data. So I am planning to a median filter, in particular I want to use the command
medfilt2
J = medfilt2(I,[m n]) performs median filtering, where each output pixel contains the median value in the m-by-n neighborhood around the corresponding pixel in the input image.
What could be standard criteria to define the size m and n?
I am working with black and white (grayscale) images (which are my thermal images).
From other analysis I know the size (in pixels) of an area where I could expect a possible defect. Maybe this sizes could become my m and n?
Greetings
Luca

回答 (1 件)

Gayathri
Gayathri 2025 年 1 月 3 日
I understand that you need to know how to select the values of hyperparameters, "m" and "n", while performing median filtering. These values are typically chosen through a process of trial and error. Some points to keep in mind while deciding the values would be
  • Consider the level of detail in your images. Larger filter sizes can smooth out noise but may also blur important features. Balancing noise reduction and detail preservation is key.
  • Ideally, the filter size should be smaller than the features you want to preserve to avoid altering them.
  • Start with a small filter size, such as '3x3' or '5x5' and gradually increase until you achieve a satisfactory balance between noise reduction and detail preservation.
Hope this helps!

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by