Log in

View Full Version : Strong halos (black/white)


Mounir
18th February 2016, 17:17
I can't seem to get rid off these black/white halos due to oversharpening. I've tried various dehalo filters without much success (unless i missed something ?). Thanks for your inputs

video sample DL Here (https://mega.co.nz/#!A9ZVnAjS!5V9kjgjeqdowGmPt0IWh-_i5Ym4-3ixd5Kc8NC5FcE4)

Mounir
19th February 2016, 13:44
anyone ? please. I've tried finedehalo, it's not bad but not quite enough and only work on dark parts

StainlessS
19th February 2016, 14:20
Is this any good, http://avisynth.nl/index.php/UnFilter

UnFilter is a simple and reasonably fast Avisynth Soften/Sharpen filter.

It implements 5-tap user adjustable horizontal and vertical filters designed to (slightly) reverse previous efforts at softening or edge enhancement that are common (but ugly) in DVD mastering. Since DVDs were intended originally for interlaced displays this has caused content providers to vertically filter them even a bit more to hide interlacing artifacts. They sometimes overdo the edge enhancement.

When softening it will attempt to approximate the inverse of a simple 3-tap edge enhancement filter. When sharpening it will attempt to approximate the inverse of a simple 3-tap softening filter. For the math and logic involved see the comments in the UnFilterALL.inc member included in zip file.

The effects are fairly mild but be aware that excessive sharpening makes things harder to compress and may bring about the dreaded "edge enhancement artifacts" the people complain about in DVDs from some studios. And while excessive softness may hide noise it loses detail and generally just looks ugly. So it is probably best to just try to reverse whatever has already been done to your source.

Have never tried it. Dont know of any other 'reverse sharpeners'.

Mounir
19th February 2016, 17:52
Unfilter essentially blur the whole image on the x or y axis and i only want to blur black/white lines along the edges.
Can i achieve that with some other filter maybe (unfilter+masks or something ?)

EHarlen
20th February 2016, 14:56
Have you tried HaloBuster?

http://forum.doom9.org/showthread.php?t=172599

Dreamland
20th February 2016, 15:21
I think Halobuster is great for halos and to preserve quality video!

feisty2
21st February 2016, 07:32
Have you tried HaloBuster?

http://forum.doom9.org/showthread.php?t=172599

that version is obsolete..
I have stopped support to all my avisynth stuff
I'm 100% vaporsynth now

Mounir
21st February 2016, 15:30
I've tried with edges masks but frankly it's not worth it:

avisource()
main=last
main
Halobuster() #(or whatever dehalo filter)
filtered=last
main
mt_edge().mt_expand
mymask=last
mt_merge(main, filtered, mymask)

feisty2
21st February 2016, 15:59
...
#code from halobuster
mask = TCannyMod (converttoyv12 (clean.ditherpost (mode=-1)), sigma=1.5, mode=1, gmmax=50)
...


tell me it isn't edge masking

Reel.Deel
21st February 2016, 17:44
I can't seem to get rid off these black/white halos due to oversharpening. I've tried various dehalo filters without much success (unless i missed something ?).]

No surprise there, these are not your typical halos. Have you tried any of the ghost removal (http://avisynth.nl/index.php/External_filters#Ghost_Removal) filters? WarpSharp (http://avisynth.nl/index.php/WarpSharp) includes a ghost removal filter also.

cretindesalpes
22nd February 2016, 15:33
Quick & dirty halo removal. Will introduce some blurriness, but the halos are so huge you can’t avoid it.
h = Height ()
w = Width ()
cy = BicubicResize (w / 8, h, 1, 0).BicubicResize (w, h, 1, 0)
cmd = mt_makediff (cy)
cm = cmd.mt_lut ("x 134 > 255 x 122 < 255 0 ? ?")
cr = last.Merge (cy, 0.8)
mt_merge (last, cr, cm, y=3, u=2, v=2)
You can play with the blur radius (w / 8), thresholds (122 for dark halos and 134 for bright halos) and blur mix (0.8)

Mounir
22nd February 2016, 19:14
hmm yeah that's very blurry.

What about a repaint filter ?
Detect the real edges, Detect the halos (black/white) use the colours outside the halos to repaint inward

sephirotic
23rd February 2016, 01:03
Some experienced encoders use a technique of strong dehalo, producing whiteish/bright secondary halo artifacts. To remove these secondary halos, they them use a prefilter technique of comparing a blured prefilter image of the picture and masking the brighter differences. I have no idea how to implement that, tough, but the results I saw, were amazing.

EHarlen
24th February 2016, 15:00
Some experienced encoders use a technique of strong dehalo, producing whiteish/bright secondary halo artifacts. To remove such halos, they them use a prefilter technique of comparing a blured prefilter image of the picture and masking the brighter differences. I have no idea how to implement that, tough, but the results I saw, were amazing.

What encoders do this?

StainlessS
24th February 2016, 17:43
Some experienced encoders

What encoders do this?

Perhaps sephirotic is referring to 'people' (the word 'experienced' might suggest that he means persons rather than software).

EDIT: And sephirotic post looked to me just like script posted by cretindesalpes.

sephirotic
27th February 2016, 01:30
What encoders do this?

Fussoir and Yurasyk.

feisty2
27th February 2016, 07:11
To remove these secondary halos, they them use a prefilter technique of comparing a blured prefilter image of the picture and masking the brighter differences.


mt_lut(mt_makediff(blur(1),last),"x 128 > 255 0 ?")

no sweat