PDA

View Full Version : best noise reduction ever seen, using vdub "save img seq" and neat image "batch mode&


crespo80
15th February 2005, 16:02
What do you think about the insane possibility of saving you avi in virtualdub as an image sequence, put this sequence in the batch processing mode of the terrific "neat image", then save the sequence again as a video and have a really perfectly denoised video without any of the inconvenients of the standard SpazioTemporal avisynth filters (except for the speed)?
I made a simple test and the result are amazing!
If you know the capabilities of this program you can understand me!
It's perfect in eliminating the noise that the camera generates in low-light enviroments, clearing the image without loss of detail at all, because it works in very different way compared to standard avisynth filters.
It creates a profile of the image noise by analyzing a portion of uniform color of the image and then it applies this profile to the entire image.

But this processis very heavy, infact
The only LITTLE problem is this:
for 1 hour of video you get about 180GB of temp files and quite 5 days of work!

But the results are outstanding

I'm crazy? :D



mmmmh.... I think so
:p

bb
15th February 2005, 18:45
Not practicable for me, but maybe someone can implement the neat image algorithm as an AviSynth filter?

bb

dionisos
16th February 2005, 13:35
crespo, would you give me some links of it?
even some jpg to compare the results?
i'm doing something close to it right now (re-rendering a 2:40:00 movie - shooted in DV - with cinemotion degrain on it) and it got my image clearer, but much more blurier either.
share some more info please.

(rendering time isnt quite a problem, image quality its really the goal!)

and if im not mistaken your workflow reencode the source at least 3 times
dv-img seq-dv-mpeg2 (if you would go to dvd)... does it keeps the img quality after all those generations?
thanx in advance

JB

crespo80
16th February 2005, 15:37
http://www.neatimage.com/


and here some shots made by my EZ1 DV cam in a low light enviroment.
You have to zoom them to better appreciate the differences.
Notice that with virtualdub i export in bmp, so there's no loss of quality, and in Neat-Image I save in bmp again!
So the space is the real problem!
To share the pics with you I compressed them in jpg but with lowest compression (=1).
http://www.crespo80.altervista.org/cesare/img2.jpghttp://www.crespo80.altervista.org/cesare/img2_filtered.jpg
http://www.crespo80.altervista.org/cesare/img3.jpghttp://www.crespo80.altervista.org/cesare/img3_filtered.jpg
http://www.crespo80.altervista.org/cesare/img1.jpghttp://www.crespo80.altervista.org/cesare/img1_filtered.jpg

crespo80
16th February 2005, 15:48
these others I found on the net


http://www.abc-fotografia.com/abc/neatimage6.jpg
http://www.abc-fotografia.com/abc/neatimage7.jpg

Valky
18th February 2005, 19:48
They look good indeed and I know how good it is with images.
This could do miracles with tv-captures and vhs material.

crespo80
20th February 2005, 00:52
Originally posted by Valky
They look good indeed and I know how good it is with images.
This could do miracles with tv-captures and vhs material.
It's the same think I thought, but for me the price to pay, in terms of time, is really too high!

This method could be practiceable only if you have to clean a single video for a home made film, but it's impossible to think to do this job for your collection of VHSs :eek:

Terka
24th February 2005, 15:06
i saw some guide on their forum but dont now where. :mad:
noise ninja is even better and faster. :D

Cyberman
26th February 2005, 13:32
Originally posted by crespo80
What do you think about the insane possibility of saving you avi in virtualdub as an image sequence, put this sequence in the batch processing mode of the terrific "neat image", then save the sequence again as a video and have a really perfectly denoised video without any of the inconvenients of the standard SpazioTemporal avisynth filters (except for the speed)?

Neat idea - but the demo version of Neat Image is useless - no batch mode, saves only to Jpeg - with lots of compression artifacts.

Besides, when the image is of low(est) quality, each picture looks different - creating even new noise...

paviko
7th March 2005, 19:05
Hi.
I was also thinking about using Noise Ninja/Neat Image (abrevation NN/NI) to denoise video. I even contacted developers of those program to ask for plug-in to premiere elements or other program. Unfortunatelly they don't plan it in near feature.
After 3 months of researching I was able to find even better way of denoising video !!! Yes, results are better than using NN/NI because with video you have additional dimension (not available in photo) - time :) Of course you can done it in avisynth.
VagueDenoise filter uses the same technic that NN/NI (Wavelets) but without sharpening filter. But what a problem to find it :) - LimitedSharpen by Didée. Armed with these 2 filters you can get some similar results. But the true power comes when you use time. 2 weeks ago I've found almost perfect solution for my needs - combination of 5 filters :) used in the folowing order:
- FFT3DFilter (use time dimension somehow)
- MVDenoise (true motion compensated denoiser)
- VagueDenoise
- LimitedSharpen
- Unfilter
To denoise video I use all of above filters.

Here are results of denoising using a bit older technic I used 1 month ago (without FFT3DFilter and Unfilter)
Original shot:
http://www.imagehosting.us/imagehosting/showimg.jpg/?id=254411
After AviSynth denoise:
http://www.imagehosting.us/imagehosting/showimg.jpg/?id=254386
Using Noise Ninja:
http://www.imagehosting.us/imagehosting/showimg.jpg/?id=306259

Noise Ninja left some noise (grain), look also at wood some details were lost (comparing to Avisynth denoise).

The more grain in video the better results Avisynth provides comparing to NN/NI. Results are even better using those 5 filters (instead only 3 as in posted shots).

If you are interested, in free time I'll try to write my findings what paramteres to use in those filters for low, medium and high denoising. There is a lot of play with these filters so maybe even someone will find something better.

It takes 1 second to denoise one frame on my 2GHz Athlon. So 1 hour video takes 30 hours :) And some HDD space can be saved using frameserving :)

Regards

Valky
7th March 2005, 21:49
looks very good indeed!

Backwoods
8th March 2005, 07:41
@paviko

can you post your script?

paviko
9th March 2005, 13:31
Here it is:


function TimeDenoise(clip clip, float "strength", bool "interlaced"){
strength = default(strength, 1.0)
interlaced = default(interlaced, true)

order = (clip.getparity == true) ? 1 : 0

clip = (interlaced == true) ? clip.ConvertToYV12(interlaced = true) : clip.ConvertToYV12()
clip = (interlaced == true) ? clip.TDeint(mode=1,order=order,type=2) : clip

clip = clip.FFT3DFilter(sigma = strength / 2, bt = 2, bw = 48, bh = 48)

backward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 4, idx = 1, pel = 2)
backward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 3, idx = 1, pel = 2)
backward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 2, idx = 1, pel = 2)
backward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 2, idx = 1, pel = 2)
forward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 3, idx = 1, pel = 2)
forward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 4, idx = 1, pel = 2)
clip = clip.MvTools_MVDenoise(backward_vectors4d, backward_vectors3d, backward_vectors2d, backward_vectors1d,
\ forward_vectors1d, forward_vectors2d, forward_vectors3d, forward_vectors4d, tht = int(strength * 6),
\ thsad = int(strength * 800), thSCD1 = int(strength * 1000))

clip = clip.ConvertToYUY2()
clip = (interlaced == true) ? clip.separatefields().selectevery(4,0,3) : clip
clip = clip.VagueDenoiser(threshold = strength, wavelet = 3, method=1, nsteps=4 ,chromaT=0.8, Wiener = false,
\ percent = 80, interlaced = false)
clip = clip.LimitedSharpen(ss_x = 2, ss_y = 2, strength = 255, wide = true)
clip = clip.Unfilter(int(strength * 4), int(strength * 4))
clip = (interlaced == true) ? clip.Weave() : clip

return clip
}



Parameters:
- "strength" - amount of densoing, any value above 0.0. Common values are: 1.0 - low, 2.0 - medium, 3.0 - high denosing. With current home miniDV camcorders on the market there is no need to go higher than 1.5 with original shoot. If you set too high value for denoising some artefacts can appear from Unfilter filter. When I'm brighting up (gaining) my video a lot, I'm setting 2.5 value. Default - 1.0.
- "interlaced" - values: false - video is progressive, true - video is interlaced (like DV). Default - true.

To run the script it's best to save it in the file e.g. timedenoise.avs. You need also LimitedSharpen script (http://forum.doom9.org/showthread.php?s=&threadid=84196&perpage=20&pagenumber=1), TDeint (http://forum.doom9.org/showthread.php?s=&threadid=82264&perpage=20&pagenumber=1), MVTools (http://manao4.free.fr/), VagueDenoise (http://bag.hotmail.ru/), MaskTool (http://manao4.free.fr/), FFT3DFilter (http://bag.hotmail.ru/), Unfilter (http://www.trbarry.com/UnFilter.zip).
Of course everything is possible only thans to those plug-ins :)

First 4 and last 4 frames are a bit less denoised because there is no previous or next frames that are needed for time denoise ;)

Example:

Import("limitedsharpen.avs")
Import("timedenoise.avs")

clip = AVISource("filename.avi")
clip = clip.TimeDenoise(1.0)

return clip


Regards

Backwoods
9th March 2005, 22:39
Thanks, I'll play around with it during the week and post some results.

Valky
18th March 2005, 16:23
What the heck? I got e-mail notification about new post here just minutes ago? I dont see any new posts here :)

Huit
18th March 2005, 17:29
Valky, that was me. The link to VagueDenoise was down so I asked if someone knew where I could find it. However, when I tried again later it was working again, so I removed my reply :-D.

I do have another question though for Paviko. What DV-codec do you use?

Huit
18th March 2005, 20:08
nm... using DirectShowSource now

It does take alot of time Paviko... about 100x movie length on my XP 2800+

paviko
18th March 2005, 20:28
I'm using Mainconcept DV codec. I've done just a test and it takes exactly 1,19 second to render one frame on my Athlon XP 2GHz (about 2800+) with only PC2100 memory. The slow down is "only" ;) 35x the movie length. My video is 720x480 29.97 fps. I'm using AviSource.
Maybe your video is HD? Otherwise it can't be so drastic diffrence in speed.

Regards

paviko
19th March 2005, 23:17
I've got one idea why it can go slower for you Huit. I'm using SetMemoryMax(256), it is in plugins directory in SetMemoryMax.avsi file.

Regards

Backwoods
25th March 2005, 07:15
Your script is a bit slow, but I like the results alot. Good work.

video
7th April 2005, 01:25
paviko greath job. Uhhh you have roughly invented the KALMAN-Filter :)

m0ebius
3rd May 2005, 20:34
FYI if you are not aware yet. To speed up a bit the process, you should check this thread (http://forum.doom9.org/showthread.php?threadid=89941).

I replaced the the FFT3D per FFT3DGPU.It simply cuts my rendering time by 2 on a Sempron 2800+ and ATI 9600Pro.

Regards,

m0ebius

dragonfly
7th May 2005, 04:41
I enjoy reading these forums and the speed you guys come up with new things.
I want to try paviko's method, but I always get the same error when I load my script into mediaplayer. The error is: "FFT3D Filter: Can not load FFTW3W.ddl!!" Then it refers to the TimeDenoise.avs at line 15 and at my main avs script at line 19.
I really tried every version of the fft3d, but to no avail. I even tried to replace the fft3d version for the GPU version of fft3dfilter (http://forum.doom9.org/showthread.php?threadid=89941&perpage=20&pagenumber=1), but that didn't help either.

My script are here below. First my main script then the TimeDenoise script and then the limitedsharpen.avs.

For your understanding I used LimitedSharpen2 from this thread (http://forum.doom9.org/showthread.php?s=&threadid=87514&highlight=limitedsharpen2) to see if I could get better results over the first LimitedSharpen. I edited the scripts in redto get them working. But as you guessed...nothing.

My avs-files:
Main.avs

LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\fft3dfilter091\fft3dfilter.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\MVTools-v0.9.9.1\MVTools-v0.9.9.1\MVTools.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\vaguedenoiser_25_dll_20040823\VagueDenoiser.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\TDeintv1b2\TDeint\TDeint.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\dgmpgdec121_20050222\DGDecode.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\masktools_25_dll_20050103\MaskTools-v1.5.6\MaskTools.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("D:\My Documents\Videobewerking\Avisynth Filters\Voor LimitedSharpen2\awarpsharp_25_dll_20030203\aWarpSharp.dll")

Import("D:\Captures\Avisynth Scripts\Testing\LimitedSharpen2.avs")
Import("D:\Captures\Avisynth Scripts\testing\TimeDenoise.avs")

clip = AviSource("D:\Captures\Test Filmpjes\DV - Fatima's Camera\Testmaterial II.avi")
clip = clip.TimeDenoise(1.0)

return clip

TimeDenoise.avs

function TimeDenoise(clip clip, float "strength", bool "interlaced"){
strength = default(strength, 1.0)
interlaced = default(interlaced, true)

order = (clip.getparity == true) ? 1 : 0

clip = (interlaced == true) ? clip.ConvertToYV12(interlaced = true) : clip.ConvertToYV12()
clip = (interlaced == true) ? clip.TDeint(mode=1,order=order,type=2) : clip

clip = clip.fft3dfilter(sigma = strength / 2, bt = 2, bw = 48, bh = 48)

backward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 4, idx = 1, pel = 2)
backward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 3, idx = 1, pel = 2)
backward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 2, idx = 1, pel = 2)
backward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 2, idx = 1, pel = 2)
forward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 3, idx = 1, pel = 2)
forward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 4, idx = 1, pel = 2)
clip = clip.MvTools_MVDenoise(backward_vectors4d, backward_vectors3d, backward_vectors2d, backward_vectors1d,
\ forward_vectors1d, forward_vectors2d, forward_vectors3d, forward_vectors4d, tht = int(strength * 6),
\ thsad = int(strength * 800), thSCD1 = int(strength * 1000))

clip = clip.ConvertToYUY2()
clip = (interlaced == true) ? clip.separatefields().selectevery(4,0,3) : clip
clip = clip.VagueDenoiser(threshold = strength, wavelet = 3, method=1, nsteps=16 ,chromaT=0.8, Wiener = false,
\ percent = 80, interlaced = false)
clip = clip.Limitedsharpen2(ss_x=1,ss_y=1,Smode=4,aSharpS=0.4,aWThresh=0.99)
clip = clip.Unfilter(int(strength * 4), int(strength * 4))
clip = (interlaced == true) ? clip.Weave() : clip

return clip
}


LimitedSharpen2.avs

function LimitedSharpen2( clip clp,
\ float "ss_x", float "ss_y",
\ int "dest_x", int "dest_y",
\ int "Smode" , int "strength", int "radius",
\ int "Lmode", bool "wide", int "overshoot",
\ bool "soft", int "edgemode", bool "special",
\ float "aSharpS", float "aWThresh", int "exborder" )
{
ox = clp.width
oy = clp.height
ss_x = default( ss_x, 1 )
ss_y = default( ss_y, 1 )
dest_x = default( dest_x, ox )
dest_y = default( dest_y, oy )
Smode = default( Smode, 4 )
strength = Smode==1
\ ? default( strength, 160 )
\ : default( strength, 100 )
strength = Smode==2&&strength>100 ? 100 : strength
radius = default( radius, 2 )
Lmode = default( Lmode, 1 )
aSharpS = default(aSharpS, 0.5)
aWThresh = default(aWThresh,0.75)
wide = default( wide, false )
overshoot= default( overshoot, 1)
overshoot= overshoot<0 ? 0 : overshoot
soft = default( soft, false )
edgemode = default( edgemode, 0 )
special = default( special, false )
exborder = default( exborder, 0)
xxs=round(ox*ss_x/8)*8
yys=round(oy*ss_y/8)*8
smx=exborder==0?dest_x:round(dest_x/Exborder/4)*4
smy=exborder==0?dest_y:round(dest_y/Exborder/4)*4

clp.isYV12() ? clp : clp.converttoyv12()

ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last
tmp = last

edge = logic( tmp.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=2)
\ ,tmp.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=2)
\ ,"max").levels(0,0.86,128,0,255,false)

bright_limit = (soft == true) ? tmp.blur(1.0) : tmp
dark_limit = bright_limit.inpand()
bright_limit = bright_limit.expand()
dark_limit = (wide==false) ? dark_limit : dark_limit .inflate.deflate.inpand()
bright_limit = (wide==false) ? bright_limit : bright_limit.deflate.inflate.expand()
minmaxavg = special==false
\ ? yv12lutxy(bright_limit,dark_limit,yexpr="x y + 2 /")
\ : maskedmerge(dark_limit,bright_limit,tmp,Y=3,U=-128,V=-128)

Str=string(float(strength)/100.0)
normsharp = Smode==1 ? unsharpmask(strength,radius,0)
\ : Smode==2 ? sharpen(float(strength)/100.0)
\ : Smode==3 ? yv12lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +")
\ : asharp(aSharpS,0,0).awarpsharp(3,1,bm=3,cm=0,aWThresh)

OS = string(overshoot)
Lmode == 1 ? yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x "+OS+" + ?")
\ : yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?")
Lmode == 1 ? yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x "+OS+" - ?")
\ : yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x x y - "+OS+" - 1 2 / ^ - "+OS+" - ?")

edgemode==0 ? NOP
\ : edgemode==1
\ ? MaskedMerge(tmp,last,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1)
\ : MaskedMerge(last,tmp,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1)

(ss_x != 1.0 || ss_y != 1.0)
\ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last

ex=blankclip(last,width=smx,height=smy,color=$FFFFFF).addborders(2,2,2,2).coloryuv(levels="TV->PC")
\.blur(1.3).inpand().blur(1.3).bicubicresize(dest_x,dest_y,1.0,.0)
tmp=clp.lanczosresize(dest_x,dest_y)

clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last)
\ : maskedmerge(tmp,last,ex,Y=3,U=1,V=1) )
\ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2())
\ : tmp.mergeluma( maskedmerge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1)
\ .converttoyuy2()) )

return last
}


My apologies for the space I take in this thread and for the long directories in the first script. I hope some of you can figure this out for me, becuase it's getting late here (04:38) :D

dragonfly
7th May 2005, 19:25
Well I fixed the problem with the fft3d filter. I forgot about the external (http://forum.doom9.org/showthread.php?s=&threadid=85790) fftw3.dll file which has to be placed in the system folder.

The next problem I got with the TimeDenoise script Paviko has posted was that with the VagueDenoiser filter. Mediaplayer noted that my clip dimensions are too low to permit 16 steps. And it linked to the TimeDenoise.avs file. In TimeDenoise.avs I noticed that the nsteps was set to 16.
Well I looked at the website (http://bag.hotmail.ru/vague/vaguedenoiser.dhtml) of the filter and it sayd this about nsteps.

Picture can't be decomposed beyond a particular point (typically, 8 for a 640x480 frame - as 2^9 = 512 > 480)
Max value is depended from color plane and interlaced flag.
If input set to 0 or too big value, then nsteps will be auto-limited to max admissible value.


@Paviko:
Have you set the value of nsteps to 16 on purpose so that nsteps will be auto-limited to the max admissible value?
The conclusion I make from this is that there should be no problem for me if I encode my video.

I looked for my max value of nsteps and found out that it was 7. Is this a good value?

The video I use is a DV file (1 minute), which is PAL and interlaced. The colorspace is RGB24 and 720 x 576 as you already guessed.

I must mention that this method is extremely slow. I tried to encode the 1 mintute dv-file and CCE took about 5 minutes for 15 frames!! Is this normal?

Longinus
9th May 2005, 01:08
I use neat image a lot to clean the noise of some videos. Neat image is specially good with digital noise, from DV cameras and digital still cameras.

I also create complicated workflows with neat image, photoshop, SAR, etc. Check out this example, of a stop-motion animation I'm working. It was NOT filmed as video, but from several stills captured from a 4 megapixels digital camera. So the same ideas apply (and the noise and macroblocks is very similar as a DV video stream). The final output of this movie is 2K full aparture film (2048x1556).

Check the pictures.. they are a small part of the image, upsampled (using nearest neighbor resize) to 200% of the size so it's easier to see.

http://www.neoplastique.com/longinus/stuff/noise1.png
RAW JPEG.
http://www.neoplastique.com/longinus/stuff/noise0.png
FINAL.

I didn't only want to clean the noise (and a lot more on the background), but to reduce the jagged edges of the jpeg compression, sharpen the important lines, and blur things not that important (large solid-color areas). And since this will be moving, some temporal noise removal needed to be used too.

This is how I did it...

-Raw jpeg to neat image. Output tiff.
-Tiff to avisynth (noise reduction + important lines mask). Output 2 png files.
-Open this in SAR image processor, use Jensen-XiLin upsample + isophote smoothing + lanczos downsample.
-Open all the images in photoshop as layers. Select the mask, sharpen things inside it; blur outside. Than merge everything together, each layer having a different opacity (the strong noise reduction from avisynth with a low opacity, just to help the neat image one).

Of course this is a really painfull way to do this. Perhaps you could do everything in avisynth (but believe me, I tried.. a Lot.. and didn't like the results). BUTTTT I created a lot of scripts to automate this job. Photoshop CS have an ActiveX component, so you can make it do everything you want from Visual Basic, Dot Net, etc.. I used this to open all the source images, put it as layers in a new image, and finally do the action to join everthing together... and save a PNG file.

This is a VERY extreme example, of course. It required a LOT of HD space and work. But in the end, I really like the result.

Well... just my 2 cents.. :D

Backwoods
9th May 2005, 11:23
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\fft3dfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\unfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\Tdeint.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\yea\VagueDenoiser.dll")
Import("C:\Program Files\AviSynth 2.5\yea\LimitedSharpen.avs")
Import("C:\Program Files\AviSynth 2.5\yea\TimeDenoise.avs")

AVISource("otto.avi")
TimeDenoise(1.0,interlaced=false)

I'm getting crashing using this script now. I've updated my FFT3DFilter filter to version 0.9.1.0 and AVISynth to the latest beta since I've last used this script. I don't get what could be wrong, unless it has to do with either of my updated components.

paviko
9th May 2005, 22:56
@dragonfly
Have you set the value of nsteps to 16 on purpose so that nsteps will be auto-limited to the max admissible value? ... I looked for my max value of nsteps and found out that it was 7. Is this a good value?
I don't remember exactly, but probably yes. Mostly these parameters doesn't change much (changes are not visible), so default value of 4 is good.

I must mention that this method is extremely slow. I tried to encode the 1 mintute dv-file and CCE took about 5 minutes for 15 frames!! Is this normal? It's extremely slow, but not as much. Have you read previous post about SetMemoryMax function. As I've written it takes about 1 second for one frame, so 15 frames about 15-18 seconds on Athlon 2GHz. We need to add start time for CCE, but it should be about 30 second max. Hmm ... what's your machine?

@Backwoods
I'm getting crashing using this script now. I've updated my FFT3DFilter filter to version 0.9.1.0 and AVISynth to the latest beta since I've last used this script. I don't get what could be wrong, unless it has to do with either of my updated components. I'll have to check this in free time. Thanks for reporting.
As far as I rember I'm also using FFT3DFilter 0.9.1.0 and it's still working, so maybe incompatibility with new AVISynth.

Regards

fRUTTiFrESH
10th May 2005, 17:05
Originally posted by dragonfly
...
I must mention that this method is extremely slow. I tried to encode the 1 mintute dv-file and CCE took about 5 minutes for 15 frames!! Is this normal? [/B]

Save the rendered clip into an extrenal AVI-File (via VDub/Huffyuv) - so multipass enconding doesn´t need rendered again & again ...

I´ve also tried FFT3DGPU - but it creates many noise/blocks with my Radeon 9700pro; i´ll test a future release.

What about a intel 8.x compile of the "fftw3.dll" - I couldn´t find one :(

Backwoods
11th May 2005, 02:45
Originally posted by fRUTTiFrESH
What about a intel 8.x compile of the "fftw3.dll" - I couldn´t find one :(

In the FFT3DFilter thread, towards the end there is a link to a P4 version of FFTW3.dll if that is what you are looking for.

fRUTTiFrESH
11th May 2005, 10:30
@Backwoods

There´s a icc 7.1 compile from Alessio Massaro (dated 13-NOV-2003)...
I´am searching a icc 8.1 compile... I´ll ask Franz Franchetti, he´s working on a current version based on VS8 and icc 8.x.

Regards Martin

Backwoods
11th May 2005, 11:26
Ok, wasn't sure.

dragonfly
14th May 2005, 20:14
Originally posted by paviko
[B]@dragonfly

I don't remember exactly, but probably yes. Mostly these parameters doesn't change much (changes are not visible), so default value of 4 is good.

When use your defaut TimeDenoise script I get this this error. (http://img76.echo.cx/my.php?image=error1dh.jpg)
When I go to your script and change ntsteps=16 to ntsteps=7 I don't get the error. I found this strange, that's why posted it here. So the default is not 4 but 16??

It's extremely slow, but not as much. Have you read previous post about SetMemoryMax function. As I've written it takes about 1 second for one frame, so 15 frames about 15-18 seconds on Athlon 2GHz. We need to add start time for CCE, but it should be about 30 second max. Hmm ... what's your machine?

Yes I read some more about the SetMemoryMax funtion and it could be the problem. I have AthlonXp 1800+ with 512mb of RAM.
I am going to do some tests and post the results later.

EDIT:
Well I tried to solve the problem with the SetMemoryMax() function, but this isn't working for me. I have 500MB of RAM and set the funtion to SetMemoryMax(120). I encode in CCE and it takes about 2 minutes to encode 15 frames. This is 8 seconds per frame.
There is some progress, but not the one one second per frame speed you all get. :)

EDIT:
It seems to work now. I set SetMemoryMax() to 350MB and I encode now at the magnificent speed of 1.9 seconds per frame. :D It sounds crazy...1.9 seconds per frame and still happy. But quality goes before speed.

tsp
17th May 2005, 17:44
Originally posted by fRUTTiFrESH
Save the rendered clip into an extrenal AVI-File (via VDub/Huffyuv) - so multipass enconding doesn´t need rendered again & again ...

I´ve also tried FFT3DGPU - but it creates many noise/blocks with my Radeon 9700pro; i´ll test a future release.

What about a intel 8.x compile of the "fftw3.dll" - I couldn´t find one :(
What version of FFT3dGPU did you use and what strength? Did you try FFT3dGPU with mode=1 and/or useFloat16=false?

rhayman
18th May 2005, 02:58
When I open my AVS file i get the following error?

_______________________________________

MVAnalyse: Block's size must be 4 or 8
(H:\Caps\TimeDenoise.avs, line 12)
(H:\Caps\Main.avs, line 15)
_______________________________________


My source is a avi file captured from my camcorder using windv.
Its PAL 720*576 25fps

Anyone know why this is happening?

Just one more question, My source is interlaced so would i have to deinterlace for this script to be effective?

Backwoods
18th May 2005, 04:35
TimeDeNoise(1.0,interlaced=true)

rhayman
18th May 2005, 13:43
Thankyou, But i am still getting that block needs to be 4 or 8 error, anyone know a way to fix this?

smok3
18th May 2005, 16:02
longinus: maybe one could use the 'filmstrip' format to do noise-reduction in neatimage or similar? - simply to reduce the number of images to be corrected + easier control of the results inside specific noise reductor. (you would need premiere or after effects to make such image afaik); well not in 2k case surely.

---

btw: is there a good method to do a timebased (or stacked) noise reduction on a material with lots of movement?

fRUTTiFrESH
18th May 2005, 19:09
Originally posted by tsp
What version of FFT3dGPU did you use and what strength? Did you try FFT3dGPU with mode=1 and/or useFloat16=false?

Yes I tried 0.43 & 0.44 but without success

I´am am using following script for my avi:

SetMemoryMax(256)
DirectShowSource("Rosenmontag.avi", 25)
ConvertToYV12()
fft3dGPU(sigma=3.0,bt=3,bh=64,bw=64,mode=1)

Output is something like this:
http://www.bausoft.de/bir0/radeon9700pro.jpg

fft3dfilter works fine and at the moment faster than the non-working GPU-Version (~1000 Frames in 1:40 min. / fftw3.dll [31-JAN-2004/1627136 bytes])

My System is Athlon 3000+ (Barton Core); 512MB RAM DualChanel-Mode, ATI Radeon 9700 Pro. (not modified or overclocked); OS XP/Sp2, DX9.0c

Games HL2 and CMR2005 are working fine.....

paviko
18th May 2005, 23:07
@dragonfly
When I go to your script and change ntsteps=16 to ntsteps=7 I don't get the error. I found this strange, that's why posted it here. So the default is not 4 but 16??
It's strange that with 16 you've got error. I mean default value in VagueDenoiser, it's 4. I'll change to that at first post.

@rhayman
Can you post your full main.avs script?

@smok3
btw: is there a good method to do a timebased (or stacked) noise reduction on a material with lots of movement? When there is lots of movement then denoising quality is reduces. If the scene has good contrast then denoising is only slightly worse, if it's low-light scene then probably noise can't be removed without bluring.

Regards

rhayman
18th May 2005, 23:15
LoadPlugin("H:\Camera Caps\Filters\fft3dfilter.dll")
LoadPlugin("H:\Camera Caps\Filters\MVTools.dll")
LoadPlugin("H:\Camera Caps\Filters\VagueDenoiser.dll")
LoadPlugin("H:\Camera Caps\Filters\TDeint.dll")
LoadPlugin("H:\Camera Caps\Filters\UnFilter.dll")
LoadPlugin("H:\Camera Caps\Filters\DGDecode.dll")
LoadPlugin("H:\Camera Caps\Filters\MaskTools.dll")
LoadPlugin("H:\Camera Caps\Filters\asharp.dll")
LoadPlugin("H:\Camera Caps\Filters\aWarpSharp.dll")

Import("H:\Camera Caps\Avisynth Test\LimitedSharpen2.avs")
Import("H:\Camera Caps\Avisynth Test\TimeDenoise.avs")

clip = AVISource("H:\Camera Caps\test.avi")
clip = clip.TimeDeNoise(1.0,interlaced=true)

return clip

I basically used dragonfly's post as an example for how to do it :)

tsp
18th May 2005, 23:43
fRUTTiFrESH: ok it shouldn't look like that. mode 0 or 2 or usefloat16=false doesn't change the result? And I guess you uses the most recent drivers. About the speed of fft3dgpu. It is usual faster when doing cpu intensive operations like encoding to XviD/DivX.
Anyway thanks for the report hopefull that bug will be fixed (it is much harder to code for different GPU with all these different cards and drivers).

fRUTTiFrESH
19th May 2005, 15:20
@tsp

Hi,

I tried all modes and asked MacAddict how he is using the filter with his Radeon (Radeon 9500 -> Softmoded to 9700) but nothing helped. I have one of the very first 9700pro and maybe it won´t work with this filter. I´ll test it with a X700 or X800 when I upgrade my system.

Thanx Martin

paviko
19th May 2005, 22:47
@rhayman
It's really strange. Are you using the latest version of MVTools (0.9.9.1)?
Hmm, I'm proposing something stupid ;), but you can try changing part of TimeDenoise function from:

backward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 4, idx = 1, pel = 2)
backward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 3, idx = 1, pel = 2)
backward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 2, idx = 1, pel = 2)
backward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 2, idx = 1, pel = 2)
forward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 3, idx = 1, pel = 2)
forward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 4, idx = 1, pel = 2)
clip = clip.MvTools_MVDenoise(backward_vectors4d, backward_vectors3d, backward_vectors2d, backward_vectors1d,
\ forward_vectors1d, forward_vectors2d, forward_vectors3d, forward_vectors4d, tht = int(strength * 6),
\ thsad = int(strength * 800), thSCD1 = int(strength * 1000))

to:

backward_vectors4d = MvTools_MVAnalyse(clip, blksize = 16, isb = true, lambda = 1000, delta = 4, idx = 1, pel = 2)
backward_vectors3d = MvTools_MVAnalyse(clip, blksize = 16, isb = true, lambda = 1000, delta = 3, idx = 1, pel = 2)
backward_vectors2d = MvTools_MVAnalyse(clip, blksize = 16, isb = true, lambda = 1000, delta = 2, idx = 1, pel = 2)
backward_vectors1d = MvTools_MVAnalyse(clip, blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors1d = MvTools_MVAnalyse(clip, blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors2d = MvTools_MVAnalyse(clip, blksize = 16, isb = false, lambda = 1000, delta = 2, idx = 1, pel = 2)
forward_vectors3d = MvTools_MVAnalyse(clip, blksize = 16, isb = false, lambda = 1000, delta = 3, idx = 1, pel = 2)
forward_vectors4d = MvTools_MVAnalyse(clip, blksize = 16, isb = false, lambda = 1000, delta = 4, idx = 1, pel = 2)
clip = MvTools_MVDenoise(clip, backward_vectors4d, backward_vectors3d, backward_vectors2d, backward_vectors1d,
\ forward_vectors1d, forward_vectors2d, forward_vectors3d, forward_vectors4d, tht = int(strength * 6),
\ thsad = int(strength * 800), thSCD1 = int(strength * 1000))


Regards

rhayman
19th May 2005, 23:25
Paviko: Thanks for the help but unfortunatly it didnt work :(

bizzare, last time i tried using the latest version of mvtools avisynth said it could not open the plugin or something like that.
Now it seems to work (0.9.9.1) but i get a new error dammit :)

New error message is:

http://img.photobucket.com/albums/v154/rhayman/error.jpg

My clip is definitly 720*546 so i dont know why i get this error?

EDIT: Looking back in the previous posts i found that changing ntsteps from 16 to 4 seems to work?
What difference does this value make?

Another question, I have a samsung vp-d101 (its quite new it think, got it at christmas) Anyway the quality on it in my opinion is terrible. it takes mini-dv tapes. I thought the tape might be the problem at first but even on the lcd view you can still see loads of noise :(

I was just wondering if this is normal for cameras. the camera had no light so i would expect bad image quality in dark rooms but not as bad as the pic below. Even in well lit places the quality still sucks.

The avisynth scripts in this thread help quite a bit though.
(thanks to everyone for there work)

Just wondering if anyone knows any tips on how to increase picture quality on cams.

http://img.photobucket.com/albums/v154/rhayman/camcap.jpg

http://img.photobucket.com/albums/v154/rhayman/badq0copy.jpg

This image above is taken in better light but still bad.
(image cropped)

I would not usually mind but the quality makes them a pain to encode to dvd without heavy artifacts.

paviko
21st May 2005, 13:09
@rhayman
I'm glad you've overcome problems.

Looking back in the previous posts i found that changing ntsteps from 16 to 4 seems to work?
What difference does this value make? It makes no diffrence, not visible by eye.

I was just wondering if this is normal for cameras. the camera had no light so i would expect bad image quality in dark rooms but not as bad as the pic below. Even in well lit places the quality still sucks. In low-lights all consumer cameras (with Panasonic GS-400) gives bad image. In your case there is too much red. The best is to do manual white balance in your camera before shoting indoors. To improve quality you can try ColorYUV filter (to remove too much red, gain video (so it's brighter)) and then remove noise.

Regards

rhayman
6th June 2005, 19:07
thanks for the reply paviko, sorry i left it so long, completely forgot about this thread. :)

Well im just about to go on holiday so i was messing about with the camera again and found that the image quality is very good in sunlight.

So im guessing all cameras are not that good in dark places unless they cost about £1000 and have a light on them. sucks eh :)

this is annoying as i do most of my recording at night.

I may just wait for blu-ray before i transfer them so i can use stupidly high bitrates on them. But they probably wont be around for about 2 years :(

SurfaceCleanerZ
7th July 2005, 11:19
3-Chip Camcorders are better with low light situations! But even not that cheap!

vikhei
12th July 2005, 21:50
Hi folks, I'm a complete novice in DV trying to find the suitable workflow to make MPEG2-DVD and MPEG4AVC-Std.Profile from low light (and normal light as well) DV tapes made with consumer Canon camera.

I did try paviko's solution and some others as well. Here's my findings.
MSU DeNoise, Convolution3D in VHS Bad, PureMotion APP plugin producing a lot of blur, APP built-in noise filter - all those were tested and are significally worse!

I got around 0,85fps speed with TimeDenoise.avs script on Intel P4 3GHz 1GB RAM machine. Is that normal?

I have all my DV material in 16:9 PAL (PAR 1.422) but for some reason after AviSynth DirectShowSource PAR is not preserved and reset to square pixel. Any way to restore PAR?

Sure i can do resize like 720x405 or 1024x576 but I'm not sure that is the right way to go. As for resizing of interlaced DV material - can't say LanczosResize command be placed in the script end _after_ Weave? If height is untouched like in 1024x576 case?

The another unclear thing is using frame serving (debug mode frame server) with multi-pass encoding - time required to do say 2 passes will be twice more than the time actually needed to denoise the material - is that unavoidable when running the script on encoding stage?

I'm basically trying to limit software choices to AviSynth, DebugMode FrameServer, APP 1.5, AE DVD 1.5, CCE SP for DVD, Nero Recode for MP4AVC and do appreciate your thoughts on the subject.

cwk
18th July 2005, 08:32
Hello Vikhei,

Yes, those encoding speeds are within normal limits. MVDenoise and FFT are excellent noise filters, but very slow. You can try adding a SetMemoryMax(256) to the beginning of your script and see if this helps at all.

If you have the hard drive space, you can create a temporary file compressed with the Huffyuv(YUY2) or Lagarith(YV12) codecs as output from this script. Both are lossless. You can then multi-pass encode using this output file as the source. The drawback of this method is the amount of space needed to hold the file.

I cannot help you with your aspect ratio problem.

cwk

sasam
19th August 2005, 09:39
After getting sick of using Noiseware, Noise Ninja and Neat Image because of the bugs and memory leaks in this programs and the fact that each individual frame looks great but video not because each frame is processed differently, I do a search and find this great thread.
I mostly capture TV and this is a lifesaver and it is better and faster then picture processing programs.
Paviko thank you very much for this great script.
If you or anybody else find a way to improve the script please report your findings.

Backwoods
19th August 2005, 12:56
Evaluate: Unrecognized exception!
TimeDeNoise.avs, line 12

With the latest MVTools loaded,

Works:
ImageSource("capture_2.png")
Lanczos4Resize(720,480)
ConvertToYUY2(interlaced=false)
TimeDenoise(1.0,interlaced=false)

Doesn't work:
DirectShowSource("PERFECT_PLATE.avi")
FieldDeinterlace(blend=false)
Lanczos4Resize(640,360)#or (720,480)
TimeDenoise(1.0,interlaced=false)

It seems once anything relating to motion happens, I receive any error. Any ideas?

sasam
23rd August 2005, 15:08
I have noticed that this script doesn't work with some codec's.
While I can open all files with directshowsource() some crash in this script.
Backwoods try using file encoded by different codec. I use mjpeg and it works fine.

Backwoods
23rd August 2005, 20:16
Will do.

EDIT: You are correct. Ok, well that solves that.

o2xygen
25th August 2005, 23:11
Where can I find the setmemorymax.avs file?
It Paviko's method runs very slow here, and I am wondering if that will fix this.
thanks

cwk
25th August 2005, 23:23
Hello o2xygen,

If you are looking to use the SetMemoryMax option to increase the amount of memory available to a script, you do not have to utilize an external AviSynth script.

If you add SetMemoryMax(256) to the top of your script, AviSynth will no what you are talking about.

ck

Backwoods
25th August 2005, 23:30
Or if you like, you can make an "setmemorymax.avsi" file in your "X:\...\AviSynth 2.5\plugins\" dir. And within that file put which setting you like.

SetMemoryMax(256)

This will make that setting load each time you open an AVS file without having to type it each time.

o2xygen
26th August 2005, 15:14
something else, is it better the footage to be interlaced or progressive?

IF progressive then should I change the main.avs
to
clip = AVISource("C:\avisynth\someavi.avi")
clip = clip.TimeDenoise(1.0,interlaced=false)

Then should I change the timedenoise.avs as well? (IF ITS BETTER TO KEEP THE FOOTAGE INTERLACED, THEN DON'T BOTHER AS I WILL DEINTERLACE IT AFTER THIS.)
function TimeDenoise(clip clip, float "strength", bool "interlaced"){
strength = default(strength, 1.0)
interlaced = default(interlaced, false)

order = (clip.getparity == true) ? 1 : 0

clip = (interlaced == false) ? clip.ConvertToYV12(interlaced = true) : clip.ConvertToYV12()
clip = (interlaced == false) ? clip.TDeint(mode=1,order=order,type=2) : clip

clip = clip.FFT3DFilter(sigma = strength / 2, bt = 2, bw = 48, bh = 48)

backward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 4, idx = 1, pel = 2)
backward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 3, idx = 1, pel = 2)
backward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 2, idx = 1, pel = 2)
backward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 2, idx = 1, pel = 2)
forward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 3, idx = 1, pel = 2)
forward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 4, idx = 1, pel = 2)
clip = clip.MvTools_MVDenoise(backward_vectors4d, backward_vectors3d, backward_vectors2d, backward_vectors1d,
\ forward_vectors1d, forward_vectors2d, forward_vectors3d, forward_vectors4d, tht = int(strength * 6),
\ thsad = int(strength * 800), thSCD1 = int(strength * 1000))

clip = clip.ConvertToYUY2()
clip = (interlaced == false) ? clip.separatefields().selectevery(4,0,3) : clip
clip = clip.VagueDenoiser(threshold = strength, wavelet = 3, method=1, nsteps=4 ,chromaT=0.8, Wiener = false,
\ percent = 80, interlaced = true) ####This was false
clip = clip.LimitedSharpen(ss_x = 2, ss_y = 2, strength = 255, wide = true)
clip = clip.Unfilter(int(strength * 4), int(strength * 4))
clip = (interlaced == false) ? clip.Weave() : clip

return clip
}
those in red are those that I modified and most probably are wrong...

Wilbert
26th August 2005, 16:05
IF progressive then should I change the main.avs
to
clip = AVISource("C:\avisynth\someavi.avi")
clip = clip.TimeDenoise(1.0,interlaced=false)
Yes.

Then should I change the timedenoise.avs as well?
No. If you do that your progressive footage is treated as interlaced (unless you specify interlaced=true) :)

o2xygen
26th August 2005, 18:35
:thanks:
one last thing... Deinterlace before or after denoising?
thanks in advance

bananacreamandpeca
10th January 2006, 20:48
This degrain.dll I keep reading about in the AutoGordianknot logs,
is that the work of the TS. ??

I would like to add, yes it;s amazing.

But I just used agk 2.20 and encoded SW. Episode IV Empire Strikes Back
And I must say, yes it's asome sort of a complaint.
--> It makes the picture very clean. too clean! very sterile,
like if some scnenes were very good CGI performances!

How can I override this degrain.dll from starting in AGK ?

So I can compare for myself.

It is an amazing filter, but I kinda like some grains that add to the tension
of certain scenes you know..

I realy do not know what drives these people to always digitaly destroy
sound that sounds great or a picture that already has life in it and suck it away.
Some scenes in SW now realy look like they were matte paintings.

a shame..

BigDid
10th January 2006, 21:26
...How can I override this degrain.dll from starting in AGK ?..
Hi,

Its not degrain, its removegrain from Kassandro.

You can try AGKPal/AGK Tweaker to change the filtering in AGK (more related to the AGK Forums ;) )
here: http://hansprestige.com/agkpal/AGKPal-0.11.zip
discussion here: http://forum.doom9.org/showthread.php?t=100517&highlight=agkpal

I use removegrain with mode=5 instead of mode=2 (AGK settings) keeps more details; for stronger use, try modes7,8,9 etc... see Kassandro chart in his removegrain pre 1.0 release
here: http://home.arcor.de/kassandro/RemoveGrain/

Did

ADI_RO
1st February 2006, 12:22
I must say that i am amazed of the quality this script can produce but unfortunately for me it dosen't properly work.

What i'm doing is caputring the dv video using WinDV,editing the video in Adobe Premiere and then i'm using avisynth with these scripts and virtualdubmod,from vdm i use fast recompress but with all the codecs that i use like huffyuv or Main Concept Dv Codec or even no compresion at all,the output is properly filtered for only 5 to 8 seconds,after wich even thow i only have 4 fps meaning that the script is still working,a lot of the noise reaper,i think the problem might be with MvTools_MVAnalyse,i'm using 0.9.9.1,i was unable to find the latest version,from what i've understand i have to make a donation,i will if that will fix the problem for me :).

paviko
1st February 2006, 22:57
@o2oxygenone last thing... Deinterlace before or after denoising?A bit late to answer ;), but before is recommended, because this script is deinterlecing video when it's not progressive.

@ADI_ROthe output is properly filtered for only 5 to 8 seconds,after wich even thow i only have 4 fps meaning that the script is still working
Really, really strange. What version of avisynth, what parameter for memory used by avisynth, how much RAM you've got? The new version of MVTools (1.0.3) is available again on Fizicks website. But probalby it's not the cause of this behaviour. How about commenting out the line with MVTools call and comparing output:
change this
clip = clip.MvTools_MVDenoise(....
to:
#clip = clip.MvTools_MVDenoise(....

Regards

ADI_RO
2nd February 2006, 15:31
I'm using AviSynth_256_r2 i tryed also with the official one but with the same results.

The scripts that i use are the original one posted by u and the one with limitedsharpen2 wich is a little faster,but they both work with that same problem.

I have 1 gb of pc 3200 oc at 600 mhz dual channel,i didn't use SetMemoryMax,should i? how much memory should i use?

MVTools (1.0.3) is still unavailable,i would have wanted to try out MCNR_simple2 but that one dosen't work without the latest version of MVTools.

Here is a sample with the problem i was talking about at the moment in wich the noise start reapearing after 6 s from the begining using fast recompres from vdm with Main Concept Dv Codec,the script used is the one with limitedsharpen2 :

http://rapidshare.de/files/12382854/2.avi.html

ADI_RO
3rd February 2006, 14:24
Using SetMemoryMax didn't change anything,i used 256 and 512.

Also removing MvTools_MVDenoise line resulted in the noise that i was talking about being there all along from the start to the end.

Tryed the script on a p4 with the same result,i don't know what else tot do,i realy liked what these scipt can do.

Didée
3rd February 2006, 14:51
Try decreasing SetMemoryMax, instead of increasing ...

The point is that MVTools by itself uses lots of memory, independant of what Avisynth uses for the script. Try some low values like SetMemoryMax(32|40|..|64) ... the lower you can get away with, the better.

And just to make sure - are you talking about the "TimeDenoise" function? You're referring to "this script", which is somewhat vague ...

Lastly, at this place (http://home.arcor.de/dhanselmann/_stuff/), you'll find not only the script for MVNR_simple, but also one of the needed incredients.

ADI_RO
3rd February 2006, 17:49
Thanks ,yes i was refering to Timedenoise Function.

No luck with SetMemoryMax(32) wich is the lowest,alldow something did hapen my render speed was half now then it was before,after that i replaced the MVTOOLS.dll with the one from 1.0.3 but again same thing happend.

There was no Mvnr_simple on that link only MCNR_simple2.

ADI_RO
3rd February 2006, 22:21
Ok,i gave SeeSaw and MCNR_simple2 a try and the results are even better and gues what it works all the way :) whitout even using SetMemoryMax command ,thanks again Didée.

The script i used :

aviSource("e:\test.avi")

Import("LimitedSharpenFaster.avs")
Import("SeeSaw.avs")
Import("MCNR_simple2.avs")

ConverttoYV12(interlaced=true)

LimitedSharpenFaster(ss_x=2.5,ss_y=2.25,strength=30,smode=4)

fft3dfilter(sigma=5,plane=0)
fft3dfilter(sigma=6,plane=3)

a = last
b=a.degrainmedian(mode=1).cnr2()
SeeSaw(a,b,NRlimit=17,bias=18,Smode=11,Szp=18,SdampLo=20)

In the end i replaced MCNR_simple2 becouse the render speed was 1 fps.

paviko
5th February 2006, 11:48
after that i replaced the MVTOOLS.dll with the one from 1.0.3 but again same thing happend
Then I have no idea what can be wrong :(

Regards

fRUTTiFrESH
6th February 2006, 07:03
New FFTW Version 3.1 is out http://www.fftw.org !

Download the Win32 binaries, extract libfftw3f-3.dll, rename it to fftw3.dll and replace the old one in the \windows\system32 folder.

Somehow it was a bit slower than the old binary (AthlonXP 3000+ / Barton core). Please post some of your benchmarks (can be done with benchf.exe from the archive)

D:\FFTW-3.1>benchf.exe -opatient 64 128 256 512 1024 2048 4096
Problem: 64, setup: 33.33 ms, time: 555.46 ns, ``mflops'': 3456.6
Problem: 128, setup: 72.76 ms, time: 1.22 us, ``mflops'': 3672
Problem: 256, setup: 144.42 ms, time: 2.70 us, ``mflops'': 3789.8
Problem: 512, setup: 289.08 ms, time: 5.99 us, ``mflops'': 3847.1
Problem: 1024, setup: 520.38 ms, time: 13.18 us, ``mflops'': 3883.9
Problem: 2048, setup: 1.01 s, time: 31.57 us, ``mflops'': 3568.1
Problem: 4096, setup: 2.08 s, time: 74.45 us, ``mflops'': 3301


A Changelog can be found here: http://www.fftw.org/release-notes.html

AVIL
6th February 2006, 19:00
For general information:


The new version crashes gaussianblur, an avisynth's filter from tsp's variableblur 0.4 filter pack. Avisynth's filter FFT3dfilter 1.8.5 from Fizick don't crashes and (apparently) runs ok.

My system is XP professional edtion SP1. Pentium III 800Mhz 384 Kb RAM.

tsp
6th February 2006, 22:18
it might be because fft3dfilter is not staticly linked to fftw.dll while gaussianblur is. Does anyone see improved performance with fft3dfilter with fftw 3.1?

ron spencer
7th February 2006, 19:38
neat image makes neat video:

http://www.neatvideo.com/index.html?sni

jriker1
9th April 2006, 04:51
Trying to figure out how to add the following two lines to the below script:

LanczosResize(704,480,0,0,352,240)
AddBorders(8,0,8,0)

Any ideas? Tried sticking them after the avisource, before the return, putting clip= before each. Doesn't take. I know the limitedsharpen.avs file has a LanczosResize value in it so may have to directly put it there, however wasn't sure.

Here it is:

Example:

Import("limitedsharpen.avs")
Import("timedenoise.avs")

clip = AVISource("filename.avi")
clip = clip.TimeDenoise(1.0)

return clip


Regards

Thanks.

JR

Blue_MiSfit
25th April 2006, 21:52
I would say that the samples are pretty good, but I do see some loss of detail / sharpness - particularly the guy's hat. It's minute, and when played back, the temporal nature of video might mask that...

Still yet, it's not phenomenal I think...

Not bad though :D

~misfit