Log in

View Full Version : Enhance noise(sic!)


jemmel
20th November 2007, 11:57
Any suggestions out there howto ENHANCE the noise of a DV?

Perhaps possible to reverse the effect of any denoise-filter?

I don't want to just composite noise in from some other source. I want the original noise, but fatter and more dominant and grinding edges. :mad:
with decreasing intensity from the darker-coloured regions of the video-picture down to the lighter ones.

Didée
20th November 2007, 12:51
Like this?

o = last # your input
nr = o.fft3dfilter(sigma=8,bt=3,plane=4) # use whichever denoiser suits your needs
nrD = mt_makediff(o,nr,U=3,V=3) # get the diff between orig and denoised
# nrD = nrD.blur(0.8) # if you like, make the diff more "fat"
sic1 = o.mt_adddiff(nrD,U=3,V=3) # apply the inverse diff
bmsk = nr.levels(20,1.0,200,255,0,false) # make a brightness mask
sic2 = o.mt_merge(sic1,bmsk,luma=true,U=3,V=3) # apply everything acc. to brightness mask

stackhorizontal(o,sic2) # view before/after, side-by-side
(The script uses MaskTools v2 (http://manao4.free.fr/masktools-v2.0a32.zip).)

jemmel
20th November 2007, 13:26
yep, thank you.
yet not sick enough!
it's the edges, man! they aren't grinded yet.

Didée
20th November 2007, 13:47
I'm not completely sure what you mean by grinded edges. Do you want the edges to be "more clean", or to be "more dirty"?

jemmel
20th November 2007, 15:07
oh, you mean, whether to grind these edges down to a really smooth grain? No, i mean the real grind: to make them grainy, dirty, if you like. to make edges like sprinkled sand?

2Bdecided
20th November 2007, 16:55
dub to VHS and back to DV?

Didée
20th November 2007, 17:04
OK, here's some serious content destruction:

o = last
ox = o.width()
oy = o.height()

flat = o.FFT3DFilter(sigma=8,bt=3,plane=4)
enh = o.mt_adddiff(mt_makediff(o,flat,U=3,V=3),U=3,V=3)
\ .addborders(8,8,8,8,color=$828080)
noiseY= blankclip(o,width=64+ox/2,height=48+oy/2,color_yuv=$808080)
\ .addgrainc(128*128,0).bicubicresize(ox+16,oy+16,-1,1).blur(0.4)
noiseC= blankclip(enh,color_yuv=$808080).addgrainc(0,128*128)
noise = noiseY.mergechroma(noiseC)
sic3a = noise.repair(enh,1)
sic3b = noise.repair(enh,14)
sic3c = noise.repair(sic3a,1,-1)
sic3 = sic3a.merge(sic3b,0.4).mergeluma(sic3c,0.2).crop(8,8,-8,-8)

stackhorizontal(o,sic3) (Needs mt_masktools.dll, repair.dll from RemoveGrain (http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar), and addgrainc.dll (http://avisynth.org/warpenterprises/files/addgrainc_25_dll_20060610.zip).)

Check if this is sick enough.

Leak
20th November 2007, 17:16
Check if this is sick enough.
Is it just me, or do we owe this sudden demand for grinding[sic!] down video quality to Troublemaker Studios' "Grindhouse"? :D

np: Bola - Urenforpuren (Kroungrine)

DeathWolf
20th November 2007, 17:25
src = last
noise = addnoise() # substitute your fav. function
mt_logic(noise, src.mt_expand(), "min")
mt_logic(last, src.mt_inpand(), "max") # voila, sprinkled sand edges

jemmel
22nd November 2007, 22:40
src = AVISource("path").separatefields
ymask = src.levels(20,1.000,200,255,0,false)
v = VToY(src)
u = UToY(src)
uspect = u.levels(120, 1.000, 136, 0, 235)
vspect = v.levels(120, 1.000, 136, 0, 235)
lighten = overlay(uspect, vspect, mode="lighten")
mix = overlay(src, lighten.pointresize(720,288).mergechroma(src), mask=ymask, mode = "softlight", opacity=0.5)
mix.weave

like this?