4.5

4.5 | 2 ratings Rate this file 5 Downloads (last 30 days) File Size: 1.92 KB File ID: #8174

SNN filter

by Arthur Barnes

 

01 Aug 2005 (Updated 02 Aug 2005)

Symmetric nearest neighbor edge-preserving filter.

| Watch this File

File Information
Description

This function implements the symmetric nearest neighbor filter, a 2D nonlinear filter that reduces noise in an image while at the same time preserving edge content. A code example follows:

RGB = imread('saturn.png');
I = rgb2gray(RGB);
J = imnoise(I,'gaussian',0,0.005);
Y = snn(J,5,true);

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
17 Mar 2006 jim grande

Hi,

I have the following problem with your program, trying the suggested example. I'm looking forward to hearing from you soon.

Best regards,

  Jim

??? Attempted to access X(3,1201); index out of bounds because size(X)=[1500,1200].

Error in ==> snn at 66
        Y(i,j) = mean([NNnearest X(i,j)]);

30 Mar 2006 nadia ihsan

AOA.how are you, i have seen your SSN filter but cannot understand it, plz help me,if you have any other noise reduction filter then help me

14 Feb 2008 Anand Muglikar

nice but can u give me starting basic codes or link to them for IP using MATLAB? I will be grateful to u...

13 Jul 2009 Cem

line 66 - Y(i,j) = mean([NNnearest X(i,j)]); => Y(i,j) = mean([NNnearest Xpad(i,j)]);

09 Dec 2010 dragon

 Error in ==> snn at 66
        Y(i,j) = mean([NNnearest X(i,j)]);

solution :
replace X with Xpad ,the size of X is smaller than Xpad.
        Y(i,j) = mean([NNnearest Xpad(i,j)]);

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
filtering Arthur Barnes 22 Oct 2008 07:54:43
snn symmetric nearest neighbor filter edge preserving image proc Arthur Barnes 22 Oct 2008 07:54:43

Contact us at files@mathworks.com