noise removal by setting a threshold
Afficher commentaires plus anciens
I have a RGB image ,i have to remove noise in it by setting a theshold value please help
Réponse acceptée
Plus de réponses (1)
Wayne King
le 22 Déc 2012
Modifié(e) : Wayne King
le 22 Déc 2012
What do you mean by remove noise by setting a threshold. Normally, in a noisy image model, the value at a particular pixel is assumed to be signal plus noise. To simply set the threshold in the image domain, would therefore remove signal. The usual practice for denoising images is to threshold in a different representation of the image (wavelet domain or frequency domain), then invert the thresholded values. For example, if you have the Wavelet Toolbox, you can denoise an RGB image by obtaining the 2-D wavelet transform, thresholding the wavelet coefficients and inverting.
Below is an example with an image which isn't noisy but the general process is illustrated. There are utilities in the Wavelet Toolbox fo determing "optimal" thresholds.
X = imread('arms.jpg');
wname = 'sym4';
level = 4;
sorh = 's'; % Specified soft or hard thresholding
thrSettings = [...
4.658112694014694 4.374202852603576 4.092379407660262 3.815939516130920 ; ...
4.658112694014694 4.374202852603576 4.092379407660262 3.815939516130920 ; ...
4.658112694014694 4.374202852603576 4.092379407660262 3.815939516130920 ...
];
roundFLAG = true;
[coefs,sizes] = wavedec2(X,level,wname);
[XDEN,cfsDEN,dimCFS] = wdencmp('lvd',coefs,sizes, ...
wname,level,thrSettings,sorh);
if roundFLAG , XDEN = round(XDEN); end
if isequal(class(X),'uint8') , XDEN = uint8(XDEN); end
2 commentaires
Era Islam
le 25 Mai 2018
Sir, can you please send me the full code with explanation? I really need this
Wehad Alshehri
le 17 Fév 2020
Can you send it to me please?
Catégories
En savoir plus sur Adaptive Filters dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!