noise removal by setting a threshold
Show older comments
I have a RGB image ,i have to remove noise in it by setting a theshold value please help
Accepted Answer
More Answers (1)
Wayne King
on 22 Dec 2012
Edited: Wayne King
on 22 Dec 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 Comments
Era Islam
on 25 May 2018
Sir, can you please send me the full code with explanation? I really need this
Wehad Alshehri
on 17 Feb 2020
Can you send it to me please?
Categories
Find more on Multirate and Multistage Filters in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!