Log in

View Full Version : Super Resolution using MVTools


Pages : 1 [2]

lisztfr9
16th November 2012, 09:46
This is a very interesting thread, but i'm wondering if it's not finally an equivalent to temporal denoising ? T denoising will also manage to enhance contrast by keeping pixels if adjacent to others, and flushing more isolated... details are kept across frames. Maybe mix T denoising with with edge detection, or make temporal edge detection... my 2 cents :)

Jenyok
16th November 2012, 17:23
lisztfr9
.
Any suggestions and improvements ?

lisztfr9
16th November 2012, 23:53
@Jenyok

Maybe blend stronger the frames close to the current. 'cause of temporal drifting, a far frame on time axis holds less relevant information.


Edit :

The problem is to discriminate between what is noise and what isn't. But the sharpening stage will sharpen also noise, which will be blend later inside the other frames. So you can't escape the temporal denoising, more efficient than spatial denoising, combined with motion compensation.

bcn_246
23rd November 2012, 15:53
Quite impressed actually, maybe there is a way to use SVPflow instead of MVTools2?

Has anybody had a look at the Dee Mon Video Enhancer?. I've used it a few times and, while far from perfect, it has produced some pretty good results (on the highest quality settings).

Tempter57
26th November 2012, 11:07
@Jenyok

The problem is to discriminate between what is noise and what isn't. But the sharpening stage will sharpen also noise, which will be blend later inside the other frames. So you can't escape the temporal denoising, more efficient than spatial denoising, combined with motion compensation.

# http://forum.doom9.org/showthread.php?t=142704
# ==== plugins ===
#avstp.dll
#RGTools.dll
#nnedi3.dll
#AddGrainC.dll
#mvtools2mod.dll
#masktools2.dll
#dfttest.dll
#SmoothAdjust.dll
#splineresize.dll
#awarpsharp2.dll
#dither.dll
#dither.avsi
#flash3kyuu_deband.dll
#mt_xxpand_multi.avsi
#MSRmod.avs
#LindaSharp.avs
#O16mod.avsi
#HQDeringmod.avsi
#GrainFactoryLite_v1.2.avsi

function MSRmod(clip clp, int "W", int "H", float "thr", float "depth", float "strength", int "g1str", int "g2str", int "g3str", int "smode", int "radius", bool "aWarp4", bool "GF3", bool "lsb")
{
# Change those constants to tune for the best result of interpolation

# Resize
W = Default( W, 1280 )
H = Default( H, 720 )

# MSuper
hpad = 8 # 4
vpad = 8
pel = 2 # 1 or 4
rfilter = 4 # 2
sharp = 2 # 2

# MAnalyse
blks = 16
blksV = 8
overlap = blks / 2
overlapV = blksV / 2
search = 5
searchparam = 3
dct = 0

# MCompensate
thSAD = 321
thSCD1 = 400
thSCD2 = 120

# GradFun3
GF3 = Default( GF3, false )
smode = Default( smode, 0 ) # GradFun3 "smode" parameter
thr = Default( thr, 0.42 ) # GradFun3 "thr" parameter
radius = Default( radius, 16 ) # GradFun3 "radius" parameter

# AddGrain
g1str = Default( g1str, 8 )
g2str = Default( g2str, 6 )
g3str = Default( g3str, 3 )

# Overlay
opacity = 0.5

# Output_depth
lsb = Default( lsb, false )

# Sharpening
aWarp4 = Default( aWarp4, true )
depth = Default( depth, 2 )
strength = Default( strength, 0.85 )


brc = BilinearResize(clp, W, H)
psuper = MSuper(brc.removegrain(11), hpad=hpad, vpad=vpad, pel=pel, sharp=sharp, rfilter=rfilter)
vec1 = MAnalyse(psuper, truemotion=true, isb=true, delta=2, blksize=blks, blksizeV=blksV, overlap=overlap, overlapV=overlapV, search=search, searchparam=searchparam, lambda=1024, dct=dct)
vec2 = MAnalyse(psuper, truemotion=true, isb=true, delta=1, blksize=blks, blksizeV=blksV, overlap=overlap, overlapV=overlapV, search=search, searchparam=searchparam, lambda=1024, dct=dct)
vec3 = MAnalyse(psuper, truemotion=true, isb=false,delta=1, blksize=blks, blksizeV=blksV, overlap=overlap, overlapV=overlapV, search=search, searchparam=searchparam, lambda=1024, dct=dct)
vec4 = MAnalyse(psuper, truemotion=true, isb=false,delta=2, blksize=blks, blksizeV=blksV, overlap=overlap, overlapV=overlapV, search=search, searchparam=searchparam, lambda=1024, dct=dct)

nnedi3_rpow2(clp, rfactor=2, cshift="spline144resize", qual=2, nsize=0, nns=3, fwidth=W, fheight=H)

clp = (aWarp4 == true ) ? aWarp4(Spline36Resize(width*4, height*4, 0.375, 0.375), aSobel().aBlur(), depth=2, chroma=4) : LindaSharp(strength)
ssuper = MSuper(clp, hpad=hpad, vpad=vpad, pel=pel, sharp=sharp, rfilter=rfilter, levels=1)
c1 = MCompensate(clp, ssuper, vec1, thSAD=thSAD , thSCD1=thSCD1, thSCD2=thSCD2)
c2 = MCompensate(clp, ssuper, vec2, thSAD=thSAD , thSCD1=thSCD1, thSCD2=thSCD2)
c3 = MCompensate(clp, ssuper, vec3, thSAD=thSAD , thSCD1=thSCD1, thSCD2=thSCD2)
c4 = MCompensate(clp, ssuper, vec4, thSAD=thSAD , thSCD1=thSCD1, thSCD2=thSCD2)

t1 = Overlay(clp, c1, opacity=opacity)
t2 = Overlay(clp, c2, opacity=opacity)
t3 = Overlay(clp, c3, opacity=opacity)
t4 = Overlay(clp, c4, opacity=opacity)
f1 = Overlay(t1, t2, opacity=opacity)
f2 = Overlay(t3, t4, opacity=opacity)
Overlay(f1, f2, opacity=opacity)

U16() # 8 bit=> 16 bit
HQDeringmod(mrad=2, mthr=60, minp=1, sharp=1, Y=3, U=2, V=2, lsb_in=true, lsb=true)

Dither_resize16nr (W, H, kernel="spline", taps=32, noring=true)

# DEBANDING
(GF3 == true ) ? GradFun3(smode=smode, thr=thr, radius=radius, lsb_in=true, lsb=true): \
f3kdb(16, 64, 64, 64, 0, 0, dynamic_grain=true, dither_algo=3, input_mode=1, output_mode=1)

# AddGrain
GrainFL(g1str=g1str, g2str=g2str, g3str=g3str, g1size=1.3, g2size=1.1, g3size=0.9, g1soft=2, g2soft=2, g3soft=2, th1=24, th2=64, th3=96, th4=160, lsb=true, lsb_in=true)

Dither_convert_yuv_to_rgb (matrix="601", output="rgb48y", lsb_in=true)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
output = ( lsb == true ) ? Dither_convert_rgb_to_yuv (r, g, b, matrix="709", lsb=true, mode=7, ampn=1, ampo=0.6, output="YV16") : \
Dither_convert_rgb_to_yuv (r, g, b, matrix="709", lsb=false, mode=0)
return (output)
}

function LindaSharp (clip clp, float "strength")
{
strength = default(strength, 0.85)

and = clp.sbr()
Peter = and.removegrain(4,-1)
go = mt_makediff(and,Peter)
mt_lutxy(clp, go, "x y 128 - abs 1 2 / ^ 2 * "+string(strength)+" * y 128 - y 128 - abs 0.001 + / * +",U=2,V=2)
}

function sbr(clip o) {
rg11=o.removegrain(11)
rg11D=mt_makediff(o,rg11)
rg11DD=mt_makediff(rg11D,rg11D.removegrain(11)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
o.mt_makediff(rg11DD,U=2,V=2)
}

GEfS
20th December 2012, 19:18
## script Motion Super Resolution
##
blah blah blah blah


Could you send me a package include all plugins I need for this? :goodpost:

Tempter57
21st December 2012, 08:15
Could you send me a package include all plugins I need for this? :goodpost:
Used this plugins (http://nmm-hd.org/doc/AviSynth2.5%E6%89%A9%E5%B1%95%E6%BB%A4%E9%95%9C) and a package dither 1.21.0 (http://forum.doom9.org/showthread.php?p=1386559#post1386559)

matfra
28th December 2012, 03:22
hi,
I just tried MSR on a 640/480 video. SetMTMode 2 run at 2FPS. I have a I7 950. Is this a slow filter or im doing something wrong ? Does MSRmode run faster ?

matfra
28th December 2012, 15:31
Hi Tempter57,
The website to download the plugins are all in chinesse. I get find where to download it. Can you pack this into a zip file and share it for us please.

bcn_246
4th January 2013, 04:24
hi,
I just tried MSR on a 640/480 video. SetMTMode 2 run at 2FPS. I have a I7 950. Is this a slow filter or im doing something wrong ? Does MSRmode run faster ?
I dont think so, I tried MSRmod with a 720p sample on my i7@4.2GHz and barely got 1FPS...