Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd March 2009, 20:29   #1  |  Link
Chengbin
Registered User
 
Join Date: Oct 2007
Posts: 1,060
Degrain/noise filter

I'm using MVDegrain 3 as my filter right now. Is there any other filter that's better? I don't care about time. I've heard some GPU based degrain/noise filters, how are those compared to MVDegrain 3 in terms of quality?
Chengbin is offline   Reply With Quote
Old 22nd March 2009, 20:43   #2  |  Link
Bablu
Registered User
 
Join Date: Apr 2007
Posts: 29
speaking from less experience, but give a try at FFT3DFilter, it's damn slow, but it gives the fruit is really sweet afterwards. As for MVDegrain, I have never tried so I don't know how that compares to FFT3DFilter.
Bablu is offline   Reply With Quote
Old 23rd March 2009, 09:31   #3  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
if you want something good and slow, try nlmeans. you will care about time then.
Terka is offline   Reply With Quote
Old 23rd March 2009, 14:20   #4  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
tnlmeans, FFT3DFilter, MVDegrain3, and dfttest are all very heavy weight denoisers. Some of the slowest I know of (that aren't a complex filter chain) but very good quality.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 23rd March 2009, 16:22   #5  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Of course, it also depends on the filter's parametrization if it does heavy weight denoising, or only a gentle one. Then, it's difficult to give a general advice, since sources can be so very different.

However: if a source has only rather faint noise or grain (me says: "MickeyMouse grain"), then almost any noise filter will do something reasonable, and the arguing will be about rather small differences - hey look at this pixel, but no, look at that tiny spot, this one is a bit sharper, but no, that one is more homogeneous ... splitting hairs is big fun.

I like to look at what a noise filter is able to achieve on more demanding sources. A filter that can cope with strong noise can always be adapted to act weaker, if needed. On contrary, if a filter can not deal reasonably with strong noise, then it can not. That's a difference. It's interesting to see where a filter reaches its limits.

Let's see ... what happens with one of my usual grain test sequences:



=> Sample <= (13MB, MediaFire)

(Note: intentionally decreased fps to 25% PAL, for easier evaluation of the differences.)


I won't comment too much on that. Shortly:

- FFT3DFilter gets quite soft in order to get a reasonably stable result. (DFTtest most probably would be slightly better and slower, but its general characteristics are quite similar to FFT3D.)

4 fps are 4 fps.


- MVDegrain3 with ME-prefilter is detailed and stable.

1.5 fps are 2.66 times slower than FFT3D, but the time seems well spent.


- TNLMeans is almost 27 times slower than FFT3D. Could've been set up to be more stable but kill even more detail, or to keep more detail, but keep the nasty LF flicker.
Might be a good choice for masochists when dealing with low-noise sources. For strong grain, the effort/result ratio seems rather poor to me, somehow.
(Remember those highly stunning before/after examples in the PDF paper?)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 23rd March 2009, 23:58   #6  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
TNLMeans break out into blossom with the right parameters (e. g. Ax=Ay=10, Sx=Sy=3, Bx=By=1 or 0). But now we talk about fph.
Archimedes is offline   Reply With Quote
Old 24th March 2009, 00:30   #7  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Perhaps I've not the tune for TNLMeans, I'm not used to it. Suggest some more exact settings to try for such a grainy source? No matter which knobs I turn in which direction by how much, it seems to keep flickering and floating.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th March 2009, 01:18   #8  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Well its important to keep in mind that the ideal settings for tnlmeans would be.
Code:
ax=largest image dimension/2
ay=largest image dimension/2
az=framecount

bx=0
by=0

sx=largest image dimension/4
sy=largest image dimension/4
Under those conditions it would outperform everything by a large margin.


by using "sane" settings you are severely handicapping it, if you want an apples to apples comparison, quality (not speed) wise, you need to set:
Code:
ax=mvrange/bw*1.5 (assuming ow=bw/2)
ay=mvrange/by*1.5 (assuming oy=by/2)
az=mvdegrain number/bt number -1 divided by 2 rounded up

sx=blksize/ax
sy=blksize/ay

bx=0
by=0

Last edited by *.mp4 guy; 24th March 2009 at 01:24. Reason: formatting
*.mp4 guy is offline   Reply With Quote
Old 24th March 2009, 02:22   #9  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Quote:
Under those conditions it would outperform everything by a large margin.
Sure. And if Elementary Charge would've happened to be double as big as it is, then all matter would be just one quarter in size. Or not?

Short of running some several-weeks-running tests, I'll try those:

Common sense argument:
With not unreasonable settings, TNLMeans was already 10 times slower than MVDegrain, and still it looks definetly worse. To me, at least.
Okay, what now ... let's try settings that are 100 times slower? If not sufficient, lets try settings that are 500 times slower? If still not sufficient, suggest settings impossible to be carried out? Hooray!

Technical argument:
TNLMeans is based on a gaussian-weight, zero-mean assumption. Now, strong Film Grain compressed by Mpeg-2 at DVD-ish bitrates does not really fit that model ... and the difference between ideal model and rude reality will propagate into the result. When making TNL's similarity comparisons less blurry, it keeps the fingerprint of the base noise. When making the comparisons blurry enough to obfuscate the theory/practice difference, the fingerprint fades away. Along with the detail.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th March 2009, 02:43   #10  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
TNLMeans is mostly usefull for still images, where a very long processing time can be accpetable under some conditions.

also, tnlmeans always outperforms denoisers with the same processing area it is using, which was primarily my point in the previous post. You are comparing a spatial radius 2, by temporal radius 2 filter versus much larger filters.

The common sense argument is valid, but the technical one is not, because all denoisers are based on similarly stupid assumptions. such as "representing non critically sampled images as a sum of periodic waves is a really good model for the content of the image". That assumption is still usefull though, because it allows fast denoising of low frequency noise, which cannot be achieved without making such sacrifices.

Last edited by *.mp4 guy; 24th March 2009 at 02:46.
*.mp4 guy is offline   Reply With Quote
Old 24th March 2009, 03:36   #11  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Well, TNLMeans definetly is a spatial denoiser, yes. Still images is what it originally was designed for. And funnily, even if the temporal extension with Az>0 is used, then in a sense it still is a spatial denoiser. It just gathers more spatial evaluation from the temporal neighbors. (As long as the search- and the support window are no collapsed to size 0 -- in that special case, TNLMeans becomes similar to ttempsmooth with a blurred 'pclip').

I really don't want to battle against TNLMeans. It's a good filter for the cases where it's appropriate. But after all, the topic started about video processing, not still images.


It's just when TNLMeans is touted as "THE" denoiser of all, if, oh if only you crank up the radii and are willing to invest hours ... days ... months ...

... exactly then it's time to point out that TNLMeans is in no way the holy grail, either. Often other filters can do a better job in less time.


BTW,
Quote:
You are comparing a spatial radius 2, by temporal radius 2 filter versus much larger filters.
that's 5x5 x (2+1+2) = 125 pixels that TNLMeans had available to compute each output pixel. MVDegrain3 had 3+1+3 = 7 pixels available to compute each output pixel. That's not a "much larger" filter, no?
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 24th March 2009 at 03:39.
Didée is offline   Reply With Quote
Old 24th March 2009, 03:55   #12  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
I only have experience with TNLMeans in spatial mode (image denoising). But I'm not working with the default values (Ax=Ay=4 and Sx=Sy=2). I don't like the results. Normally i'm using a search window of 21x21 (Ax=Ay=10) and a neighborhood window of 7x7 (Sx=Sy=3), as described in the paper. And, if the image has many details, I go with Bx=By=0. The results are much better than with the default values.

Here is an example. First image is the original, second is the denoised version with TNLMeans (spatial mode). Zoom in, 200 %, 400 % or more and look at the letters. TNLMeans only touch the noise. I never beat this results with other spatial denoisers. May be the results can be improved with higher values of the search and neighbourhood windows. I never tested it.

Original


TNLMeans


I never tested TNLMeans for video processing. But denoising still images (may be not all kind of source), the results are remarkable. And when i see, how long TNLMeans works for only one image (for the above image my notebook needs 4 min. and 18 sec. for denoising all 3 channels extra), i haven't any interessests using it for video processing.

Last edited by Archimedes; 24th March 2009 at 04:31.
Archimedes is offline   Reply With Quote
Old 24th March 2009, 05:26   #13  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Quote:
Originally Posted by Didée View Post
BTW,
that's 5x5 x (2+1+2) = 125 pixels that TNLMeans had available to compute each output pixel. MVDegrain3 had 3+1+3 = 7 pixels available to compute each output pixel. That's not a "much larger" filter, no?
no, mvdegrain had (searchradius^2)*pi*7 pixels to use, so for searchradius 32 (on the low end, iirc) thats 8182.91712 pixels, not counting sub-pixels.
*.mp4 guy is offline   Reply With Quote
Old 24th March 2009, 15:30   #14  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
In general, TNLMeans takes advantage on the high degree of redundancy of an image (even on natural images).

So, another excellent field for TNLMeans is removing jpg artefacts and deblocking.

Original (saved with only 20 % jpg quality!)


Look, what TNLMeans are doing with this image.

TNLMeans (Ax=Ay=10, Sx=Sy=3, Bx=By=0, a=1.0, h_y=4.8, h_u=4.8, h_v=4.8)


You would think, the last image is the original.

But now, let's go back to the original discussion.
Archimedes is offline   Reply With Quote
Old 24th March 2009, 21:09   #15  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Quote:
Originally Posted by *.mp4 guy View Post
no, mvdegrain had (searchradius^2)*pi*7 pixels to use, so for searchradius 32 (on the low end, iirc) thats 8182.91712 pixels, not counting sub-pixels.
Impressing numbers of little interest. Point is, you're stretching the term "making use of" to fit your arguing. And imo you're overstretching quite a bit.
(BTW, I can't follow your actual calculation. "(searchradius^2)*pi*7" with "searchradius 32" is (32^2)*Pi*7 = 22518.93614 , not 8182.91712. ? )

Sure, MVTools will evaluate a gross number of pixels in the motion estimation stage. But most (almost all) of them will be *discarded*, hence not being used in the end.
Further, the "looking at thousands of pixels" is done by MVAnalyse, not by MVDegrain. What MVDegrain gets from MVAnalyse is the one single result that was sorted out as being the best-fitting. Hence, my statement was that MVDegrain3 uses 3+1+3 = 7 pixels for each input pixel to form the output pixel. This is correct. What's actually used in the end are only 7 pixels, not some thousands.

In difference, TNLMeans does indeed actually use all pixels within the Ax*Ay*Az search window. Each single pixel does get a weight and therefore is used to form the output pixel. So, with the settings I had used, for each input pixel TNLMeans did use (4+1+4)^2 * (2+1+2) = 405 pixels to form the output pixel. (Corrected from above ... the default radius of the search window is Ax,Ay=4 ... you had mentioned a spatial radius of 2, which is the radius of the support window, and I took it. Averaging is done over all pixels of the search window, not of the support window.)
_____

I don't see much point in beating this horse any more. Simplificated, it boils down to the fact that TNLMeans is a spatial denoiser (even with the temporal extension switched on). The difference in characteristics between spatial denoisers and temporal denoisers is well known.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th March 2009, 22:09   #16  |  Link
rkalwaitis
Robert
 
Join Date: Jan 2008
Location: Stuttgart
Posts: 407
Didee what script did you use for MVDegrain3? If you so not mind sharing.
rkalwaitis is offline   Reply With Quote
Old 25th March 2009, 01:16   #17  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
@Didee, can you show me an example of settings on (MVDegrain|FFT3DFilter)that would produce low frequency flicker? I don't know what it looks like, or at least my settings seem to have never produced it.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 25th March 2009, 01:40   #18  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Didée, by your logic, a median filter is only utilizing one pixel. also, motion compensated denoisers are spatial-temporal, not pure temporal.

(also, I have no idea what I did wrong when I solved the equation, it is indeed 22518.91712)

Last edited by *.mp4 guy; 25th March 2009 at 02:13. Reason: ckarity
*.mp4 guy is offline   Reply With Quote
Old 25th March 2009, 17:38   #19  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
I don't see how that works. If you look at a simple 1 px median filter, then you'd have spatial averaging of 1 center + 8 neighbor pixel. MVDegrain3 would do 1 center + 3 from backward frames + 3 from forward frames.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 25th March 2009, 22:04   #20  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Median filters do not average anything, they are nonlinear and only 1 pixel value is used in the output, much the same way only 1 pixel value is the output of mvanalyze->mvcompensate, even though both filters use many pixel values as inputs. My point is that the act of choosing between the inputs to find a good output is filtering in and of itself, so you must count the total number of inputs, not the total number of inputs that are actually used.
*.mp4 guy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.