View Full Version : Any filter to remove this rainbow noise?


Ryo94
1st March 2007, 00:59
Hi, I'm trying to remove some rainbow noise from this video

http://img341.imageshack.us/img341/8623/picrz9.jpg (http://imageshack.us)

...I've installed avisynth 2.56 an guavacomb.dll in plugin directory but when I tried to load the video using this script:

AviSource("F:\test.avi")
GuavaComb(Mode = "PAL", Recall = 75, MaxVariation = 25, Activation = 40)

I get: "Avisynth open failure... script error: there is no function named guavacomb"

Any idea what could be happening?

Otherwise I would like to know what should I do to get the videos load with correct colors instead like this:

http://img149.imageshack.us/img149/9072/pic2yk9.jpg (http://imageshack.us):


Thanks in advance for any help

Terranigma
1st March 2007, 01:37
You can try using FFT3DFilter (http://avisynth.org/warpenterprises/files/fft3dfilter_25_dll_20051204.zip).
You'd also need fftw3.dll (http://avisynth.org/warpenterprises/files/fftw3_20040130.zip). Move it ito \WINDOWS\system32.

If you want a faster alternative that's a bit less accurate, you can try tsp's fft3dgpu (http://forum.doom9.org/showthread.php?t=89941)

Spuds
1st March 2007, 03:11
Make sure you got the dll for the 2.5 version of avisynth here (http://avisynth.org/warpenterprises/) Then place the dll in the C:\Program Files\AviSynth 2.5\plugins directory and you should be good to go.

HeadBangeR77
1st March 2007, 03:35
AFAIK you've got to load the plugin using LoadPlugin() command. The error message you get ("Avisynth open failure... script error: there is no function named guavacomb") indicates it doesn't get loaded, so it's not recognized.

The linked fft3dfilter is awfully outdated, if you want to give it a try, get the latest one from here: http://avisynth.org.ru/fizick.html
though I don't think it will do wonders in this particular case.

If you want to modify and try your scripts quickly, AVSP (http://forum.doom9.org/showthread.php?t=115506) is the most convenient way to do it.

good luck!

PS. If the plugin you're using is really old (I don't know it at all, so I can't tell), you should call
LoadPlugin("...\LoadPluginEx.dll") first.

Guest
1st March 2007, 04:35
2 dumb questions Your thread title is a rule 9 violation.

http://forum.doom9.org/forum-rules.htm

Ryo94
1st March 2007, 04:56
Your thread title is a rule 9 violation.

Apologies, I changed it now.

Since I installed avisynth along with staxrip long time ago I found that placing the plugins on staxrip's "avisynth plugin directory" instead in "program files\avisynth\plugin" the error message is different when I use guavacomb:

ERROR: This filter only support YUY 2 color format

Regarding to FFT3DFilter filter I've installed the one
from http://avisynth.org.ru/fizick.html and now I can open the video without problems:
Script:
fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=1)
fft3dfilter(sigma=3,sigma2=3,sigma3=12,sigma4=3,bt=3,plane=2)
* I took the script from http://forum.doom9.org/showthread.php?t=115467&highlight=derainbow :)

... but I found 2 issues: 1) the video is not loaded with the right colors but like in the 2nd pic, 2) the filter doens't remove that noise at all

Regarding to fft3dGPU filter I get this error:
"only pixelshader 2.0 or greater supported"

Ryo94
1st March 2007, 05:49
Well, although seems like I can open the guavacomb script adding ConvertToYUY2(interlaced=true) in the 2nd line I get the same color problem, the video appear like if had a mask (see picture 2) :(

Ryo94
1st March 2007, 06:25
The only filter that I founf to remove that noise is SSIQ, this is how it looks after pass the filter 2 times:
SSIQ(diameter=11,strength=200,interlaced=false)
SSIQ(diameter=11,strength=200,interlaced=false)

http://img145.imageshack.us/img145/5686/pic4bm1.jpg (http://imageshack.us)

See that the noise is gone but the color problem still there (I think I'm missing some basic step of color conversion here)

This is a how should look (this second sample was encoded using SSIQ for virtualdub)

http://img145.imageshack.us/img145/2985/pic3wb6.jpg (http://imageshack.us)

Anyway SSIQ is incredible slow (1.5fps), if anyone knows any filter that works like SSIQ but faster please let me know it.
Otherwise I know that the info about the color conversion must be somewhere in the forum or in avisynth's site (I'm searching for that right now) but if anyone could give the line to open this video with the right color I'll be more than grateful.

These are the filters that I already tried it:
Guavacomb
FFT3DFilter
FFT3dGPU.
BiFrost

None of these are even close of what SSIQ result.

DarkT
1st March 2007, 07:46
BiFrost(interlaced=true) (if there is IVTC, but it before it)
+
DFMDeRainbow() - put after IVTC

There's also LUTDeRainbow which you MIGHT wanna try...

SSIQ - from my experience, kills the color of the space it touches... So I try to avoid using it besides on places which the others didn't touch.

foxyshadis
1st March 2007, 08:04
No mention of DeFreq or FanFilter? This is exactly what they're designed for, after all. Fanfilter will probably handle shifting frequencies like this a little better, and FFTQuiver might give you some extra customizability if you need it.

Ryo94
1st March 2007, 10:08
BiFrost(interlaced=true) (if there is IVTC, but it before it)
+
DFMDeRainbow() - put after IVTC

I added MSharpen, FluxSmooth, Deen & MaskTools in plugins, then I put in the *.avs the BiFrost line + the DFMDeRainbow function, I opened the file in VD but I see no changes at all in the picture, the rainbow noise still there. Maybe I'm doing something wrong :confused:

No mention of DeFreq or FanFilter?

I tried DeFreq with the sample script, DeFreq(fx=30,fy=-40), but I see no change at all in the picture. I downloaded FanFilter but it has to much parameters, all unknown to me, I think I need to read more until use that kind of filter.

SSIQ - from my experience, kills the color of the space it touches... So I try to avoid using it...

Didn't realize of that but good to know it, the con that I had found in SSIQ is the speed, the goods is the easiness (2 lines, done)

Otherwise any clue about the color problem? looks like the file is loaded as BGR instead RGB (at least if I swap the color of the original pic from RGB to BGR in xnview I see the same result that in VD after load any script.

foxyshadis
1st March 2007, 10:52
That's not how you use defreq. ;) Based entirely on this image, which may not be fully applicable to the stream, I came up with:

DeFreq(fx=9.3,fy=-72.5,fx2=9.3,fy2=-32.5,fx3=9.3,fy3=6.7,fx4=9.3,fy4=47.5,plane=1)
#u2=u.DeFreq(fx=9.3,fy=-72.5,fx2=9.3,fy2=-32.5,fx3=9.3,fy3=6.7,fx4=9.3,fy4=47.5)
DeFreq(fx=9.3,fy=46.7,plane=2)
DeFreq(fx=9.3,fy=47.1,fx2=53.3,fy2=46.7,fx3=9.3,fy3=-52.5,fx4=53.3,fy4=-52.9).Defreq(fx=4.7,fy=23.8,fx2=4.7,fy2=-75.8,sharp2=20)

With an extra fft3dfilter(plane=4) call before or after, which always helps munged-up things like this. You could probably crank the low-frequency chroma levels on it a lot. Beyond this, you'll want temporal stabilizers like MVDegrain to get the most help, as long as the camera was reasonably steady. Then you can start applying filters like SSIQ or your favorite spatiotemporal smoother, once it's in a less broken state.

I think your second pic has incorrect colors and your first is actually correct; the interference is just so bad that it's impossible to tell for sure, though. If you just accidentally switched pics, the one you're looking for is probably the built-in SwapUV.

Ryo94
1st March 2007, 12:21
That's not how you use defreq. Based entirely on this image, which may not be fully applicable to the stream, I came up with...

:eek: I had never imagined it :thanks: I'll try it

I think your second pic has incorrect colors and your first is actually correct... you're looking for is probably the built-in SwapUV

Yes, the 1st with yellow subs is the good one, I think that SwapUV should solve that issue, thanks a lot for your help foxyshadis :)

Ryo94
1st March 2007, 12:52
foxyshadis, SwapUV() works perfect, thanks... I tested your defreq script + fft3dfilter and this is the result :)

before the filters
http://img86.imageshack.us/img86/4558/91174634hq4.jpg (http://imageshack.us)

after the filters
http://img246.imageshack.us/img246/1560/35341715op5.jpg (http://imageshack.us)

Looks much better but still have quite rainbow noise, since the idea is replace SSIQ because is too slow, I'm wondering if there is another filter out there to remove that rest of noise?

foxyshadis
1st March 2007, 13:16
Defreq only gets rid of the worst of it, so pile on some more:

Crank the fft3d, set the first to be only plane 0 and add another fft3dfilter(bt=4, sigma2=3, sigma3=5, sigma4=8, plane=3) or even higher if necessary. plane=3 means chroma only. It'll cause some color bleeding, but it's better than nothing.

Maybe TTempSmooth or FluxSmooth, which are reasonably fast. Maybe DeGrainMedian, but it's probably out of its league. Maybe frfun7, but it's not that fast.

Chainmax
1st March 2007, 13:22
First of all, let me say that you are not likely to find a fast script, your source needs too much work to be restored, if it even can be. With that in mind, I second the advice for using DeFreq, as those diagonal lines sure look like they need it to be eliminated. As for dereinbowing itself, I use in this order:

* BiFrost (read its readme in order to know when to apply it)

* If it's not enough, I add DeCross

* If those aren't enough, I add TComb in mode=1

* If that doesn't work, I add FFT3DFiler on the chroma planes (plane=3) with a sigma of 3 or higher.

* If I reach a sigma of about 8 and the rainbows still aren't removed, I ditch everything and go for TemporalSoften(4,0,65,scenechange=1,mode=2), which is probably what your case warrants. The first number (4) indicates the radius and the third one (65) the strength. The radius should probably be increased for big splotches like the ones you have.


After that, you might want to use something like Tweak(sat=1.2) in order to liven up the colors a little bit. Your source also seems to have blocking so I'd recommend you to include a DeBlock_QED() call somewhere. Finally, you might consider using AddGrain(x,0,0) at the end of the script in order to give it an illusion of detail.

wonkey_monkey
1st March 2007, 13:49
Maybe running mvdenoise on the processed result would mitigate some of the remaining noise?

David

Terranigma
1st March 2007, 15:47
The linked fft3dfilter is awfully outdated, if you want to give it a try, get the latest one from here: http://avisynth.org.ru/fizick.html
though I don't think it will do wonders in this particular case.

thanks HeadBangeR77 for the heads up. now maybe someone would be kind as to update that filter from avisynth.org

vcmohan
5th March 2007, 11:30
Tried with following script using fftquiver plugin. As there are strong horizontal object lines, did not use stronger filter
<code>
F2Quiver(snap,"gp5",50,-133,"gp5",50,120)

F2QuiverUV("gvn",50,30,"ghn", 60,20, uu = true, vv = true)
</code>
result is :
http://img219.imageshack.us/img219/8992/f2quiveruv0gb3.th.jpg (http://img219.imageshack.us/my.php?image=f2quiveruv0gb3.jpg)