Log in

View Full Version : clean + improve the colors + stabilize (HELP)


frank_zappa1
16th October 2017, 22:48
Hi my good friends, which filters I could use advanced to clean and improve the quality of this animated movie from the 80s is an official bluray remaster.

I'd like to clean the image, stabilize it and improve the colors.

here I have a script that looks good but not so good, it's not that advanced. If anyone can help me, I'll thank you a lot my friends.

LWLibavVideoSource("C:\Users\Carloncho\Downloads\The Transformers The Movie 1986 720p BluRay FLAC2.0 x264-DON\The Transformers The Movie 1986 720p BluRay FLAC2.0 x264-DON.mkv", format="YUV420P8")

Tweak(hue=0.0, sat=1.0, bright=0, cont=1.0, coring=True, sse=False, startHue=0, endHue=360, maxSat=150, minSat=0, interp=16)
ColorYUV(gain_y=0,gain_u=0, gain_v=0, off_y=0, off_u=0,off_v=0, cont_y=24, cont_u=107,cont_v=107,gamma_y=0, gamma_u=0, gamma_v=0, levels="", opt="", showyuv=false, analyze=false, autowhite=false, autogain=false)

mfToon2(ssw=4, ssh=4,xstren=80,xthresh=80,cwarp=true,sharpen=true,strength=50,wdepth=16.0,wblur=1,wthresh=0.5,drange=64,dboost=1.0,dlimit=30,debug=false,doutput=true,dclip="rclip1",scolor=$FF00FF)
FastLineDarkenMOD()

GradFun3(thr=2.00, radius=12, mask=3, mode=6, smode=2, debug=0, lsb=false, lsb_in=false, staticnoise=false, y=3, u=3, v=3)

original = last

super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
strength = 2
FFT3DFilter(bw=6, bh=6, ow=3, oh=3, plane=0, bt=1, sigma=strength)
denoised=FFT3DFilter(bw=216, bh=216, ow=108, oh=108, plane=0, bt=1, sigma=strength/8, sigma2=strength/4, sigma3=strength/2, sigma4=strength)

mt_lutxy (last, denoised, expr="x y < y 1 - x y > y 1 + y ? ?", y=3, u=3, v=3)

super = last.MSuper ()
super_a = denoised.MSuper ()

vf1 = super_a.MAnalyse (isb=false, delta=1, overlap=4, blksize=16)
vb1 = super_a.MAnalyse (isb=true, delta=1, overlap=4, blksize=16)

cf1 = MCompensate (super, vf1, thSAD=200)
cb1 = MCompensate (super, vb1, thSAD=200)
Interleave (cf1, last, cb1)
dfttest (sigma=1.0, tbsize=3, lsb=false,threads=16)
SelectEvery (3, 1)
GradFun3 (thr=0.25, lsb_in=false)

lvl_overshoot = 3.5
lvl_details = 2

o = last
w = Width ()
h = Height ()

edges = mt_edge (mode="prewitt", thY1=0, thY2=255)
details = mt_edge (mode="min/max", thY1=0, thY2=255)

mask_lines = edges.mt_lut ("x 6 - 50 *")
mask_lines = mask_lines.mt_expand ().mt_expand ().mt_expand ().mt_expand ()
mask_overshoot = edges.mt_lut ("x "+String(lvl_overshoot)+" - 2 ^ 40 *")
mask_overshoot = mask_overshoot.mt_inpand ().RemoveGrain (12, -1)
mask_overshoot = mt_logic (mask_overshoot, mask_lines, mode="max")
mask_details = details.mt_binarize (lvl_details)
mask_details = mask_details.RemoveGrain (21 ,-1).mt_expand ()
mask_final = mt_logic (mask_overshoot, mask_details, mode="min")
mask_final = mask_final.RemoveGrain (20, -1).RemoveGrain (20, -1)

o
BicubicResize (w/16 * 4, h/16 * 4, 1, 0).BicubicResize (w, h, 1, 0)
GradFun3 (radius=4, thr=0.6, mask=0, mode=6) # Huge blur
mt_merge (last, o, mask_overshoot, luma=true) # W/o overshoot
GradFun3 (thr=0.6, mask=0) # W/o banding
mt_merge (last, o, mask_final, luma=true) # Details protected

Prefetch(16)

What do you think, it's right, wrong, very wrong.
Someone could please help me to improve the script in a more professional way so that I can use it in this movie and maybe as a reference in others.

I don't know how to stabilize, if someone could please help me with the stabilization

Here I share a small clip of the movie

Transformers The movie 1986 [bluray]
It is the remastered version for the 30th anniversary in 4:3

https://mega.nz/#!BLol0byY!ilopZuxoylXIYVpz6g_eoXD7oKEC1CxqjCgm-goZ-Qc

many thanks

Wilbert
18th October 2017, 18:10
Please read the forum rules, especially number six. Thread closed.