Log in

View Full Version : Smooth in time and space?


Pages : 1 2 3 4 5 [6] 7

Belgabor
22nd August 2002, 13:33
Well, keypoint for my part is the "to the same frame" thing, as reloading is now simply a thing as going to the file menu and clicking on the first in the recent files section, but that reopens to the beginning so i have to remember with frame i was on and skip to it.

Cheers
Belgabor

Marc FD
22nd August 2002, 13:44
a solution : create a filter who saves the frame number in a file (ie frnum.log) , and a prog who reload VDub, then type CTRL+G and type the number of the last frame viewed. here you have a "reload at the same position" feature

Belgabor
22nd August 2002, 13:55
Well, thats imho not really less a hassle than the "read number, take notebook, write it down, reload, Ctrl+G #" approach I'm using atm ;)

Cheers
Belgabor

Didée
22nd August 2002, 15:10
Continuing with offfffffffffffffff topic ...

Some of the more capable text editors, like e.g. TextPad, allow some neat makros. So I got used to edit my script, press one button, and - POOF - Vdub gets started with the edited script. Still got to do the ALT+G grip, but half of the hassle is avoided.

Okay, editors like TextPad or UltraEdit arn´t really free, but ... YES MOM I´M COMING!

:D

stax76
24th August 2002, 00:09
in DVX just write #JumpTo: to your script and hit VirtualDub button

vlad59
25th August 2002, 13:54
Hi all,

Here is a new version of convolution3D (beta 3), if it's bug free (I hope so), it will be last beta. The only remaining thing to add will be some buffering to gain a little speed (maybe).

So I made a big update of the .txt file so don't forget to read it(please excuse me for my crappy english). I add suggested settings for different sources.

There is also a new parameter called Temporal influence (it was hardcoded to 3 in beta 2),it will allow you to tweak speed vs compressibility.
From the tests I've made 3 (or even 2.5) seemed to be a good value for compressibility :
Without any filters -> 33.9%
-1 (only spacial filtering) -> 45.5%
2 -> 50.6%
2.5 -> 51.0%
3 -> 51.2%
4 -> 51.3%

The zip will be available at http://hellninjacommando.com/con3d/ as soon as Defiler have time to update it.

The zip is also attached to this thread.

EDIT : corrected some typos.

iago
25th August 2002, 14:04
@vlad59

I'm so happy to hear that. I'm looking forward to testing this new version. I hope it is uploaded soon :).

Thanks,
iago

Marc FD
25th August 2002, 14:05
great work :)

it's funny, i'm going to do 3D too. but not in a filter...In a game :D

primitive
25th August 2002, 14:18
vlad, your filter is amazing for animation.

An interesting side-effect I've seen is that it seems to reduce ghosting from bad analog captures by getting rid of the combing artifacts on the ghosts and also by blurring the edges of the ghosts, making them less noticable. They also resolve the tiny combed mouth flaps that decomb always seems to miss quite nicely.

My source was the Miyuki-chan in Wonderland DVD by ADV,region 1, the first 6 chapters (the Wonderland portion).

I'd like to run something by youall to see if it's workable. Since the ghosts seem to persist for only one frame, maybe two, and since they're only noticable after a scene change or after there's been a large amount of motion between frames, would it be possible to change the matricies con3d uses on the fly?

1. run a scene change routine set to very high sensitivity. We're not looking for actual scene changes, just frames with quite a bit of motion that would cause ghosting.

2. if the scene change algorithm returns true, edit the matricies. We want to zero out the matrix for the last frame (we don't want any of the pixels from the last frame to reinforce the ghost), and we want to heavily emphasize the next frame (to hopefully blend the ghost pixels with pixels which are clean or which are less ghosty).

3. After that frame, change the matricies back to what they were.

If I understand what the filter does correctly, this will cause the frames which are being corrected for ghosts to be more noisy than most. However, if this can get rid of the ghosting too, it might be a favorable exchange.

Thoughts?

-p

Guest
25th August 2002, 14:32
@primitive

Decomb does not "always miss mouth flaps" when used correctly. If you care to post a sample, I will be happy to prove that.

primitive
25th August 2002, 14:50
Originally posted by neuron2
@primitive

Decomb does not "always miss mouth flaps" when used correctly. If you care to post a sample, I will be happy to prove that.

Not to look down on your excellent tool, which I have happily used since its release.

I'm not talking about all mouth flaps, I'm talking about the tiniest of flaps that have one combed line, perhaps two, across the whole thing when they're missed. Every other region any larger than this is taken care of nicely.

-p

Guest
25th August 2002, 15:17
@primitive

Then why did you say this: "decomb always seems to miss"? It simply isn't true. Post your clip and let me see if you're using the tool correctly. If you make a broad, unjustified, general slam against a tool, expect to be called on it.

Finally, if you're going to apply a filter such as 3DConvolution on your clip, then you might as well set full=true to Telecide().

vlad59
25th August 2002, 15:22
@Marc FD
That's funny, I just crashed my car in CMR II so I lost the rally -> that's why I checked the forum.
Yes, 3D games are sometimes better than 3D convolution.... ;) ;)

@iago
I'm waiting for your tests, thanks in advance.

@primitive

I live in France and sometimes when I read all telecide problems, I thank God to only have PAL DVDs ...

Your idea seems feasible.

If you read my last convolution3d.txt, I have a new parameter called Temporal influence wich I use to do only spacial filtering if temporal information is not usefull.

Let's try to understand better :

1-Scene change
Should I do a scene change detector between current and next frame only ??

2-It's easy to avoid using previous frame values and to double (or more) the importance of next frame. But don't forget how the tresholds work : if was explained before in this thread. if the next frame is too different from the current frame it'll be replaced by the computed value (I know, I'm unable to explain correctly ;) ,but if you look at one of my previous sample,you'll understand).

Hope this helps

dividee
25th August 2002, 16:40
just spotted a bug:

you can't assume pitch will be the same for the three frames you read.
For instance, the following script makes convolution3d crash:
a=BlankClip(width=640,height=480,length=10,pixel_type="YUY2")
b=BlankClip(width=800,height=600,length=10,pixel_type="YUY2")

a+b.crop(0,0,640,480)

Convolution3d (0, 8, 8, 8, 8, 3, 0)
That's because two clips of different pitch are spliced together. If you insert a filter that works in-place between the splice and convolution3d, it will still crash convolution3d. If you insert a filter that outputs to a new buffer, it won't crash, unless the filter is allocating framebuffers with varying pitches (don't know why a filter would do that, but it is legal).

Ranma-kun
25th August 2002, 16:51
Originally posted by neuron2
Finally, if you're going to apply a filter such as 3DConvolution on your clip, then you might as well set full=true to Telecide(). [/B]

I'm going to use convolution3D for some tests, so I set full=true but Telecide doesn't support full argument... I'm not sure, but did you mean threshold=0?

Thx for your wonderful filter, and excuse my poor english.

iago
25th August 2002, 16:52
@vlad59

First of all, I would like to thank you for the credits. It's really kind of you... :)

Originally posted by vlad59
@iago
I'm waiting for your tests, thanks in advance.
@vlad59 and everybody,

Now I'm about to start a new test encode with convolution3d latest version, this time with a more reasonable/compressible movie, Fight Club / 2hr-19min / 640*272, aiming for 1CD to better see the results. (The previous one, The Blues Brothers (1980), aiming for 1CD was an extreme case imho.)

At the moment I'm trying to decide on the XviD encoding and avisynth parameters, which could have an influence on the quality of the final encode, and I would like to take some comments and ideas before starting the long test ;).

There seems two possible ways of encoding to me:
(Koepi's 18082002-1 build / two pass)

1.) (Using MPEG quantizers and no lumi in both passes together with) sharp bicubic resizing (in order to bring all possible noise to foreground) and then apply convolution3d(0,8,8,8,8,3,0).

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
mpeg2source("C:\FIGHT\FIGHT.d2v")
crop(4,60,716,354)
BicubicResize(640,272,0,0.75)
convolution3d(0,8,8,8,8,3,0)
Trim(0,196015)+Trim(196016,0).TemporalSmoother(10)

2.) Applying convolution3d(0,8,8,8,8,3,0) to the source after cropping, and then use simple or neutral bicubic resizing (together with respectively H.263/MPEG and lumi masking in both passes).

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
mpeg2source("C:\FIGHT\FIGHT.d2v")
crop(4,60,716,354)
convolution3d(0,8,8,8,8,3,0)
BicubicResize(640,272,0,0.5)
Trim(0,196015)+Trim(196016,0).TemporalSmoother(10)

Any comments would be appreciated (though some parts are purely XviD related, but essential to decide on the filter-applying method).

Best regards to all,
iago

Guest
25th August 2002, 17:22
@Ranma-kun

Yes, thanks for the correction.

But it was more a sarcastic remark than a real suggestion. :) My point was that if you are going to apply a filter such as 3DConvolution, you're going to change the good progressive frames. So why not just set threshold=0 to deinterlace every resulting frame? The point of having an interlaced frame threshold is to not touch good progressive frames.

vlad59
25th August 2002, 18:13
@Dividee

As usual, you're right ;) , thanks for the report.
So there will a beta 4 :D .

@iago

I'm sorry, once again I've only made test with anime, I'm ripping a chapter of Excalibur (only a little noisy, good mastered) and I'll make a few tests.

I'll check the effect of "temporal influence" and try to higher a little the spacial chroma treshold.

I let you know.

iago
25th August 2002, 18:34
@vlad59 (and everybody),

OK, just forget about the above post; it was just a moment of hesitation or loud thinking :) and both ways can be tried of course.

For the time being, I'm going with the script below, applying convolution3d after resizing (sharp bicubic and MPEG quantizers with no lumi in both passes, since the movie is dark and well compressible and as far as I remember from my previous encodes the second pass quantization will be mostly MPEG after all):

---------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
mpeg2source("C:\FIGHT\FIGHT.d2v")
crop(4,60,716,354)
BicubicResize(640,272,0,0.75)
convolution3d(0,8,8,8,8,3,0)
Trim(0,196015)+Trim(196016,0).TemporalSmoother(10)
---------------------------------------------------

SmartRipper 2.40
DVD2AVI 1.76 (FORCED FILM 29.97->23.976)
avisynth 2.05
VirtualDub 1.4.10

Movie: Fight Club NTSC 1
2hr-19min
640*272/sharp bicubic
[aimed video size: 644000kb (629mb)]

Koepi's 18082002-1 build
First Pass:
6.UltraHigh
MPEG
no lumi

I'll report back the results when finished.

(PS: Koepi, where are you? ;) The above monologue on the filter applying method in relation to XviD is still open to discussion :).)

best wishes,
iago

primitive
25th August 2002, 19:47
Originally posted by neuron2
@primitive

Then why did you say this: "decomb always seems to miss"? It simply isn't true. Post your clip and let me see if you're using the tool correctly. If you make a broad, unjustified, general slam against a tool, expect to be called on it.

Finally, if you're going to apply a filter such as 3DConvolution on your clip, then you might as well set full=true to Telecide().

*offtopic*

Ack, I seem to have hit a nerve. I promise I wasn't aiming for one. Decomb is certainly the best tool of its kind for performing IVTC. In my experience Decomb has always missed tiny combed areas, but I fully acknowledge that this could be due to my inexperience with using Decomb rather than a fault in Decomb itself.

Using decomb 3.9 beta 2 (I think), as well as the next-to-latest version of con3d.

My script, minus gknot garbage:

LoadPlugin("d:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("d:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("d:\PROGRA~1\GORDIA~1\Convolution3D.dll")
LoadPlugin("C:\WINNT\System32\vobsub.dll")
LoadPlugin("d:\PROGRA~1\GORDIA~1\SimpleResize.dll")

mpeg2source("D:\_dvdwf\miyuki-chan in wonderland.d2v")

Telecide(guide=1,gthresh=25,chroma=true,threshold=10)
Decimate(mode=2,cycle=5)

crop(16,0,688,478)

SimpleResize(544,416)

convolution3d(0,10,22,8,8,0)

VobSub("D:\_dvdwf\vts_02_0")

The following links point to video files demonstrating the problem. All these were prepared by opening the video sequence in question into vdub, saving the relavant sequences as .bmp files, and reencoding them in high-bitrate xvid, single-pass. Since they're so short (each less than a second), it'd be best to open them in vdub and step between frames.

Frames in question in encoded clip: 1, 9, 15.

Encoded clip: http://people.vanderbilt.edu/~b.nuttall/encoded.avi
Source clip: http://people.vanderbilt.edu/~b.nuttall/source.avi

Now that I look at my script, I realize I put "threshold" when I probably meant "dthreshold", but I'll leave it to you to determine if that really made a difference. BTW, the documentation I got with Decomb 3.9 didn't have an entry for full=true in association with Telecide().

-p

primitive
25th August 2002, 20:04
@vlad

While I'm sitting at my comp, I'll show you what I mean.

http://people.vanderbilt.edu/~b.nuttall/ghosts.avi

This is straight from the vob source, reencoded to high-bitrate xvid. Frame 4 is combed, but frame 5 is interesting. Switch back and forth between frame 5 and frame 6 to see what I mean.

What you're looking for:
- very slight combing artifacts in frame 5. Look in Miyuki's hair, you can still see the combed lines from the last frame.
- a faint outline of Miyuki's skirt from frame 3 superimposed on Miyuki's skirt in frame 5. Look on pleats 3, 4, and 5 from the left, mostly on pleat 4.

Also notice that Miyuki's color is darker in frame 5 than it is in frame 6, and notice that the part of Miyuki's left elbow that covers the door's face isn't subject to this darkening. This darkening is coming from the blue-black background from frame 3.

The whole idea is that with nasty material like this, you want frame 6's pixels more than frame 5's. This effect is less noticable when there's less motion, so that's why I suggested using a scene detection algorithm to tell you when the matricies need to change.

It's just an idea, I don't know how this kind of filtering would work in practice.

-p

Defiler
25th August 2002, 21:11
Maybe you should wrap the smoothing filters between a pair of reverse() statements? That would probably yield its own set of problems, though.

@Primitive:
What about this?

LoadPlugin("C:\Bin\Avisynth\CopySame.dll")
LoadPlugin("C:\Bin\Avisynth\cnr2.dll")
LoadPlugin("C:\Bin\Avisynth\Convolution3d.dll")
AVISource("D:\Temp\ghosts.avi")
cnr2()
Convolution3d (0, 10, 22, 8, 8, 0)
CopySame(mode=2,llt=32,lct=128,slt=32,mfs=3,lxs=100,lys=100)

Yielding this:
http://hellninjacommando.com/misc/avisynth/ghosts-cs.avi

primitive
25th August 2002, 21:30
Originally posted by Defiler
Maybe you should wrap the smoothing filters between a pair of reverse() statements? That would probably yield its own set of problems, though.

@Primitive:
What about this?

LoadPlugin("C:\Bin\Avisynth\CopySame.dll")
LoadPlugin("C:\Bin\Avisynth\cnr2.dll")
LoadPlugin("C:\Bin\Avisynth\Convolution3d.dll")
AVISource("D:\Temp\ghosts.avi")
cnr2()
Convolution3d (0, 10, 22, 8, 8, 0)
CopySame(mode=2,llt=32,lct=128,slt=32,mfs=3,lxs=100,lys=100)

Yielding this:
http://hellninjacommando.com/misc/avisynth/ghosts-cs.avi

Forgive me for my lack of knowledge, but is this a general solution to this problem, or does it address just this special case? To be clear, could I use a variation of the above script successfully on the entire movie, or is it "optimized" for the clip in question?

-p

Defiler
25th August 2002, 21:47
Should be a general solution. Take note that those CopySame settings are much more aggressive than the defaults. You may have to reduce some of the values if you run into trouble in other scenes.
"mfs=" (The maximum number of consecutive frames allowed to be "same") is a good value to tune. Higher is more aggressive.
Also, those settings are applicable to CopySame 1.2.. If you use 1.1b, the equivalent of "mode=2" is "mode=1" with "reverse()" before and after the CopySame statement.

Koepi
25th August 2002, 23:08
Hi again,

oopsi, I owe an answer! :)

Ok, tested Convolution3D again on The Matrix (640x272), lumi masking, mpeg/modulated quant...

Convolution3d (0, 8, 22, 8, 12, 0)

A little more aggressive settings now...

The resulting movie is a little too smooth in some places for my taste. So it's _very_ good for TV content, but for DVD ripping you have to use either very light settings or -i think that's best - no filters ;)

Best regards,
Koepi

primitive
26th August 2002, 00:05
Update.

Some of my problems were due to me doing the totally wrong thing as far as deinterlacing was concerned. I was trying to perform IVTC on a clip that wasn't progressive.

The rest of my problems were due to the video stream being particularlly diobolical. I spoke with Defiler and his best solution was to step up the framerate and use SeparateFields(). I chose to go with FieldDeinterlace() instead.

(Another one of my problems was that I didn't realize that blended fields on ths clip were the best I could get :( )

At this point, I don't know if having a modified con3d to reduce the blending deinterlacing solutions will yield on difficult clips would be the solution we would like, but I might as well throw it out there, it might be fun to play with.

-p

iago
26th August 2002, 01:00
Hi again vlad59 and everybody,

Well, the first pass returned a 1stpass/2ndpass ratio of 1170/629: 1.86 with the previously mentioned settings [aiming for 644000kb (~629mb)].

Second pass started with:
6.UltraHigh
MPEG
no lumi
Min-Max I-frame quant: 2-6
Min-Max P-frame quant: 2-16
all the rest: default (using default AltCC)

I'll post the second pass results when finished, with some screenshots attached (maybe together with the screenshots of a former, unfiltered encode of the same movie for comparison).

best wishes,
iago

Guest
26th August 2002, 04:43
@primitive

Sorry, but I can't read Xvid. The last time I tried to use it, it crashed my system. Besides, I need clean source, not highly compressed source. Try HUFYUV.

primitive
26th August 2002, 05:45
Originally posted by neuron2
@primitive

Sorry, but I can't read Xvid. The last time I tried to use it, it crashed my system. Besides, I need clean source, not highly compressed source. Try HUFYUV.

Eww, it sucks that you can't read xvid. Not that it's a problem anymore, I was having trouble because I was stupid, not because of your filter.

-p

(perhaps tomorrow I'll post the losless copy; defiler did say that the interlacing scheme was particularlly diobolical. It might be of personal interest to you.)

Bulletproof
26th August 2002, 06:25
I've been getting some strange artifacts when using Decomb in conjunction with Convultion3D. The settings I've been using have been very weak with Convultion3D, I'm using the default parameters with Decomb. I disabled blending with Decomb so that it just resizes a field, as you know this causes a bit of jaggyness to the frame. But when I have Convultion3D on it seems to smear the jagged lines in a weird way, and keep in mind I had Convultion3D to a relatively low setting (mostly 7's). And also, I was finding that some static objects were jittering with convultion3D on, the Jitter is not caused by Decomb since Decomb is not alternating the fields (The best way to describe the effect is Alternating fields). So I see jittering lines on some things.

vlad59
26th August 2002, 07:31
@bulletproof

Can you post your script ?
I assume you use Convolution3D after the decomb stuff ....

@iago and Koepi
Yep, convolution3d (even with 8,8,8,8 tresholds) is maybe too strong for normal movies :
On a sample of Excalibur :
Not filtering : 30% (compressibility)
Convolution3D (0, 8, 8, 8, 8, 3, 0) : 50%

The result is not bad but you can see some blurring in the background in the trees and in the armour.
They are hard to see at 1x but at 2x they are viewable.

I'll make a second pass aiming for 1CD to make sure

iago
26th August 2002, 10:16
@vlad59 and everybody,

The test results and encoding process are discussed in full detail in thread: http://forum.doom9.org/showthread.php?s=&threadid=32243

@vlad59

@iago and Koepi
Yep, convolution3d (even with 8,8,8,8 tresholds) is maybe too strong for normal movies :
On a sample of Excalibur :
Not filtering : 30% (compressibility)
Convolution3D (0, 8, 8, 8, 8, 3, 0) : 50% It seems that these values greatly depend on the quantization choice and resizing method too, as observed in the above mentioned test, and may change from movie to movie.

best regards,
iago

Bulletproof
26th August 2002, 18:07
Yes, I used convolution3D after decomb, here is the script:

LoadPlugin("D:\AVISynth\MPEG2DEC.dll")
LoadPlugin("D:\AVISynth\decomb.dll")
LoadPlugin("D:\AVISynth\convolution3d.dll")
mpeg2source("D:\TEMP\clip.d2v")
Telecide(chroma=true,blend=false)
Decimate(mode=2,cycle=5)
Convolution3d(1, 7, 7, 7, 7, 3, 0)

The target material was animation.

I will try to get some screenshots later on today.

vlad59
30th August 2002, 07:52
Sorry to answer maybe too late.

Have you tried to lower
the Temporal Influence :
Convolution3d(1, 7, 7, 7, 7, 2, 0)
or the temporal tresholds :
Convolution3d(1, 7, 7, 4, 4, 3, 0)

I'm not sure of the results but it may help

bb
7th September 2002, 12:46
I like to extend long threads even more, so here we go:

There are always people on the forums asking what's special about Convolution3D, and I'll try to give a simple answer, based on my initial idea.

Neighbour pixels are correlated in films, the closer they are, the higher is the correlation; this applies to neighbours in the same frame and to neighbours in consecutive frames. Averaging neighbour pixels reduces noise.

Spatial filters look at a single frame only. A pixel has eight direct neighbours, so you can average nine pixels for the filtered frame. You can increase the pixel radius to get more pixels to average, but the you will average pixels that don't correlate much...

Temporal filters look at consecutive frames, a single pixel from each frame and the pixels before and behind. If you average the highly correlated direct neighbour pixels only, then there are three pixels to average only. Like with spatial filters you can increase the number of frames to get more pixels to average. But then you'll get ghosting effects - the pixels don't correlate any longer...

Convolution3D looks at direct neighbours only - the pixel radius is only one, but because you are averaging through "time and space", you get 27 (=3x3x3) highly correlated pixels. A (weighted) average of all these pixels is capable of getting rid of almost all the noise. That's the basic idea. And it works, as you can see.

bb

Wilbert
9th September 2002, 09:30
For those who are interested I did a second test round:
I also tested STMedianFilter and found something unexpected:
As you can see by looking at the pictures in the url at the end of the page, the ones done with STMedianFilter are brighter and contain a purple hue (or however you call that). Here are the scripts including the encoding times. The clip could be properly deinterlaced with VD_DeinterlacePALMovie and consists of 1000 frames.

# STMedianFilter v0.0.3.0: (purple hue all over the clip)
Import("C:\install\avisynth\vdub_filters_test3.avs")
AviSource("F:\Test2\atomic_kitten-the_tide_is_high.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true).ConvertbackToYUY2
STMedianFilter(10, 50, 8, 10, 10, 50)
Levels(3, 1.03, 255, 8, 240)
# time: 2:40

# MAM1 vb2, SmoothHiQ v1.0: (needs a little bit more smoothing although less than Convolution3d, see all pictures 300%)
Import("C:\install\avisynth\vdub_filters_test3.avs")
LoadPlugin("C:\Program Files\AviSynth\Plugins\SmoothHiQ.dll")
LoadPlugin("C:\Program Files\AviSynth\Plugins\MAM.dll")
AviSource("F:\Test2\atomic_kitten-the_tide_is_high.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true).ConvertbackToYUY2
s=SmoothHiQ(3, 25, 35, 200, 5)
t=TemporalSoften(1, 4, 8)
MAM(t, s, 2, 4, 8)
Levels(3, 1.03, 255, 8, 240)
# time: 6:12

# MAM2 vb2, SmoothHiQ v1.0: (smoothed too much, see hair third picture 200%)
Import("C:\install\avisynth\vdub_filters_test3.avs")
AviSource("F:\Test2\atomic_kitten-the_tide_is_high.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true).ConvertbackToYUY2
s=SmoothHiQ(7, 25, 40, 250, 10)
t=TemporalSoften(1, 4, 8)
MAM(t, s, 2, 4, 8)
Levels(3, 1.03, 255, 8, 240)
# time: 10:00

# 2DCleaner: (too smooth and too noisy, see skin/eyes first picture 100%)
AviSource("F:\Test2\atomic_kitten-the_tide_is_high.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true)
VD_2DCleaner(200,1).ConvertbackToYUY2
Levels(3, 1.03, 255, 8, 240)
# time: 4:10

# Convolution3d vb3: (needs more smoothing, see all pictures 300%)
Import("C:\install\avisynth\vdub_filters_test3.avs")
LoadPlugin("C:\Program Files\AviSynth\Plugins\convolution3d.dll")
AviSource("F:\Test2\atomic_kitten-the_tide_is_high.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true).ConvertbackToYUY2
Convolution3d(0, 8, 16, 8, 8, 3, 0)
Levels(3, 1.03, 255, 8, 240)
# time: 3:15

# Layer (with 2 broadcastings): (needs a little bit more smoothing although less than Convolution3d, see all pictures 300%)
Import("C:\install\avisynth\vdub_filters_test3.avs")
clip1=AviSource("F:\Test2\atomic_kitten-the_tide_is_high.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true).ConvertbackToYUY2
clip2=AviSource("F:\Test2\atomic_kitten-the_tide_is_high2.avi").ConvertToRGB32.VD_DeinterlacePALMovie(true).ConvertbackToYUY2
Layer(clip1, clip2, "fast")
Levels(3, 1.03, 255, 8, 240)
# time: 3:49

# general remarks:
# - in this case proper deinterlacing was possible (in many case with clips from tmf)
# - 2DCleaner worst (too noisy and too smooth)
# - STMedianFilter needs improvement
# - I didn't stretch them to the correct size: 768x576.
#
# other remarks:
# - finetuning parameters is important, especially when you want to compare filters
# - convolution3d/layer with little bit more smoothing is faster (and gives similar quality) as MAM (with SmoothHiQ(5,25,35,5))


The zip-file containing the pictures and the script can be found
here (http://www.geocities.com/wilbertdijkhof/atomic_kitten-the_tide_is_high.zip).

ronnylov
9th September 2002, 15:03
Wilbert, your link to the zip file is broken.

Wilbert
9th September 2002, 15:07
"Right click" and "Save link as" should work ... Otherwise copy this url www.geocities.com/ararodrigu/atomic_kitten-the_tide_is_high.zip (with the full name: atomic_kitten-the_tide_is_high.zip) to your explorer.

Defiler
9th September 2002, 15:21
Originally posted by ronnylov
Wilbert, your link to the zip file is broken. Worked for me. Interesting content, as well.

ronnylov
9th September 2002, 15:51
Yes, right click and save as worked.
Thanks!

vlad59
10th September 2002, 08:08
Yes interesting test, thanks Wilbert.

The main problem in using noise reducer is you will never know for sure wich parameters you should use.
It's hard to say how much noisy is your source.
So the only to find good parameters is to test and retest parameters until you find something YOU like (again it's a matter of taste : I prefer smoother movie, my wife prefer sharper movie)

I was thinking of making a noise analyzer : the user select a long scene with very low motion (or no motion at all) of a source and inside this scene he choose a rectangle to analyze (again with no motion at all) and then we are able to provide some statitics :
for each values (luma or chroma) : mean/min value/max values/max variation/max variation div luma/.....

With this I consider that noise is the same throught all the movie (wich is not true) but it should be good enought (only a test could proove it).

I hope I will have time to build that

WarpEnterprises
10th September 2002, 09:01
I fear measuring noise won't be that easy, as it may depend on the video content as well (e.g. the brightness).
But indeed some kind of "noise analyser" should be helpful (similar thoughts and needs had vidiot in http://forum.doom9.org/showthread.php?s=&threadid=33259 !)

vlad59
21st September 2002, 14:06
Wahoo this thread was already at page 4.

Just a little post to say that beta4 of Convolution3d is available here (http://forum.doom9.org/showthread.php?s=&postid=183735#post183735)

High Speed Dubb
22nd September 2002, 07:09
Originally posted by vlad59
I was thinking of making a noise analyzer : the user select a long scene with very low motion (or no motion at all) of a source and inside this scene he choose a rectangle to analyze (again with no motion at all) and then we are able to provide some statitics :
for each values (luma or chroma) : mean/min value/max values/max variation/max variation div luma/.....

With this I consider that noise is the same throught all the movie (wich is not true) but it should be good enought (only a test could proove it).That should be very effective — It’s generally reasonable to expect the same amount of noise throughout a source. The only big exceptions come when different parts of the source were produced or processed differently. (That happens a lot with news shows and ads.)

Potentially a 3:2 pulldown algorithm could generate the noise information automatically, using the repeated fields.

It’s even possible to get this information from mixed moving/non-moving fields, but that’s very tricky. If you’re feeling very brave, take a look at my (reasonably successful) attempt at this at:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/deinterlace/DScaler/Plugins/FLT_AdaptiveNoise/

The important code is all in C. FLT_AdaptiveNoise.asm collects a histogram of the (oddly processed) differences between pixels in the current and previous frame. Then the AnalyzeHistogram() routine in FLT_AdaptiveNoise.asm finds the low peak in the difference histogram. The low peak usually corresponds to the part of the picture in which there is no motion. But it doesn’t always, so a measure of the reliability of the peak as a measure of noise is also determined. Based on its reliablility, the new estimate of the noise amount is combined with the old estimate to figure out the current amount of noise.

jarthel
22nd September 2002, 07:18
Originally posted by vlad59
Wahoo this thread was already at page 4.

Just a little post to say that beta4 of Convolution3d is available here (http://forum.doom9.org/showthread.php?s=&postid=183735#post183735)

Is there mmx, 3dnow or sse optimizations with the latest beta? Thanks

Jayel

vlad59
22nd September 2002, 09:24
@High Speed Dubb
My first test show it could be effective but you have to find a long still scene to provide useful stats. 2 or 3 seconds are a minimum.

I only made tests on a PAL non interlaced source.

I'll have a look to your code and especially to the statistics you provide.

Thanks for the link.

@Jarthel

Convolution3d is mainly MMXed. I use iSSE instructions mainly for prefetching and to calculate a SAD (Summation of Absolute Difference) quickly.

I don't use any 3dnow instruction because I don't need any. At first I wanted to make a MMX version and an MMX/iSSE version but now I think I'll be too lazy to split Convolution3D.

Last night I have optimized the last part of Convolution3D that was not ASM and I only gain 2% in speed so I think it will be hard to optimize better without a complete rewrite.

High Speed Dubb
23rd September 2002, 03:47
I should point out a couple hidden gotchas in estimating noise.

- It’s important to exclude pixels with a value near 0, because these pixels have a different noise distribution.

- With a composite (PAL or NTSC) source, color crosstalk will mess up a straightforward difference measure, since crosstalk will be misinterpreted as noise. That’s a problem because the amount of crosstalk varies depending on the image, which means the noise measure will vary somewhat. I handled this by just looking at the noise in the quietest parts of the picture. Another possibility would be an explicit comb filter of some sort.

metallikop
7th October 2002, 23:25
As you can see by looking at the pictures in the url at the end of the page, the ones done with STMedianFilter are brighter and contain a purple hue (or however you call that). Here are the scripts including the encoding times.

I thought this thread could use a revival. I recently tested Tr's STM filter and came up with the same purple hue problem as Wilbert. Have you had a chance to take a look at this tom?

trbarry
8th October 2002, 17:08
metallikop -

I wrote STMedianFilter just as a lark one day, in response to this thread. It doesn't really seem anybody besides me is using it, at least compared to Vlad's nifty convolution 3D. So I'm actually thinking about withdrawing it and dropping support, in favor of just using Vlad's filter. I'm not sure yet either way but I haven't worked on it recently.

- Tom

ronnylov
8th October 2002, 17:19
I have used the STMedianFilter and I liked it! I used it when denoising a VHS capture. I also noticed a slight purple touch of the final movie but I thought it was there on the original.