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

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

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th December 2004, 08:58   #21  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
@morsa
what kind of sourse do you use these settings on?
analog capture? DV capture? DVD? VHS? Broadcast?
Also, what sigma values do you actually use?
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)
DarkFoon is offline   Reply With Quote
Old 20th December 2004, 18:54   #22  |  Link
Leo 69
Registered User
 
Join Date: Nov 2004
Posts: 227
Actually I'd be very grateful to some guys here who'd post some good settings for this filter.For example "light denoising" "heavy denoising" etc. And "High Quality Standard denoising" would be great!

Сheers
Leo 69 is offline   Reply With Quote
Old 21st December 2004, 18:46   #23  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
So, people want 2D

Got it!

Version 0.3, 21 December 2004 - added block temporal size parameter bt (was fixed =3 internally).

bt - block temporal size, number of frames (1, 2, or 3, default = 3):

1 - only current frame (spatial 2D filter - fastest);
2 - previous and current frame;
3 - previous, current and next frame (slowest)


IMHO, for big noise we must use big sigma, and more large block 32x32 to prevent grid artifactes.

Probably for 2D block 32x32 is better too.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 21st December 2004, 19:50   #24  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
for More oe less noisy DV I use plane 0 sigma=2, plane 1 sigma=3 ,plane 2 sigma =4.
I don't remember the block size right now but I guess it was 16....
morsa is offline   Reply With Quote
Old 21st December 2004, 22:47   #25  |  Link
krieger2005
Registered User
 
krieger2005's Avatar
 
Join Date: Oct 2003
Location: Germany
Posts: 377
great filter, ass always... and you are right: it's very slow.

To prevent "bluring" of edges with high sigma-values one can use "FineEdges"-Function from "Didée" i guess. Here my try:
Code:
function CleanUp(clip c, int "eEnd", int "eStart", int "bw", int "bh", float "sigma", int "sharp", bool "mask"){c

eEnd=default(eEnd,8)
Flaechen" markiert
eStart=default(eStart,68)
bw=default(bw,32)
bh=default(bh,32)
sigma=default(sigma,3.0)
sharp=default(sharp,180)
mask=default(mask,false)

ed=c.FineEdge(16)
SurfaceMask=ed.Levels(eEnd,1,eStart,255,0,false)
ret=mask ? MaskedMerge(c,c.BlankClip(pixel_type="YV12", color=$66FF66),SurfaceMask,Y=3,U=3,V=3,useMMX=true) : NOP()
cleanSurface=c.AddBorders(0,0,bw+20,bh+20).FFT3DFilter(bw=bw, bh=bh, sigma=sigma).crop(0,0,-(bw+20),-(bh+20)).xsharpen(sharp)

ret= (!mask) ? MaskedMerge(c,cleanSurface,SurfaceMask,Y=3,U=3,V=3,useMMX=true) : ret

return ret
}
great job.
krieger2005 is offline   Reply With Quote
Old 21st December 2004, 23:54   #26  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
@Fizick
How does the "previous frame" part of the filter work?
does it take the unprocessed previous frame, and then process it, or does it take the processed previous frame and process it again?
Hmm, an example would be good, that doesn't seem to make sense...

For example:
The filter is set "bt=2".
I randomly access frame 10. The filter processes frame 9, and frame 10 in the FFT, and then gives the filtered output frame 10.
Then I move over to frame 11. When the filter processes frame 11, it also processes frame 10, but does it take filtered output frame 10, or does it take the original frame 10?

Gosh, I hope that makes sense. Anybody else know what I'm saying?
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)
DarkFoon is offline   Reply With Quote
Old 22nd December 2004, 07:21   #27  |  Link
State of Mind
Registered User
 
Join Date: Apr 2004
Posts: 105
Ok, I also have a noisy DV source, what are the commands to use this plugin? I am VERY eager to see how well this denoises my DV.

Last edited by State of Mind; 22nd December 2004 at 07:33.
State of Mind is offline   Reply With Quote
Old 22nd December 2004, 21:11   #28  |  Link
State of Mind
Registered User
 
Join Date: Apr 2004
Posts: 105
???
State of Mind is offline   Reply With Quote
Old 22nd December 2004, 21:46   #29  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
DarkFoon,
current versions has no memory, and procesed (spatially) all frames at every time step. It is not optimal, but easy coded. My filter is still experimental. I had some think about optimizing, and may be another temporal algo (Kalman) for 2D frequency "frames", but not rigth now. Sorry.
But (IMHO) the speed factor will not =2 for bt=2. Overlapped frame is large.

State of Mind,
do you have your own eyes? Try!
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 24th December 2004, 00:40   #30  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
@State of Mind
I tested this filter on my noisy DV capture and *angelic choir* it worked a miracle!!!
It would appear that the Y channel (plane=0, in the filter) is the noisiest. You can turn the filtering on so that it processes the other channels, but you wont get as dramatic of an improvement as you would with just the luma (Y, or whatever) being filtered.

Supposing that your capture is still 720x480 when you run this filter:

FFT3dFilter(sigma=2.0, bt=3, plane=0, bh=48, bw=48, measure=false)

That is what I used on my capture. Experiment with filtering the other planes in addition to this one.

@Fizick
Does the filter need square block sizes? Or could I get away with, for example, bh=48, bw=90? [for this example, assume that the block sizes fit exactly into the video frame.]
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)
DarkFoon is offline   Reply With Quote
Old 24th December 2004, 23:08   #31  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
DarkFoon, do you see any limitation or constrain on block size in my filter "manual"
But some sizes will result in very slow procesing due to FFT method implementation.
See FFTW doc for more info.
48 and 90 is OK.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 25th December 2004, 02:39   #32  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
where in the docs does it say what sizes might slow it down? Or what should I look for? Sorry, I'm not a programmer, so I am lost in those kinds of things.
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)
DarkFoon is offline   Reply With Quote
Old 25th December 2004, 11:42   #33  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
FFTW works most efficiently for arrays whose size can be factored into small primes (2, 3, 5, and 7), and otherwise it uses a slower general-purpose routine.

48 = 2*2*2*2*3 is OK
90 = 2*3*3*5 is OK
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 26th December 2004, 01:32   #34  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
Thanks!

Keep up the good work!
This filter has great potential, don't let it fall between the cracks.
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)
DarkFoon is offline   Reply With Quote
Old 26th December 2004, 12:50   #35  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally posted by Fizick
FFTW works most efficiently for arrays whose size can be factored into small primes (2, 3, 5, and 7), and otherwise it uses a slower general-purpose routine.

48 = 2*2*2*2*3 is OK
90 = 2*3*3*5 is OK
Shouldn't this info be in your filter's documentation, under "Performance considerations" or something like that?

(NB: I haven't tried your filter as I don't have sources that are noisy enough, so apologies if it's already in there... )

np: Donnacha Costello - Dry Retch (Pop Ambient 2002)
Leak is offline   Reply With Quote
Old 26th December 2004, 20:32   #36  |  Link
gst
Registered User
 
gst's Avatar
 
Join Date: Sep 2004
Posts: 16
This filter is really powerfull. Maybe the best denoiser out there, and one of the slowest to.
I've got interesting results with this combination on a noisy dvd source :

DRemoveGrain(mode=2).DRemoveGrain(mode=2)
crop()
Lanczos4Resize()
Unfilter(-5,-5).FFT3DFilter(sigma=3,bh=32,bw=32).Unfilter(-5,-5).DRemoveGrain(mode=1)

I've also made a few test with the block size. You can see results here :
http://x.spirit.free.fr/FFT3D.zip (4.69Mo)

Block size tested :
8x8;16x16;32x32;64x64

Codec : xvid
Matrix : eqm_v3ulr_rev2
Bitrate: 1.050mb/s

32x32 give me the best quality, but there's no big difference between 16x, 32x and 64x. 8x is the worst value for my source.

Good job Fizick
__________________
q3fuel
gst is offline   Reply With Quote
Old 26th December 2004, 23:31   #37  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
I usually work on anime, so my filter combination is much stronger than for video, for obvious reasons. But here it is, for those interested:

fft3dfilter(sigma=2.0, plane=0, bt=2, bh=48, bw=48, measure=false) #<- Y plane
fft3dfilter(sigma=3.0, plane=1, bt=2, bh=48, bw=48, measure=false) #<- U plane
fft3dfilter(sigma=4.0, plane=2, bt=2, bh=48, bw=48, measure=false) #<- V plane
msmooth(threshold=5, strength=3, mask=false)

Note: I use 48 because it is the largest number the divides into 720 and 480.

This is incredibly slow on my PIII, but it works excellently.
An explanation: the eye is most sensitive to luma, so that is filtered the least. But the difference between not filtering the luma and filtering it is quite visible; this can make or break the quality.
The reds (V plane, whatever you call it) are the most subsampled with my source (MPEG2 TV capture) so they can be filtered more powerfully.
Msmooth is to blend out the 'ghosting' that results (sometimes) from the temporal part of the filter. It's most noticeable when there are fast motions across large solid color areas.

To illustrate this, I have some pictures for comparison.

Original source frame (after IVTC, but no denoising):
http://www.freewebs.com/cassumnox/6343-original.png

Frame after FFT3D, but no Msmooth:
http://www.freewebs.com/cassumnox/6343-unsmoothed.png

Frame after FFT3D and Msmooth:
http://www.freewebs.com/cassumnox/6343-smoothed.png

The 'ghosting' I am talking about can be seen on the suitcase.

Note: compare the file sizes of the pictures too

Sorry the host is so slow, my usual server is down. :'(
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)

Last edited by DarkFoon; 27th December 2004 at 04:30.
DarkFoon is offline   Reply With Quote
Old 27th December 2004, 21:36   #38  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Quote:
...When the filter processes frame 11, it also processes frame 10, but does it take filtered output frame 10, or does it take the original frame 10? Gosh, I hope that makes sense. Anybody else know what I'm saying?
DarkFoon, seems now I understand your question

All normal temporal filters (fft3d too) always take only original frames on input, not prefiltered by previous steps.


Other comment: V plane is not quite "red". Ask Wilbert (or see his guide) for detail
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 27th December 2004, 22:10   #39  |  Link
DarkFoon
Awakened to video Dec2003
 
DarkFoon's Avatar
 
Join Date: Dec 2003
Location: US West
Posts: 191
V is not red?
Crap! Curse the internet's wealth of misinformation!
__________________
Mac killed my inner-child

My Quant Matrices:
Caerulea
For MPEG-2 DVD Destination Anime

Simple Lo
General Purpose MPEG-2 (tested with anime only)
DarkFoon is offline   Reply With Quote
Old 27th December 2004, 22:53   #40  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
V is the red minus the luma. Highering V will turn your clip to red and lowering it to green (you can check that with ColorYUV(off_v=x)).

btw, V and U are sampled "equally", so you can apply the same amount of filtering on them.
Wilbert is offline   Reply With Quote
Reply


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

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

Forum Jump


All times are GMT +1. The time now is 00:02.


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