Rank: 13533 based on 0 downloads (last 30 days) and 0 file submitted
photo

Arif Harmanci

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Arif
Updated File Comments Rating
25 May 2012 Anisotropic Diffusion (Perona & Malik) A set of filters that perform 1D, 2D and 3D conventional anisotropic diffusion (gray scale data). Author: Daniel Lopes

I was looking at this code and I am pretty sure that there is a problem with the 1D code. I did not try 2d code. I tried following:

% Generate random regions.
a = [zeros(1, 2000) ones(1, 1000) zeros(1, 3000) 5 * ones(1, 4000) zeros(1, 6000) 3 * ones(1, 5000) zeros(1, 4000)];

% Add some noise
a_n = a + rand(1, length(a));

diff_sig = anisodiff1D(a_n, 1000, 1/3, 30, 2);

Then I get all 0's, that is, everything is smoothed.

If you go back to Kovesi's code, he did not use imfilter or conv, he computed the differences by basic vector subtractions. When I replace the imfilter to vector subtractions to compute nablaW/E, then I get smoothing only at the noisy regions, which is the expected result.

Would be great if anyone could comment on this.

Contact us