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. |
3rd July 2003, 20:31 | #1 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
VagueDenoiser 0.35.1: a 2D Wavelet denoiser/smoother
A 2D wavelet denoiser/smoother.
It transforms each plane into the wavelet domain, then apply one kind of thresholding on the obtained coefficients, to reduce data that should be noise. With a low threshold you'll erase noise, whereas with higher threshold, you'll smooth the picture. It's somewhat effective against blocking too. Judge it by yourself Grab it on my site or on Kurosu site See the proper documentation into the package on how to exactly use it. Required: Avisynth 2.52 YV12/YUY2 colorspace [Edited] Removed obsolete things Last edited by Wilbert; 10th July 2004 at 23:59. |
3rd July 2003, 22:13 | #2 | Link | |
Registered User
Join Date: Sep 2002
Location: France
Posts: 432
|
Re: VagueDenoiser 0.1: Wavelet based denoiser
Quote:
*acts as if he really knew what he was talking of* Anyway, that's a very good start (awaited in its results by many user), and indeed there can be many things to expect from the update. Is the method used now somehow linked to "waveshrink" (ie zeroing of too small coefficients) ? Last edited by Kurosu; 3rd July 2003 at 22:15. |
|
3rd July 2003, 22:38 | #3 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
OK, i've removed the bug
Now symmlet works again it's quite slow though For low filtering, begin at 0.5 strong filtering at 1-2 The method i use is soft thresholding, ie same as waveshrink it seems All coefficients under the threshold are zeroed and those above are reduced to limit artefacts. |
4th July 2003, 12:06 | #4 | Link |
Mushroomeur
Join Date: Jun 2003
Location: Mushrooms of Paris Town
Posts: 267
|
hello,
i wanted to try your plugin but it requires libmmd.dll. I think it is the library that comes from the intel compiler. Am I right ? Another possibillity is that you compile statically your plugin. thanks ! |
4th July 2003, 15:14 | #6 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
Updated to v 0.12
-Precisions problems corrected -The dll shouldn't need any other dll -Symmlet8 supported The source is also released, free. I have indeed used Daniel Lemire code, the original file is included with the package. Next step would be to implement other wavelets like Haar and also include other colorspaces. |
4th July 2003, 16:58 | #8 | Link | |
Registered User
Join Date: Sep 2002
Location: France
Posts: 432
|
The biggest difference (and I assume that's the reason why this filter is good at smoothing blocking artifacts) I see is rather the DCT is done locally, on a 8x8 block with no regard to neighbours in the image, while DWT operates on a whole image at once. Therefore, this introduces in the case of DCT discontinity problems on the 8x8 block' borders.
But maybe Lefungus has chosen an intermediate solution , though processing times are a hint that he's transforming a whole planar (plane?) at once. Quote:
Anyway, this gives me ideas for detecting other kinds of noise... [edit] Another approach, that tries to identify the part of the decomposition that is due to blocking. Last edited by Kurosu; 4th July 2003 at 17:10. |
|
4th July 2003, 17:55 | #9 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
Properties of wavelets transformations allow them to be used on the whole picture, so that's what i've done. That's one of the strong point of this filter, i think.
I've played with it a bit, some kind of distorsion appear when the threshold is too high, like vertical or horizontal bars. I'll experiment with hard-thresholding to see if it change anything. But for denoising/smoothing purposes, a better way than thresholds should be found. In the end i'd like to have a multi-purpose wavelet filter, any help would be appreciated |
4th July 2003, 18:10 | #10 | Link | |
Retired
Join Date: Jan 2002
Location: Netherlands
Posts: 1,529
|
Quote:
Just a thought. |
|
4th July 2003, 18:51 | #11 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
Unfortunately, if i have understood correctly wavelets, left coefficients are not low frequencies and high coefficients, high frequencies like in DCT domain. So it's more complex.
Anyway it may be interesting to scale/reduce coefficients instead of zeroing them. |
4th July 2003, 21:36 | #13 | Link |
Registered User
Join Date: Mar 2002
Posts: 1,075
|
As far as ringing is concerned the cause is the Gibb's phenomenon same as with DCT, no changes there.
The horizontal/vertical lines however are not ringing, just typical artifacts of these kinds of denoisers ... I dont really know the cause, but my guess it has to do with the isotropic nature of the basis functions and the aliasing inherent in critically sampled transforms. Using (pseudo) translation invariant transforms usually helps a lot (in fact with the undecimated wavelet transform for instance you can just use hard thresholding without having to suffer the usual artifacts). By their very nature these transforms have to be expansive though, so the coefficients will outnumber the pixels ... bringing with it higher memory and computation requirements. |
6th July 2003, 17:24 | #14 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
Version updated to 0.2: lots of changes included, lots of wavelets implemented (15!)
a little faster See the first post for more informations There are no artifacts anymore when you select an high threshold, the picture is just highly smoothed And you can finally select the number of steps, so Haar wavelet with 3 steps should be faster than Antonini with 8 steps. Sometimes you can have a wrong picture, it means you've used too much steps, so reduce it until it works again. now i just need to test all this |
6th July 2003, 17:35 | #15 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
In my first tests Brislawn2 wavelet seems to give really good results
[Edited] On Ghost In The Shell movie, i'm trying this : VagueDenoiser(threshold=2.5,wavelet=7,method=1,nsteps=4) It smooths blocks nicely, reduce interlaced artefacts, but still keep details and edges. And noise is killed Last edited by Lefungus; 6th July 2003 at 19:21. |
6th July 2003, 20:09 | #16 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
I think i will make some presets like convolution3d.
It definitely seems that the Brislawn 2 function gives the best results. At least it was on my own tests, both on an anime (GITS) and and a movie (Brotherhood of the wolves) Speed isn't so bad after all, with 6 nsteps on a 640x256 movie, it's ~20 fps on my p4 2.4GHz So here are my findings: For a high quality movie: Code:
VagueDenoiser(threshold=0.75,wavelet=7,method=1,nsteps=6) For a high quality anime: Code:
VagueDenoiser(threshold=2,wavelet=7,method=1,nsteps=6) On these movies, i've put VagueDenoiser before resizing, if you put it after, you may need to decrease the threshold. Now i'll seek bad quality movies/anime and try to enhance them |
6th July 2003, 22:44 | #17 | Link |
Member
Join Date: Dec 2001
Location: somewhere far beyond
Posts: 270
|
k, here's a short test result:
Code:
avisource("M:\UM Raws\um7.avi",false) Levels(0,1.000,236,0,255) VagueDenoiser(threshold=4,wavelet=7,method=1,nsteps=4) The speed/visible quality gain is too low for me to put this filter in use. The smoothing effect was better on a lq real life footage video full of blocks, but BlindPP delivers better results with more speed imho (If you have to work with such horrible sources full of blocks) CU, lamer_de |
7th July 2003, 11:57 | #18 | Link |
Registered User
Join Date: Apr 2002
Location: Bretagne
Posts: 192
|
Well, it's not really designed to remove blocks but noise instead. Maybe it'll be possible later with a fine analysis of the wavelet domain. Wavelets open many possibilities, i've just tried the most simple one.
Anyway, any tests are welcome. About speed, you're right, it's not usable yet to rip, too much slow. I only use it under vdub now, doing comparisons. i guess what i really need is a fast asm-optimized dwt transform like xvid has for DCT. Now it's pure C code full of memory leaks so that doesn't help ! i'll try to improve it, but don't expect much from me on the speed side. |
7th July 2003, 13:49 | #19 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
There are (fortunately) several ways of optimizing this routine - some that springs to mind.
Edit: Silly me hadn't seen you had already done 1) in 0.2 - I'm leaving it there for understanding. 1) Use floats instead of double. There seem to be (unused?) routines that already does this. It would make assembler optimization possible, and enable better cache efficiency. I don't know if the precision is good enough - Lefungus - what do you say? 2) Assembler int -> float -> int conversion. Since we have a large array this is fairly trivial. I havne't looked at the access patterns in the transform, but it might be a good idea to actually do the conversion there. 3) SSE / SSE2 transforms. This should be able to at least double the speed of the transform/inv transform. Not that trivial, but probably this is where the biggest gain can be found with the current algorithms. Unfortunately none of my current CPU's support SSE, so I might have to get a new MB first. 4) The Intel C++ compiler should be able to squezze out some percent more performance. If you would try out implementing 1), I wouldn't mind doing 2) and 3). 4) Can be tried now, if anyone has the compiler, and knows how to use it. We should probably move further dev. talk to the dev. forum. Edit 2: Did some profiling - the results are here.
__________________
Regards, sh0dan // VoxPod Last edited by sh0dan; 7th July 2003 at 14:43. |
Thread Tools | Search this Thread |
Display Modes | |
|
|