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

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th July 2012, 02:52   #1  |  Link
atra dies
Registered User
 
Join Date: Jul 2011
Posts: 32
Denoise without killing one frame content?

Mdegrain removed fire and smoke unique to single frames and I read in another thread someone had leaves disappearing. I adjusted many parameters including dct instead of spatial (only works with 8x8 blocks) and that only made me have to lower thsad. Reverting to mdegrain1 helps but then there is a lot of noise left.

Anybody have any special techniques they'd like to share?

dfttest works much better but then I am using tbsize 3 and if set too strong one frame content is removed. I am trying to use sst alone but setting sigma to 0 negates it somehow. I think it's a bug. Eliminating sigma parameter allows it to function. I am using mod 16 dither versions for both.

I have tried smdegrainmod,zzz denoise and tnlmeans and all of them are not as good as:

Code:
dfttest(u=false,v=false,ftype=0,f0beta=1,smode=0,sbsize=3,sosize=0,swin=7,tbsize=3,tmode=1,tosize=2,sst="0.0:1 1.0:30",dither=0,lsb=true)
Before I read about ssx ssy sst I had a generic sigma but it blurs of course. I am just playing around with sst values and have to set 1.0 really high to kill a lot of noise. Can sst be set with four points like ssx/y or are 0 and 1 only allowed? I don't know if tritical wrote this 16 bit version or if cretindesalpes did.
atra dies is offline   Reply With Quote
Old 27th July 2012, 06:47   #2  |  Link
nibus
Telewhining
 
Join Date: Mar 2010
Posts: 275
Post a sample of the source
nibus is offline   Reply With Quote
Old 27th July 2012, 22:04   #3  |  Link
atra dies
Registered User
 
Join Date: Jul 2011
Posts: 32
http://www.sendspace.com/file/j5yu1s

Code:
dfttest(u=false,v=false,ftype=0,f0beta=1,smode=0,sbsize=3,sosize=0,swin=7,tbsize=3,tmode=1,tosize=2,sigma=10,sst="0.0:1.2 1.0:100.0",dither=0,lsb=true)
I need to read or have someone say how ssx/y/t works. Does sst act solely on the results of ssx and ssy (or sigma=) or does it denoise temporally high frequency video content or the frequency of that content's change between frames?

Another solution may be to limit mdegrain to certain parts of a mask (the noisy grainy part).

Code:
ssx="0.0:0.0 1.0:80000.0",ssy="0.0:0.0 1.0:80000.0",sst="0.0:0.0 1.0:1000000.0"
^This has no effect at all but if I use sst alone and have no sigma= something happens. If I have sigma=0 with sst nothing happens but if I put sigma=1 it works. Must be a multiplication thing.

Last edited by atra dies; 27th July 2012 at 22:44.
atra dies is offline   Reply With Quote
Old 27th July 2012, 22:55   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Code:
# dgdecode.dll
# fft3dfilter.dll
# fluxsmooth.dll
# mvtools2.dll

mpeg2source("sample_(atra.dies).demuxed.d2v")
o    = last
pre  = o.fft3dfilter(sigma=3,sigma2=6,sigma3=4,sigma4=2,bw=16,bh=16,ow=8,oh=8,bt=3).fluxsmootht(2)
sup1 = pre.msuper()
sup2 = o.msuper(sharp=2,levels=1)
bv2  = sup1.manalyse(isb=true,delta=2,truemotion=false,global=true,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
bv1  = sup1.manalyse(isb=true,delta=1,truemotion=false,global=true,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
fv1  = sup1.manalyse(isb=false,delta=1,truemotion=false,global=true,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
fv2  = sup1.manalyse(isb=false,delta=2,truemotion=false,global=true,blksize=16,overlap=8,search=5,searchparam=6,DCT=5)
o.mdegrain2(sup2,bv1,fv1,bv2,fv2,thsad=319)

#interleave(o,last)
#stackhorizontal(o,last)

return(last)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 27th July 2012 at 23:00.
Didée is offline   Reply With Quote
Old 28th July 2012, 07:01   #5  |  Link
atra dies
Registered User
 
Join Date: Jul 2011
Posts: 32
It's better than defaults for mdegrain and the changes I made (except I like search=3) but not better than:

Code:
dfttest(u=false,v=false,ftype=0,f0beta=1,smode=0,sbsize=5,sosize=0,swin=7,tbsize=3,tmode=1,tosize=2,sigma=0.1,sst="0.0:0.0 1.0:100000.0",dither=0,lsb=false)
at leaving all of the flame and smoke. sbsize 3 is sharper but removes more smoke. dfttest also leaves some ugly big soft blob grain. I should probably put more points into sst.

I also cobbled together:

Code:
a=last
b=last.mt_edge(mode="prewitt", thY1=1,thY2=10000,thC1=0, thC2=0)
c=last.dfttest(u=false,v=false,ftype=0,f0beta=1,smode=0,sbsize=5,sosize=0,swin=7,tbsize=3,tmode=1,tosize=2,sigma=10,dither=0,lsb=false)
d= mt_merge (c, a, b, luma=true)
return d
But I'd have to tweak dfttest more and thY is int when I want float and I don't even know what the units of measurement really are there. Ideally I would be able to denoise below a threshold a lot and then have all the edges necessary remain. There's gotta be a more sophisticated way seeing as how I don't know what I'm doing.

I would use mdegrain on every other scene but I notice it removing some shading from faces in fast motion. Any dfttest fans have some scripts to share?

Last edited by atra dies; 28th July 2012 at 07:39.
atra dies is offline   Reply With Quote
Old 28th July 2012, 12:31   #6  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
Well, seems I can't be of any help. Trying your filter proposals (with dfttest v192 from dither package), I see almost no denoising happening at all. (?!?)

After fooling a bit around with dfttest (I use it quite seldom), I wasn't able to achieve anything that - for my taste - comes even remotely close to MDegrain.

Obviously, I have no clue what you want to achieve, or how you want to have things look like.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 28th July 2012, 12:50   #7  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 709
Have you tried nlmeansgpu? You should give it a go

separatefields()
NLMeansCL(A=4, S=2, B=1, aa=1.0, h=2.0,HC=1.5, plane=4,cpu=false,buffer=false,sse=true)
weave()
Mounir is offline   Reply With Quote
Old 28th July 2012, 21:56   #8  |  Link
atra dies
Registered User
 
Join Date: Jul 2011
Posts: 32
Quote:
Originally Posted by Didée View Post
Well, seems I can't be of any help. Trying your filter proposals (with dfttest v192 from dither package), I see almost no denoising happening at all. (?!?)

Well I may tweak what you posted to try to bring back some noise cause I am changing my mind all the time about this. I am thinking I like how mdegrain smooths the noise more than dfttest and produces a more natural output but I don't want to remove any part of the flame or smoke or make it faded. I see some important principles about how mdegrain works now from your suggestion, ie the calm search clip. I think I might try to make it mdegrain1 and that will help a lot.

(Is search=5 meant to focus the degraining on the horizontal movements of the picture and leave the vertical flame/smoke movement alone?)

I will also try nlmeansgpu and maybe post some comparison shots. This is important dammit cause I thought mdegrain was infallible!
atra dies is offline   Reply With Quote
Old 28th July 2012, 23:29   #9  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,390
search=5 is not related to horizotal or verrtical motion. It is just another scheme of doing the search cascade: hexagonal pattern with varying distance. It's the "best" available approximation short of doing a full search, but much faster.
(And search=3 "full" search surely is slow, but mostly a nonsense joke when used in combination with the standard "truemotion=true" parameter set of manalyse.)

Could be that the sigma's and thSAD were a little stronger than needed. Going down to

sigma/2/3/4 = 2.5, 5, 3, 2, // and in MDegrain: // thSAD=239

should be sufficient to do its job on the grain, and perform better at keeping the blazing flames.


BTW, nobody will notice if some flame strokes are a bit shortened or weakened in single frames. At playback speed, the changes are too fast to see.

But, if you concentrate too much on single-frame screenshots, and end up with some half-hearted (or overzealous, for that matter) denoising in general - that is what will be noticed.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée 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 08:10.


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