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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th June 2009, 01:33   #61  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
@nonsens112
Your suggestions seem fine to me. Making the temporal radius unequal going backwards/forwards is rather difficult taking into account windowing. For now I'll stick with only the first two items . No guarantees on when it will get done though.

@all
I discovered a bug in dfttest's window normalization under the following scenerios:

tbsize>1, tmode=0
consequence is a rectangular temporal window regardless of what twin is set to

sbsize>1, smode=0
consequence is a rectangular spatial window regardless of what swin is set to

In the smode=tmode=0 case you got rectangular for both temporal/spatial.

I should have a fix up later tonight.

Last edited by tritical; 5th June 2009 at 01:38.
tritical is offline   Reply With Quote
Old 8th June 2009, 15:59   #62  |  Link
nonsens112
Registered User
 
nonsens112's Avatar
 
Join Date: Jun 2007
Location: AVCCCP
Posts: 28
Quote:
Making the temporal radius unequal going backwards/forwards is rather difficult taking into account windowing.
I wonder what's difficult - current implementation limitations, possible quality issues (3D-ringing or like that) or smth else? or a mixture of?)))
Quote:
I'll stick with only the first two items . No guarantees on when it will get done though.
that's great anyways hope the features will be useful to many people.
nonsens112 is offline   Reply With Quote
Old 9th July 2009, 01:02   #63  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Hi. Please can someone tell me what options of this filter actually do? I mean when I need to adjust them? I have read the documentation but I don't understand it.

Quote:
Y,U,V - If true, the corresponding plane is processed. Otherwise, it is copied through to the output image as is. default: true,true,true
So I need to add u=false,v=false parameters if I want to process only luma?
Quote:
ftype - Controls the filter type. default: 0 - generalized wiener filter; mult = max((psd-sigma)/psd,0)^f0beta)
I guess I better leave it at default?
Quote:
sigma,sigma2 - Value of sigma and sigma2 (used as described in ftype parameter description)
"ftype parameter description"- this is that formula? I don't understand what it means. This option is something like sigma in FFT3Dfilter?
Quote:
pmin,pmax - Used as described in the ftype parameter description.
Again, have no idea what it means and when I should adjust it.
Quote:
tmode - Sets the mode for temporal operation
Default is good most of the time?
Quote:
swin,twin - Sets the type of analysis/synthesis window to be used for spatial (swin) and temporal (twin) processing.
Should I adjust this parameters or defaults is good?

Sorry for dumb questions. Please give me a link if I can read about it somewhere else.
Keiyakusha is offline   Reply With Quote
Old 9th July 2009, 01:23   #64  |  Link
Nightshiver
Quality Freak
 
Join Date: Jun 2007
Location: Area 52
Posts: 597
the sigma's are the strength of the filter. The high you set it, the stronger it denoises. For just about every use you will have for this filter, you will not need to alter anything, save the sigma.
Nightshiver is offline   Reply With Quote
Old 9th July 2009, 05:22   #65  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Quote:
So I need to add u=false,v=false parameters if I want to process only luma?
yep.

For general denoising, only ftype=0 and ftype=1 are useful. ftype=0 actually becomes ftype=1 as the value for f0beta approaches 0. pmin/pmax/sigma2 are only used in ftype>1 so you don't need to worry about those. ftype>1 is really only useful if you plan to use the 'sfile' parameter to specify sigma values for specific fft coefficients... in which case you can accomplish all sorts of frequency domain manipulations.

As for tmode, I would always use 0. 1 is faster (its the same idea as smode=0 vs smode=1 in the spatial domain), but in the temporal domain it causes artifacts. swin/twin you could play around with. The defaults are what I've found to work best in most cases. They also worked best in the ssim/psnr tests I've done. See http://en.wikipedia.org/wiki/Window_function for some information on the different windows.

If you are trying to remove noise that isn't white, the nfile parameter (which allows you to specify blocks containing only noise, from which dfttest estimates the noise power spectrum) can be very useful.

Last edited by tritical; 9th July 2009 at 05:26.
tritical is offline   Reply With Quote
Old 9th July 2009, 13:32   #66  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Oh, big thanks for the explanation!
Keiyakusha is offline   Reply With Quote
Old 27th July 2009, 07:36   #67  |  Link
rkalwaitis
Robert
 
Join Date: Jan 2008
Location: Stuttgart
Posts: 407
Tritical,

I am trying to use the nfile option and I receive an error that states unable to open nfile. Is there something special I should be doing. Perhaps a little example. Thanks. Also is there a way to make the nfile do each frame, remember the results for use by the denoiser, instead of working on an average?

Thanks
rkalwaitis is offline   Reply With Quote
Old 28th July 2009, 18:55   #68  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Quote:
I am trying to use the nfile option and I receive an error that states unable to open nfile. Is there something special I should be doing. Perhaps a little example.
What is your script? What is in your nfile? When I use the nfile option it works fine... so I need a little more information about your problem.

Quote:
Also is there a way to make the nfile do each frame, remember the results for use by the denoiser, instead of working on an average?
You actually have a clip where the noise power spectrum is changing on every frame, and the same position on the image is always flat with just noise? Or do you intend to manually specify locations for every frame?

Last edited by tritical; 28th July 2009 at 18:57.
tritical is offline   Reply With Quote
Old 3rd August 2009, 20:03   #69  |  Link
rkalwaitis
Robert
 
Join Date: Jan 2008
Location: Stuttgart
Posts: 407
Tritical I have no real script for use of the option. I was trying to make it work via your read file. I thought that the nfile took a sample of a frame and used that to compute denoising. I was just wondering if it could do it frame by frame.

Thanks K
rkalwaitis is offline   Reply With Quote
Old 3rd August 2009, 20:48   #70  |  Link
onesloth
Registered User
 
Join Date: Jul 2007
Posts: 137
Quote:
Originally Posted by rkalwaitis View Post
I thought that the nfile took a sample of a frame and used that to compute denoising. I was just wondering if it could do it frame by frame.
Somebody correct me if I'm wrong but my understanding is that one uses nfile by defining an area of one frame from the clip where there is nothing but noise (e.g. a flat color background). The analysis of that noise area is used to tweak the denoising parameters for the whole clip *not* just the frame in which the area is defined.

I think Tritical's point is that he would be really surprised if the noise in your clip changed significantly from frame to frame (thus requiring a new noise sample) and that it would likely be impossible for you to find a flat noise-only area in *every* frame that would be suitable for defining the noise.

Last edited by onesloth; 3rd August 2009 at 20:50.
onesloth is offline   Reply With Quote
Old 4th August 2009, 15:13   #71  |  Link
rkalwaitis
Robert
 
Join Date: Jan 2008
Location: Stuttgart
Posts: 407
This makes sense to me. Thanks for an explanation. Thanks Tritical for the great denoiser.
rkalwaitis is offline   Reply With Quote
Old 3rd September 2009, 17:35   #72  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
I'm getting ghosting with the new dfttest

my script was this:

Code:
MPEG2Source("sample.d2v", info=3)
colormatrix(hints=true)

dfttest()
And I'm seeing ghosting in some dark area. Noticed the blue coat.

Original:


dfttest:



I've uploaded a sample here.
lansing is offline   Reply With Quote
Old 3rd September 2009, 18:20   #73  |  Link
tritical
Registered User
 
Join Date: Dec 2003
Location: MO, US
Posts: 999
Have you tried reducing tbsize and/or sigma, or running dfttest on a motion compensated version of the video? dfttest is definitely not immune to ghosting when using 3d filtering.
tritical is offline   Reply With Quote
Old 3rd September 2009, 19:43   #74  |  Link
mgh
Registered User
 
Join Date: Oct 2004
Location: India
Posts: 321
dfttest is excellent at removing compression artefacts such as blocking and also at removing the noise you get when capturing analog tv from mildly weak channels. Have seen its deblocking powers mentioned in other threads here but not in this one
Nothing else i have tried is as good as dfttest at presrving details.
thanks for a superb filter.
__________________
A shut mouth gathers no foot
mgh is offline   Reply With Quote
Old 3rd September 2009, 20:31   #75  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by tritical View Post
Have you tried reducing tbsize and/or sigma, or running dfttest on a motion compensated version of the video? dfttest is definitely not immune to ghosting when using 3d filtering.
I get what you mean now. I decreased the tbsize to 1 and the ghosting went away. Thanks for the help.
lansing is offline   Reply With Quote
Old 2nd October 2009, 07:11   #76  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
deblocking script

Hi all!
I written simple script for deblocking VCD (my daughter have big collection anime on VCD and I want transfer to DVD replace 6-8 VCD to one DVD DL) result very good.
Code:
MPEG2Source("AVSEQ01.d2v",5,6,info=3)
source=ColorMatrix(hints=true)
sigma=110*1.5
sigmamc=110
sourcef=source.dfttest_dfttest(Y=true,U=false,V=false,tbsize=1,ftype=1,sbsize=8,sosize=6,sigma=sigma)
sourcef=sourcef.dfttest_dfttest(Y=false,U=true,V=true,tbsize=1,ftype=1,sbsize=16,sosize=12,sigma=1.5*sigma)
sclip = source.msuper()
sclipf = sourcef.msuper()
vf1=manalyse(sclipf,isb=false,delta=1,overlap=4,badSAD=1000)
vf2=manalyse(sclipf,isb=false,delta=2,overlap=4,badSAD=1000)
vf3=manalyse(sclipf,isb=false,delta=3,overlap=4,badSAD=1000)
vb1=manalyse(sclipf,isb=true,delta=1,overlap=4,badSAD=1000)
vb2=manalyse(sclipf,isb=true,delta=2,overlap=4,badSAD=1000)
vb3=manalyse(sclipf,isb=true,delta=3,overlap=4,badSAD=1000)

mcomp7 = interleave(\
  mcompensate(source,sclip,vf3,thSCD1=600)\
, mcompensate(source,sclip,vf2,thSCD1=600)\
, mcompensate(source,sclip,vf1,thSCD1=600)\
, source\
, mcompensate(source,sclip,vb1,thSCD1=600)\
, mcompensate(source,sclip,vb2,thSCD1=600)\
, mcompensate(source,sclip,vb3,thSCD1=600))
chroma=mcomp7.dfttest_dfttest(Y=false,U=true,V=true,tbsize=7,ftype=1,sbsize=16,sosize=12,sigma=1.5*sigmamc).selectevery(7,3)
mcomp7.dfttest_dfttest(Y=true,U=false,V=false,tbsize=7,ftype=1,sbsize=8,sosize=6,sigma=sigmamc).selectevery(7,3)
MergeChroma(chroma)
#StackVertical(source,last)
I use different spatial block for luma and chroma, because it is YV12 and chroma resolution 2 time little than luma (please advice) .
Also I think will be useful find optimal matrix (sfile parameter) based on MPEG quantizer, but why? For analog capture I use only sigma and increase sigma for chroma.
Any suggestions, please welcome!
With kind regards yup.
yup is offline   Reply With Quote
Old 21st November 2009, 09:35   #77  |  Link
VincAlastor
Registered User
 
Join Date: Sep 2009
Location: Berlin
Posts: 173
dfttest is to crazy slow for hd encoding. can i use the gpufftw library or a cuda library instead? (http://gamma.cs.unc.edu/GPUFFTW/)
VincAlastor is offline   Reply With Quote
Old 21st November 2009, 17:16   #78  |  Link
markanini
Registered User
 
Join Date: Apr 2006
Posts: 299
Quote:
Originally Posted by VincAlastor View Post
dfttest is to crazy slow for hd encoding. can i use the gpufftw library or a cuda library instead? (http://gamma.cs.unc.edu/GPUFFTW/)
Wow, that would be sweet!
markanini is offline   Reply With Quote
Old 25th November 2009, 07:43   #79  |  Link
Vitaliy Gorbatenko
viterra
 
Join Date: Feb 2003
Location: St. Peterburg, Russia
Posts: 142
It seems the project abandoned. Have not updated. I think it should look for the implementation of FFT on Open-CL, as the most promising and unlike CUDA universal.
Vitaliy Gorbatenko is offline   Reply With Quote
Old 28th March 2010, 08:54   #80  |  Link
Great Dragon
Registered User
 
Great Dragon's Avatar
 
Join Date: Feb 2005
Location: Ukraine, Lviv
Posts: 121
It's a great filter you've made, tritical. Thanks.
And I have one question: can I disable completely a temporal filtering to use only spatial features?
Great Dragon is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 14:21.


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