Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
12th September 2015, 14:18 | #1 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
halobuster - high quality halo remover
the filter is very high quality and almost harmless to details
cuz, it picks NLMeans, an advanced denoising algorithm instead of stuff like, blurring, minblur, destructive anyways as the dehalo kernel Code:
Function HaloBuster (clip input, bool "lsb", int "a", float "h", float "thr", float "elast") { lsb = Default(lsb, False) a= Default (a, 32) h = Default(h, 6.4) thr = Default(thr, 1.0) elast = Default(elast, 1.5) gray = lsb ? input.converttoy8 () : input.converttoy8 ().Dither_convert_8_to_16() gray = stackvertical (dither_get_msb (gray).padding (a, a, a, a),dither_get_lsb (gray).padding (a, a, a, a)) clean = knlmeanscl (gray, d=0, a=a, s=0, h=h, lsb_inout=True) mask = TCannyMod (converttoyv12 (clean.ditherpost (mode=-1)), sigma=1.5, mode=1, gmmax=50) mask = mask.converttoy8 () mask = mt_lut (mask, "x 255 / 0.24 - 3.2 * 0.0 max 1.0 min 255 *") mask = mt_expand (mask) mask = mt_inflate (mask) merge = dither_merge16_8 (gray, clean, mask) limit = Dither_limit_dif16 (gray, merge, thr=thr, elast=elast) crop = Dither_crop16 (limit, a, a, -a, -a) luma = lsb ? crop : crop.ditherpost (mode=-1) final = input.IsY8 () ? luma : ytouv (input.utoy8 (), input.vtoy8 (), luma) return final } Function Padding (clip input, int "left", int "top", int "right", int "bottom") { w = input.width () h = input.height () output = input.PointResize (w+left+right, h+top+bottom, -left, -top, w+left+right, h+top+bottom) return output } lsb --- clip is stacked 16bits or not (8bits) h --- filtering strength thr --- threshold, 0-255 scale, return pixel from the source clip if the difference < thr, otherwise, return pixel from the processed clip elast --- softness of the threshold only luma will be processed, chroma will be copied from the source clip demo: before after Code:
HaloBuster () Last edited by feisty2; 14th September 2015 at 15:16. |
12th September 2015, 15:33 | #5 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
I know this won't increase performance by much but you could use TCannyMod over TCanny. Also how about making padding optional? If the source has black borders (just like your sample) it's useless to add padding since you're essentially padding black borders.
I have some DVDs from the early 2000's, they have massive halos from extreme EE. I wonder how HaloBuster will handle such halos? Edit: I didn't know mastertapes had halos . A few years ago I had the same mentality, fortunately I've gotten most of my priorities straight since then, plus I pay the light bill . Last edited by Reel.Deel; 12th September 2015 at 15:54. Reason: wrong link |
12th September 2015, 16:21 | #7 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
and about padding, maybe you should crop the clip first, didn't crop my test clip cuz I'm sure everyone knows I'm lazy like hell 2. maybe it will work, just did some insane tests to see how it performs in extreme cases so I just sharpened the already full of halo clip, now it's... no comment Code:
sharpen (1) Code:
sharpen (1) HaloBuster (h=32) guess it works, you'll need a very large "h" 3.I "make" mastertapes, that means I distribute the "final results" without ANY sacrifice to quality, but the material clips might be... not so nice edit: I think I just typed "materiel"... Last edited by feisty2; 12th September 2015 at 16:46. |
|
12th September 2015, 19:10 | #9 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,685
|
This works extraordinarily well with the subtle halos in your original. It will be interesting to see if it can be tweaked to remove some of the really huge halos that happen with oversharpening of old SD material, like VHS. I look forward to playing around with it.
|
12th September 2015, 20:09 | #10 | Link |
Registered User
Join Date: Sep 2013
Location: Central Italy
Posts: 46
|
This is my first post..
ciao from Italy very good interesting thread excuse me for my bad english ..i'm trying to import avs halo remover but there are problems win8.1 32bit Avisinth 2.6 final I've installed Visual C++ Redistributable Package for Visual Studio 2015 (x86) in my system , but doesnt' work! Help me !! thx a lot! Last edited by Dreamland; 12th September 2015 at 20:49. |
12th September 2015, 20:29 | #11 | Link | |
The speed of stupid
Join Date: Sep 2011
Posts: 317
|
Quote:
Code:
knlmeanscl (gray, d=0, a=32, s=0, h=h, lsb_inout=True) Consequently the performance could be greatly improved by lowering this value, likely at the slight cost of quality. Code:
Function HaloBuster (clip input, bool "lsb", float "h", float "thr", float "elast", int 'a') { lsb = Default(lsb, False) avalue = Default(a, 32) h = Default(h, 6.4) thr = Default(thr, 1.0) elast = Default(elast, 1.5) gray = lsb ? input.converttoy8 () : input.converttoy8 ().Dither_convert_8_to_16() gray = stackvertical (dither_get_msb (gray).padding (32, 32, 32, 32),dither_get_lsb (gray).padding (32, 32, 32, 32)) clean = knlmeanscl (gray, d=0, a=avalue, s=0, h=h, lsb_inout=True) mask = TCanny (converttoyv12 (clean.ditherpost (mode=-1)), sigma=1.5, mode=1) mask = mask.converttoy8 () mask = mt_lut (mask, "x 255 / 0.24 - 3.2 * 0.0 max 1.0 min 255 *") mask = mt_expand (mask) mask = mt_inflate (mask) merge = dither_merge16_8 (gray, clean, mask) limit = Dither_limit_dif16 (gray, merge, thr=thr, elast=elast) crop = Dither_crop16 (limit, 32, 32, -32, -32) luma = lsb ? crop : crop.ditherpost (mode=-1) final = ytouv (input.utoy8 (), input.vtoy8 (), luma) return final } Function Padding (clip input, int "left", int "top", int "right", int "bottom") { w = input.width () h = input.height () output = input.PointResize (w+left+right, h+top+bottom, -left, -top, w+left+right, h+top+bottom) return output } Because let's not forget that we're talking about the same person who absolutely insists on stupendous amounts of colorspace precision (int32 because int16 isn't enough!!) for something that is so extremely destructive in its nature that it would not benefit from it at all (MVTools). |
|
13th September 2015, 17:02 | #17 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|