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. |
![]() |
#1 | Link |
Registered User
Join Date: Nov 2010
Posts: 11
|
Dehalo on text
There are several instances of pretty blatant halos around text (mostly credits, but some text creeps up throughout the episodes too) in this source (there is some haloing on other parts of the source, but nothing as blatant, nor would I suspect as easy to fix, so for now I'm just focusing on the text):
Halo: http://i.imgur.com/PZwer.png Blurred: http://i.imgur.com/Mm6oL.png The second image is a simple blur(1.2) which does a better job at hiding the halos than any of the various dehalo filters I found lying around, but of course it destroys a lot of detail in more complicated scenes, and even on some of the kanji themselves. I tried preventing the more detailed parts of scenes, and scenes without text from being affected by throwing together a quick mask, but I don't really (obviously) have much experience trying to mask things off: Code:
halod = last dhalod = halod.blur(1.2) mask = halod.mt_edge(mode="laplace", thY1=30, thY2=30).averageblur(radY=5).mt_binarize(0) mt_merge(halod, dhalod, mask) Besides blurring the kanji (since I couldn't really think of a good way to expand just the edges of the mask) it doesn't take into account changes to the mask over time so sometimes as the background moves behind the text, portions of the text will flicker between halo'd and blurred. So I was wondering if anyone could think of some ways to improve on this idea. Basically better ways to detect the white text, expand the edges of the mask so it covers just the halos, and prevent the mask from popping in and out. Last edited by mikewando; 14th January 2012 at 13:43. |
![]() |
![]() |
Tags |
dehalo, masks, text |
Thread Tools | Search this Thread |
Display Modes | |
|
|