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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th February 2016, 17:17   #1  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
Strong halos (black/white)

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
Attached Images
 
Mounir is offline   Reply With Quote
Old 19th February 2016, 13:44   #2  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
anyone ? please. I've tried finedehalo, it's not bad but not quite enough and only work on dark parts
Mounir is offline   Reply With Quote
Old 19th February 2016, 14:20   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Is this any good, http://avisynth.nl/index.php/UnFilter

Quote:
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'.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 19th February 2016, 17:52   #4  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
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 ?)
Mounir is offline   Reply With Quote
Old 20th February 2016, 14:56   #5  |  Link
EHarlen
Registered User
 
Join Date: Oct 2014
Posts: 34
Have you tried HaloBuster?

http://forum.doom9.org/showthread.php?t=172599
EHarlen is offline   Reply With Quote
Old 20th February 2016, 15:21   #6  |  Link
Dreamland
Registered User
 
Join Date: Sep 2013
Location: Central Italy
Posts: 46
I think Halobuster is great for halos and to preserve quality video!
Dreamland is offline   Reply With Quote
Old 21st February 2016, 07:32   #7  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by EHarlen View Post
that version is obsolete..
I have stopped support to all my avisynth stuff
I'm 100% vaporsynth now
feisty2 is offline   Reply With Quote
Old 21st February 2016, 15:30   #8  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
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)
Mounir is offline   Reply With Quote
Old 21st February 2016, 15:59   #9  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
...
#code from halobuster
mask = TCannyMod (converttoyv12 (clean.ditherpost (mode=-1)), sigma=1.5, mode=1, gmmax=50)
...
tell me it isn't edge masking
feisty2 is offline   Reply With Quote
Old 21st February 2016, 17:44   #10  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by Mounir View Post
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 filters? WarpSharp includes a ghost removal filter also.
Reel.Deel is offline   Reply With Quote
Old 22nd February 2016, 15:33   #11  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Quick & dirty halo removal. Will introduce some blurriness, but the halos are so huge you can’t avoid it.
Code:
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)
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 22nd February 2016, 19:14   #12  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
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
Mounir is offline   Reply With Quote
Old 23rd February 2016, 01:03   #13  |  Link
sephirotic
Registered User
 
Join Date: Apr 2008
Posts: 19
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.

Last edited by sephirotic; 27th February 2016 at 01:30.
sephirotic is offline   Reply With Quote
Old 24th February 2016, 15:00   #14  |  Link
EHarlen
Registered User
 
Join Date: Oct 2014
Posts: 34
Quote:
Originally Posted by sephirotic View Post
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?
EHarlen is offline   Reply With Quote
Old 24th February 2016, 17:43   #15  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Some experienced encoders
Quote:
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.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 24th February 2016 at 17:45.
StainlessS is offline   Reply With Quote
Old 27th February 2016, 01:30   #16  |  Link
sephirotic
Registered User
 
Join Date: Apr 2008
Posts: 19
Quote:
Originally Posted by EHarlen View Post
What encoders do this?
Fussoir and Yurasyk.
sephirotic is offline   Reply With Quote
Old 27th February 2016, 07:11   #17  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by sephirotic View Post
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.
Code:
mt_lut(mt_makediff(blur(1),last),"x 128 > 255 0 ?")
no sweat
feisty2 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.