Log in

View Full Version : Could someone tell me how to get rid of a halo?


Logan9778
14th September 2017, 19:10
Hey guys,

I'm trying to get rid of the halo shown in this pic of Fawlty Towers. They are through out the espisodes. I think its from oversharpening. This is from the mpeg2 stream directly from the DVD.

https://picload.org/image/dgrwladi/faultytest.mkv-00000.png

You can see the halo on her left arm. I'm trying to use Vine to do it, but it's not doing anything and it's probably an error in my code ( cause I'm a total noob in Python :p). I took the code from Fiesty2's examples of Vine's halo removal. Could someone look at my code and tell me what I'm doing wrong?

from vapoursynth import core
import vapoursynth as vs
import havsfunc as haf
import mvmulti
import Vine
import Plum
vs.get_core(threads=8)
video = core.ffms2.Source(r'H:\DVD Workspace\Fawlty Towers\Season1\title01.mkv')
clip = video[2486:2500]
clip = haf.QTGMC(clip, TFF=True, FPSDivisor=1, Preset="Placebo")
clip = core.fmtc.bitdepth(clip,bits=32,fulls=False,fulld=True)
ref = Vine.Basic(clip, h=31.18, sharp=0.48)
ref = Vine.Basic(ref, h=13.86, sharp=0.16)
clip = Vine.Final([clip, ref], [Vine.Super(clip), Vine.Super(ref)], [6, 2, 4], sigma=2.2, alpha=0.18)
clip = core.fmtc.bitdepth(clip,bits=8,fulls=True,fulld=False)
clip.set_output()

I'm using vspipe to output it to X264.

vspipe --y4m faulty.vpy - | "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x64\x264_8bit_x64.exe" --crf 18.0 --preset veryslow --tune film --profile high --merange 32 --bframes 16 --no-fast-pskip --aq-mode 2 --sar 197:180 --colormatrix bt470bg --colorprim bt470bg --transfer bt470bg --output "F:\\faultytest2.mkv" --demuxer y4m --stdin y4m -

:thanks:

poisondeathray
14th September 2017, 19:37
why qtgmc ? (and at default strength settings , it tends to oversharpen, probably making your problem worse )

Logan9778
14th September 2017, 21:02
Hmm. Good point. Maybe I'm screwing myself with it. I was just used to encoding the old Doctor Who with it. I"ll try # it out, and see what the video looks like. Does the Vine code look ok? I'm really having a hard time with people using video, clip, and ref. Are these like reserved variables or just normal variables people made up?

Edit: Thanks Poison! I commented out qtgmc and it looks a lot better. Now I just have to figure out how to de-interlace without making the halos worse.

poisondeathray
15th September 2017, 02:35
Not too sure about vine. I played with it a while back, but I found it only useful for fine delicate halos. (It might be that I used the wrong settings. Probably) . But you can look at other dehalo filters as well or maybe a combination

You can still use QTGMC, but I would reduce the sharpness settings since it's counterproductive in this case. IMO the default settings are way too strong for contrasharpening , especially if source is fairly decent