Log in

View Full Version : Removing ghosts... again


JanBing
21st October 2004, 16:26
I have already posted this on the "AviSynth"-board, but since the reactions to it are... well, basically NON-EXISTENT, I think it' not a bad idea to post my problem on this board as well.

I know, this question has been asked a million times on these forums, but searching through all the "how to remove ghosts"-threads didn't bring up any help to my problem. I guess an image is the best thing to start with:

http://www.scummbar.com/mi2/temp/anh2.gif

The original is an analog capture from a laserdisc. As you can notice, it has some ugly ghosting-halos on the left side of edges. I tried to eliminate these halos using the VirtualDub-filter "Exorcist", which, on the first sight, appeared to work perfectly (the image is just a little noisy, since it's a 256-color GIF).

Anyway, upon closer inspection, and after some (necessary) color correction, the Exorcist filter didn't turn out to be as good as hoped. Have a look at the next images (the right parts have been brighten up to show the problem more clearly):

http://www.scummbar.com/mi2/temp/oldnew1.gif

http://www.scummbar.com/mi2/temp/oldnew2.gif

You see, there's an "old" and a "new" method... the old one is the approach shown above, using "Exorcist" in VirtualDub. Unfortunately, after some color correction it becomes obvious, that Exorcist isn't all that great, since (by shifting luminance to remove halos) it creates a new set of halos, like the ones left of the face, and in the black areas of the arm on the lower image.

Now, I thought that it would be enough to just remove the bright halos, and so I created an AviSynth-script containing the Overlay-filter in its "Darken"-mode. You can see the result above as the "New method". By using the "Darken"-mode it only takes care of bright halos, and leaves the dark halos untouched... and I thought, since they're in the dark areas of the image, they're less ovious and hence negligible. Well, obviously I haven't thought it all through...

http://www.scummbar.com/mi2/temp/anhx.jpg

The bright halos are gone, but bright areas are still casting dark ghosts upon darker areas... like the two suns onto the sky.

Now, is there a way to REALLY remove these ghosts?

oo_void
21st October 2004, 17:39
Try giving IIP (http://forum.doom9.org/showthread.php?s=&threadid=70916&highlight=iip) a shot instead with the warp_Y and warp_UV value set to true.

Edit: Also from the looks of it, it seeams that the Luma channel is offset a bit (bad capture). You can true moving just the luma channel around a couple pixels to the right as see if that does the trick.

------
oo_void

JanBing
21st October 2004, 20:13
OK, the IIP-thing is REALLY complex... I don't understand it. After some fiddling I finally got it to run without an error, at least.

Maybe you could help me out here... just having the warp_y and warp_uv parameters set to true doesn't do anything to the halos... and the IIP itself just sharpens my image significantly (which I actually don't want... yet... I want to get rid of the halos before trying to improve the quality even more).

Regarding the Luma-offset... well... not, it's not exactly the luma-channel that's offset as you can see Vaders silhoutte is correct... there's just ghosting halos resulting from the analog capturing process.

I really don't know how to treat this.

oo_void
21st October 2004, 23:01
If IIP didn't do it... try this page (http://www.doom9.org/index.html?/capture/chroma_artefacts.html) and some of the recommendations listed.

------
oo_void

JanBing
21st October 2004, 23:27
Arrgh... ok, yeah, pointing me to the basics doesn't help, because obviously my problem is not covered there (or I would've found a solution myself).

And I don't know if IIP helps, since - as I said - I don't know how to use it correctly. I've just added this line to my script:

IIP(warp_y = true, warp_uv=true)

... and THAT didn't help, right. But maybe I am using it wrong.

oo_void
22nd October 2004, 00:05
Assuming that the source is perfect (the Star Wars LD is crap BTW ...), something is happening to affect the channels as they come from the source into your capture device.

If you can't chroma shift to correct the artifacts (Exorcist is just a chroma shifter), and masking the chroma (iip) doesn't do the trick, then you're probably SoL :sly:.

Ever consider using a better cable for captures?

------
oo_void

JanBing
22nd October 2004, 00:35
I am not the one who has captured it, I am just trying to find a way to improve quality. But yeah, he is thinking about buying some new equipment for doing it... guess it's the only way then.

I know, the laserdiscs aren't that great quality-wise, but getting rid of any artifacts occuring during capturing would yield at least acceptable results. And it's the only way to get the unaltered original trilogy.

The problem regarding "Exorcist" is that it darkens bright halos, and lightens up dark halos to compensate for these artifacts. Generally that works (especially with the bright halos). Unfortunately brightening up dark halos sometimes results in brightening up areas that are supposed to be black (even without the halo).

So basically it would be necessary to take the brightness of the surrounding pixels into account, although it's still impossible to differenciate between areas that are supposed to be black, and areas that just became black because of the halos. Another way would be including some kind of "soft threshold" into the Exorcist-filter (or the AviSynth-version of it, called "Ghostbuster") which takes the brightness of the artifacts into account. If the halo is black, it isn't brighten up at all... if it's very dark, it gets brighten up a little bit... and so on.

I am not able to script this, but I guess this board is full of people who CAN do it...