Log in

View Full Version : Is there a way to remove black outlines around objects? (example inside)


8-BaLL
31st May 2015, 14:45
Hey guys,

I wonder if there is any script out there to remove the black outlines around objects (like on the Will's back)?

I tried dehalo_alpha, but it doesnt quite do the job for this task... And if I increase the values on dehalo_alpha it makes the whole image blurry... Also I guess dahlo_alpha is looking for white haloes, while the problem there are black countour-shadows... :confused:

http://108.imagebam.com/download/s0VmDPZr-93l-WYsvAzQPQ/41287/412868406/04-00%20def.png

Reel.Deel
31st May 2015, 14:54
The Fresh Prince of Bel-Air. Ahh, brings back good memories. :)

Anyways, is this from the NTSC DVD? Just asking because the picture looks like it has been upscaled. Not sure if this will work but try this script by Didée (http://forum.doom9.org/showthread.php?p=1176400#post1176400). If it doen't work as is maybe you can try TurnLeft (or TurnRight) before dehaloing.

8-BaLL
31st May 2015, 14:56
Its PAL DVD, ive just upscaled it, so its easier to see what I mean. I will try that script, thanks.

edit: the script didnt change much unfortunately.

tried a couple of things, theres no way to remove the back outlines without blurring other areas out, and then if you resharpen, the black outlines/halos come back to a degree.

Reel.Deel
31st May 2015, 15:14
Too bad, try some of the suggestions here: http://forum.doom9.org/showthread.php?t=168828 (bottom of the page)

johnmeyer
31st May 2015, 16:04
Too bad, try some of the suggestions here: http://forum.doom9.org/showthread.php?t=168828 (bottom of the page)I was the OP in that thread. I got some great suggestions but, unfortunately, none of them did anything to resolve the problem. One issue, I think, is that the black halos in my example were pretty wide (i.e., many pixels). Also, they were not just in the horizontal direction. The same thing appears to be true for the artifacts in this example.

Even if the detection logic can be created that can detect halos in both the horizontal and vertical direction (and every arbitrary angle in between), figuring out how to replace them with something that looks better than the original artifact is something that may be beyond what can be done when the halos are this wide.

That was my conclusion with that old Harvard-Yale Kinescope, and I think the same thing is true here.

[edit]In re-reading that old thread, a huge number of posts were deleted. I don't remember any controversy or unkind posts, so I don't know why so many things were removed. Therefore, you won't be able to learn much. Note, in particular, that after my first post, there is a huge time gap until a reply, but I am quite certain that I got lots of replies within 24 hours of my original post.

8-BaLL
31st May 2015, 16:24
Thanks, ok so the script on the bottom helped a little

w=width() h=height()
thin=spline64resize(w/4,h)
dehaloed=thin.dehalo_alpha(brightstr=0.0,darkstr=1.0)
diff=mt_makediff(dehaloed,thin)
mt_adddiff(diff.spline64resize(w,h,0.2))

thin2=spline64resize(w/2,h)
dehaloed2=thin2.dehalo_alpha(brightstr=0.0,darkstr=1.0)
diff2=mt_makediff(dehaloed2,thin2)
mt_adddiff(diff2.spline64resize(w,h))

it got rid of most black Halo, however it introduced some ghosting:
http://screenshotcomparison.com/comparison/129443

using another normal dehalo_alpha after the script didnt remove the ghosting introduced by the script...

But its getting close now :) Maybe someone has an idea how to clean up the rest of the ghosting ;)

It looks like the script picks up the image information from the wrong side when it removes black haloes. It should act in the exact opposite. Then it might work I guess.

@johnmeyer- thats exactly what I think too. With Haloes this thick, I doubt that I will find a good solution to remove it and not affect the rest of the image, so I figured Im just gonna encode as it is.


Another thing Im trying to decide is- this show is PAL50i, it means that it has 50 unique frames per second when you deinterlace it. The motion is ofcourse way better with 50fps, but it creates "soap opera" look. It feels like you watch a theatre show, to an extent. While I generally keep all 50 fps when encoding Live TV shows, sports shows etc. - Im not quite sure about this TV Series. Ill do 2 encodes and compare them against each other.

How do you guys feel about TV Series and 50fps? (let the encoding process aside, just visually). Looks like "fresh prince" and "Married with Kids(Al Bundy)" are both PAL50i, so Ill have to decide about the framerate...

creaothceann
31st May 2015, 18:25
I find the "soap opera" effect acceptable for these kinds of TV shows, but not for movies or anime (excluding purely CGI shows like Arpeggio or Sidonia).

8-BaLL
31st May 2015, 20:59
Alright thanks for your oppinion. Ive just compared both 25fps and 50fps, the 25fps doesnt look as natural during motion when compared to native 50fps.

Plus such shows like Fresh Prince, its all about dialogues, so they need no cinematic feel.

Interestingly enough, the encoding process takes the same ammount of time when I encode with 50fps and 25fps- 5.22fps for the 25fps encode and 9.57fps for the 50fps (twice the frame count) encode. Probably has something to do with QTGMC. At the end the encoding time is around the same.

So Ill encode with 50fps, because this is also how the show was broadcasted originally.

wonkey_monkey
31st May 2015, 22:03
So Ill encode with 50fps, because this is also how the show was broadcasted originally.

Not originally originally - that would have been 59.97fps.

8-BaLL
31st May 2015, 22:20
ofc, since its a US show :) On PAL TV we had max. 50fps though.