View Full Version : VHS Halo Nightmares & DGIndex Levels
zipi
24th January 2013, 04:18
Hello, I am in the process of attempting restoring some PAL VHS tapes, & having a real hard time with it.
I have cleaned the video up a little & ran it through qtgmc.
1. I have extreme Haloing edges I do not know how to get rid of, multi color ones:
http://www.freeimagehosting.net/t/crhuu.jpg (http://www.freeimagehosting.net/crhuu)
http://www.freeimagehosting.net/t/3ezk3.jpg (http://www.freeimagehosting.net/3ezk3)
2. If you look in the levels on the right of the pictures, it appears DGINDEX, is serving the D2V with PC LEVELS, although I did select the TV checkbox, it has no effect.
I need it to remain in TV levels, without unnecessary conversions.
As I am an AviSynth newbie, ANY info & help will be greatly appreciated, Thanks a lot!
poisondeathray
24th January 2013, 04:33
values Y' <15 look like they are from the pillarboxing, not the active image area
dgmpgdec serves the levels same as source, you can adjust them with levels() or similar filters if you want, but there isn't a big problem here
You can try various dehalo filters, but unlikely that you will get good results since the halos are very wide and severe. You will probably cause more damage than good
http://avisynth.org/mediawiki/External_plugins#Dehaloing
zipi
24th January 2013, 04:51
Thanks, I looked into what you said, it appears it is in the Halos.
Can it be the VHS to DVD recorder has some extreme sharpening when it records? Its an LG unit.
http://www.freeimagehosting.net/t/b2n67.jpg (http://www.freeimagehosting.net/b2n67)
poisondeathray
24th January 2013, 05:02
Yes, I would check to see if you can disable sharpening processing, or edge enhancement in the recorder unit. Check the manual to see if there are such settings
zipi
24th January 2013, 05:16
Just checked, no way to disable it.
What would one do in such a weird scenario?
Place a limiter after the source, so things sharpening filters etc can work correctly
& then put another limiter also at the end of script ?
Is there a way to create a mask that mimics this obviously horrible sharpening filter, & then attempt to invert it & substratct it or something of the sort?
poisondeathray
24th January 2013, 05:25
What would one do in such a weird scenario?
I don't think there is much you can do without some manual work... maybe other people have suggestions
Place a limiter after the source, so things sharpening filters etc can work correctly
& then put another limiter also at the end of script ?
I would be careful about sharpening this content at all - because of the existing halos
Is there a way to create a mask that mimics this obviously horrible sharpening filter, & then attempt to invert it & substratct it or something of the sort?
Many of the dehalo filters attempt to do something like this already. The problem is it's impossible to be accurate enough with the mask - You end up destroying many good lines or missing halos
Maybe other people will have better suggestions, but looking at the severity of the halos, this looks very difficult to treat
zipi
24th January 2013, 05:33
Many thanks, I was hoping to try & upscale this somehow, & with these halos, its just horrible :(.
If anyone can briefly guide me on how to even attempt this, or after looking at the images, recommend a dehalo filter that might be able to handle the job, thatd be great.
Mounir
24th January 2013, 06:47
have you tried this:
FastLineDarken(luma_cap=28,thinning=220) # adjust luma_cap carefully, thinning aswell
mergeluma(aWarpSharp(depth=9, thresh=0.6, blurlevel=1, cm=1))
awarpsharp is not mandatory but i thought it could be a plus
S_Prince
24th January 2013, 10:19
Well after doing some tests on the first jpg..result looks quite impressive.though the halo did not got removed completely.but it is quite good.Still A Lot of effort needed to make it something decent :(
I Just Worked on the halos..here it is :
http://img254.imageshack.us/img254/627/63523606.png
Special Thanks To 'Mounir' For The AwarpSharp line :)
Script :
a=Dehalo_alpha()
b=mergeluma(a,aWarpSharp(depth=9, thresh=1.0, blurlevel=4, cm=1))
Regards,
manono
24th January 2013, 11:27
2. If you look in the levels on the right of the pictures, it appears DGINDEX, is serving the D2V with PC LEVELS, although I did select the TV checkbox, it has no effect.
It's not supposed to have any effect. Those choices are for when you're creating VFAPIs. It's explained in the DGIndex manual.
Can it be the VHS to DVD recorder has some extreme sharpening when it records? Its an LG unit.
If you cared about these videos you wouldn't be converting them to DVD using a DVD recorder, intending to then work on them some more. You'd get a decent S-VHS player with a TBC and digitize them in a better way. Using a DVD recorder on your precious tapes is about the worst method you can use. Maybe all that edge enhancement is in the tapes themselves, but you'll never know if you just run them through the DVD recorder.
Didée
24th January 2013, 13:21
Dehalo_alpha is not suited for this kind of halo'ing. The pictures show darken-only halos, caused by a box kernel. DeHa-alpha assumes centered halo energy, and uses a gaussian-like kernel. Quite a different ballgame.
Warpsharp isn't well suited either. Methinks those halos are much too thick to combat them with awarpsharp.
If you're going to really remove the halos, you'll end up with something like that:
(Ignoring the text-areas, obviously)
http://thumbnails106.imagebam.com/23377/12408b233762997.jpg (http://www.imagebam.com/image/12408b233762997)
(Based on an expand.inpand orgy, plus some juggling, and some more)
Are you really sure you want to remove the halos? :)
S_Prince
24th January 2013, 13:44
Dehalo_alpha is not suited for this kind of halo'ing. The pictures show darken-only halos, caused by a box kernel. DeHa-alpha assumes centered halo energy, and uses a gaussian-like kernel. Quite a different ballgame.
Warpsharp isn't well suited either. Methinks those halos are much too thick to combat them with awarpsharp.
If you're going to really remove the halos, you'll end up with something like that:
(Ignoring the text-areas, obviously)
http://thumbnails106.imagebam.com/23377/12408b233762997.jpg (http://www.imagebam.com/image/12408b233762997)
(Based on an expand.inpand orgy, plus some juggling, and some more)
Are you really sure you want to remove the halos? :)
Yeah.This Looks Wonderful.:)
Didée
24th January 2013, 14:23
Well ... I can show you the script that I used:
imagesource("D:\__DL\crhuu.jpg").converttoyv12()
o = last ox=o.width() oy=o.height()
x1 = o.mt_expand().mt_expand(mode="horizontal").mt_expand(mode="horizontal").mt_expand(mode="horizontal")
\ .mt_inpand(mode="horizontal").mt_inpand(mode="horizontal").mt_inpand(mode="horizontal").mt_inpand()
x1 = x1.mergechroma(o)
x2 = o.repair(o.repair(o.repair(x1,1,0),1,0),12,0)
e = x2.mt_edge("prewitt",0,255,0,0).mt_lut("x 4 - 2 *").mt_expand().removegrain(11,-1).mt_expand()
\ .mt_expand(mode="horizontal").mt_expand(mode="horizontal").mt_expand(mode="horizontal")
x3 = o.mt_merge(x2,e,U=2,V=2).mt_lutxy(o,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=2,V=2)
x3a = x3.removegrain(11).merge(x3,0.251)
x3b = x3a.mt_makediff(mt_makediff(x3a,o).bicubicresize(ox/5/4*4,oy/4/4*4,.5,.25).bicubicresize(ox,oy,1,0),U=2,V=2)
# interleave(o,x1,x3b)
x3b
return(last)
But the problem is that this worked on the picture you posted, which is not the original resolution. If you feed your video with the original resolution (720x576, i.e. smaller) into this script, then several things won't "fit" anymore, and the result will be worse.
Lesson learned: post screenshots always in original 1:1 resolution. Do not resize. :)
FlimsyFeet
24th January 2013, 15:52
If you cared about these videos you wouldn't be converting them to DVD using a DVD recorder, intending to then work on them some more. You'd get a decent S-VHS player with a TBC and digitize them in a better way. Using a DVD recorder on your precious tapes is about the worst method you can use.
A little harsh, maybe? I agree with the SVHS player with TBC comment, but I think a decent DVD recorder model recording on the best quality setting (XP on my LG recorder averages between 8.75 and 9 Mbps) is not significantly worse than the "better way" (eg using a capture card with a lossless codec).
For VHS, I mean.
2Bdecided
24th January 2013, 17:19
A little harsh, maybe? I agree with the SVHS player with TBC comment, but I think a decent DVD recorder model recording on the best quality setting (XP on my LG recorder averages between 8.75 and 9 Mbps) is not significantly worse than the "better way" (eg using a capture card with a lossless codec).
For VHS, I mean.I have seen "good enough" VHS captures using a DVD recorder. I have also seen atrocious ones (too much noise, too low a bitrate, source desperately needed a TBC but one was not used).
This is neither - this is bizarrely over processed, so it looks like plastic (with halos!). At a low resolution or on a small display, it might look rather good (compared with some other possibilities; at least it'll look sharp and noise-free!) - however, if you're going to upscale it and watch it on a larger display, it's an awful place to start.
IME Noise can sometimes be removed better than you ever dared to hope for. OTOH Removing halos usually gives a result which is even worse than you feared!
Cheers,
David.
johnmeyer
24th January 2013, 17:32
The DVD recorder, by its design, should have the "HQ" circuitry turned off (it's the sharpening circuit). For VHS recorders that do have the ability to defeat this, the function is often called the "edit" control. You want to enable "edit."
[edit]After looking at the halos again, I don't think those were caused by HQ circuitry in the deck.
zipi
25th January 2013, 00:17
Thanks a lot for the replies!
I apologize for the plastic looking pics.
I hoped it will show the issue ..
I should have done it 1:1, thanks for the tip!
I have made a small sample (http://www.sendspace.com/file/y1zjcr) ,of the original mpg2, in an mkv container.
The transfer was done with the LG RCT689H recorder, in XP mode.
It has all the variations of it, the RGB 0 & RGB 255 Black white halos, (on what otherwise would be in the "TV range?)
the color halos, & the gentler thinner halos, that look like an offset double of the image,
& then also shots where it appears less pronounced.
Thank you!
zipi
27th January 2013, 20:38
Well, I have been trying some of the code suggested.
Mounir, thanks for the code, with awarpsharp, I did manage to do something about the chroma halos with the awarpsharp code, although I had to change "thresh=1.0" to "thresh=0.9", as awarpsharp2 that I have here crashed.
Didée, thanks for the code, it is way over my head, I couldnt undertand how to tweak it.
On an interlaced source like this, should I do all this before, or after QTGMC deinterlacing ?
I need some advice on understanding the correct chain for cleaning this.
I uploaded a sample in the post above, If you guys can please have a look, if these Halos can be eliminated/reduced.
Mounir
28th January 2013, 01:13
so what's the full code you have used finally, out of curiosity
zipi
28th January 2013, 02:53
I have not used a final result, just tried what you guys suggested, still need help Im afraid.
I just did the line you gave me, & changed thres to 0.9, aWarpSharp(depth=9, thresh=0.9, blurlevel=4, cm=1), & it did restrain the colored halos.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.