Log in

View Full Version : faster NL-means algo?


Terka
14th May 2009, 10:43
http://www.adptools.com/denoisemyimage/description.html
http://www.eurasip.org/Proceedings/Ext/LNLA2008/papers/cr1026.pdf

MfA
14th May 2009, 13:36
Indeed it is, I don't think Tritical ever used precomputed squared difference images for speedup ... you want to implement it? :)

Terka
14th May 2009, 13:55
no i am not a programmer, want only point theese papers

tritical
15th May 2009, 02:19
My implementation is definitely not optimized. It even uses double precision math IIRC. Of course, the version I made uses gaussian weighted euclidean distance to compute neighborhood similarity, so their main speed up (fast computation of the neighborhood distances using sliding window) isn't applicable. Apparently the gaussian weighting is not that important.

MfA
15th May 2009, 13:24
It is applicable. Once you have the squared difference image for shift X you can use fast convolution to get any set of weights you want, the sliding sum is just a special case ... you don't even need FFT for Gaussian, an IIR based gaussian convolution would be almost as fast as the sliding sum.

That's the beauty of using the redundancy between different neighbourhoods at the same shift, rather than the redundancy between different shifts for the same neighbourhood.

tritical
15th May 2009, 20:09
If you can approximate the weighting window fir convolution with an iir filter that only requires a few operations then the speed up will still be close to that of the no weighting case. I didn't think that gaussian could be approximated well by low-order iir though, and at the neighborhood sizes I'm used to, 5x5-7x7, fft doesn't gain you much over fir.

*.mp4 guy
15th May 2009, 23:35
The nlmeans algorithm operates much more effectively at large window sizes, 21X21 for example offers a very nice improvement over 7X7, If large window sizes can be spead up, it would be quite nice.

MfA
16th May 2009, 00:04
I didn't think that gaussian could be approximated well by low-order iir though
Well, 2 IIR filters to be exact (a causal and an anti-causal one).

yup
17th May 2009, 17:16
Hi all!
See thread at this forum:
http://forum.doom9.org/showthread.php?p=1236283#post1236283
this only work for Nvidia card 8XXX and later. Algo modified not true TNLMeans but work very fast, for my GT8800 GTS at real time.
yup.

MfA
17th May 2009, 18:00
Algo modified not true TNLMeans
That's rather generous IMO.

tritical
21st May 2009, 08:35
The nlmeans algorithm operates much more effectively at large window sizes, 21X21 for example offers a very nice improvement over 7X7, If large window sizes can be spead up, it would be quite nice.
Do you mean search window size or neighborhood similarity window size? Granted, larger search window size is better. When I mentioned 5x5-7x7 windows I was referring to neighborhood similarity. IMO at some point larger neighborhood similarity window size has to hurt performance (if all pixel differences are treated equally) because the center portion gets too little weight, and the window is too large to capture small details.

The speed-up is related to neighborhood similarity calculation. If you incorporate it, nl-means complexity is reduced close to that of bilateral filtering (and you can use any neighborhood similarity size you like).

*.mp4 guy
21st May 2009, 14:49
You are right, I was talking about the search window size. I haven't ever goten any real improvement from similarity windows larger then 7*7, but I 've never noticed them hurting anything either.

Archimedes
24th May 2009, 22:27
The nlmeans algorithm operates much more effectively at large window sizes, 21X21 for example offers a very nice improvement over 7X7
That's also my experience (for still images). And a maximum preservation of details can be achieved with a base window of 0 pixel (Bx=By=0).

markanini
1st March 2011, 03:34
Sorry to dig up this old post. I found this discussion on parameter tuning a lot more interesting now that we have a faster way of using NL-means via NLMeansCL. I still have some questions though.

IMO at some point larger neighborhood similarity window size has to hurt performance (if all pixel differences are treated equally) because the center portion gets too little weight, and the window is too large to capture small details.
How can you tell by looking at parameter values used that neighborhood window is doing more harm then good? Also, would neighborhood window values need to be adjusted in tandem with search window to ensure efficiency?

markanini
3rd March 2011, 14:42
Nobody care to comment my question?