4.66667

4.7 | 3 ratings Rate this file 327 downloads (last 30 days) File Size: 5.82 KB File ID: #25634

1-D to N-D robust smoothing

by Damien Garcia

 

22 Oct 2009 (Updated 17 Nov 2009)

Code covered by BSD License  

SMOOTHN allows fast and robust smoothing in one and higher dimensions w/wo missing values

Download Now | Watch this File

File Information
Description

SMOOTHN(Y) automatically smoothes the uniformly-sampled array Y. Y can be any N-D noisy array (time series, images, 3D data,...).

SMOOTHN can deal with missing (NaN) values (see screenshot, top panels).

SMOOTHN(...,'robust') carries out a robust smoothing that minimizes the influence of outlying data (see screenshot, bottom right panel).

SMOOTHN is made automated by the minimization of the generalized cross-validation score.

Enter "help smoothn" in the Matlab command window for complete instructions and 1-D to 3-D examples.

------
Here is an example that requires the Image Processing Toolbox. The example below applies SMOOTHN to an image of Saturn that has had Gaussian noise added.

% Read the "Saturn" image from Matlab
I = rgb2gray(imread('saturn.png'));

% Add Gaussian noise to the image
J = imnoise(I,'gaussian',0,0.025);

% Remove the noise using the SMOOTHN function.
% Let SMOOTHN choose the amount of smoothness automatically
K = smoothn(J);
K = uint8(K); % back to 8-bit integer format

% Now check the result
subplot(121), imshow(J), title('Noisy Saturn')
subplot(122), imshow(K), title('Denoised Saturn')

------
Other 1-D to 3-D examples are given in:
http://www.biomecardio.com/matlab/smoothn.html
-----
For details about the algorithm, refer to:
http://www.biomecardio.com/pageshtm/publi/csda09.pdf
-----

MATLAB release MATLAB 7.5 (R2007b)
Zip File Content  
Other Files license.txt,
smoothn.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
23 Oct 2009 Carlos Adrian Vargas Aguilera

Welcome back!

30 Oct 2009 Xianmin

Good job!

31 Oct 2009 Jan Simon

H1 line, really descriptive help, examples, date and author mentioned, comments in the code, referenced method, and finally it works well.

Please login to add a comment or rating.
Updates
30 Oct 2009

An example has been added

17 Nov 2009

The "upsample" option has been removed

Tag Activity for this File
Tag Applied By Date/Time
image processing Damien Garcia 23 Oct 2009 10:34:07
signal processing Damien Garcia 23 Oct 2009 10:34:08
statistics Damien Garcia 23 Oct 2009 10:34:08
smooth Wolfgang Schwanghart 18 Nov 2009 03:06:56
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com