for the 2D case: why all the flux from 8 directions are summed up? The paper suggests to use flus(north)-flus(south) and so on. There at least is 'minus' instead 'plus' all the way around. Could you explain me why?
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.
Comment only