Log in

View Full Version : Need help to remove color bleeding


Gackt
1st February 2007, 19:25
Hello,
I'm new in avisynth's world, and i'm trying, to remove a strange kind of artefacts. I've used many strong filters, but they doesn't seems to be efficients :(. So, here is my script:

loadplugin("plugins/deen.dll")
loadplugin("ssiq.dll")
loadplugin("bifrost.dll")
loadplugin("TomsMoComp.dll")
imagesource("input1.png").convertToYv12().assumeframebased()
bifrost()
SSIQ(diameter=11,strength=50,interlaced=false)
TomsMoComp(0,15,1)
deen("a3d",3,6,1,6)

For a first "raw" test frame:
http://img250.imageshack.us/img250/4577/input1le5.th.png (http://img250.imageshack.us/my.php?image=input1le5.png)

... And when it is filtered:
http://img250.imageshack.us/img250/2457/output1qw8.th.png (http://img250.imageshack.us/my.php?image=output1qw8.png)
I can see this 'bleeding' on the left.



For a second "raw" test frame:
http://img250.imageshack.us/img250/7439/input2vb8.th.png (http://img250.imageshack.us/my.php?image=input2vb8.png)
... And when it is filtered again:
http://img250.imageshack.us/img250/5676/output2on0.th.png (http://img250.imageshack.us/my.php?image=output2on0.png)


The colors are 'bugging' again, and i don't see how to remove theses artefacts. Any help will be appreciated :D. Sorry for my bad english.

Gackt

foxyshadis
1st February 2007, 23:03
If the problem is color bleeding (the main problem I see, but since it's not in motion I can't see rainbowing), the particular filters you're using are only making it much worse. Not to mention killing kinds of other detail out as well. Based on the screenshots rainbowing doesn't seem severe, so bifrost+ssiq(11) is overkill. Deen is just doing way more damage than helping. Instead of strong filters, it probably needs gentler filters and some chroma sharpening. (Like MergeChroma(LimitedSharpenFaster()).) With an actual clip of the original source it would be a lot easier to recommend specific things.

Gackt
2nd February 2007, 00:12
Hello,
Thank you for your very fast reply :D . You have right: i have used too much strong filters which kill many details, but doesn't seems to be very efficients. I've tested your example: MergeChroma(LimitedSharpenFaster()), but i don't see the improvement :o... Can you explain more, your idea on chroma sharpening, please ?
As you asked, here (http://rapidshare.com/files/14468948/output_raw.rar.html) is a small clip of the original source. Sorry for my bad english.

Gackt

AVIL
2nd February 2007, 00:32
Hi,

This thread explain a function that can help :

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

good luck

TwoToad
2nd February 2007, 12:57
Hello, I also had a similar problem. Check out this thread and read Chainmax's advice...

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

Gackt
3rd February 2007, 16:35
Hello,
Thank you AVIL and TwoToad :).
I've got another smal problem of strange colors artefacts. Pictures seems to have straight yellow bars, and strange "gradian-posterisation" (dunno how to call it) when the image is dark.
See pictures from "raw" video here:
http://img251.imageshack.us/img251/5605/intput3ra5.th.png (http://img251.imageshack.us/my.php?image=intput3ra5.png)http://img233.imageshack.us/img233/4442/intput5lc7.th.png (http://img233.imageshack.us/my.php?image=intput5lc7.png)
And for a small clip which show this kind of color artefacts, see here (http://rapidshare.com/files/14719016/output_raw2.rar.html). If somebody can help me, it will be greatly appreciated, thanks.
Sorry again for my bad english.

Gackt

foxyshadis
3rd February 2007, 21:57
That's due to how limited YV12's dynamic range is in dark (and bright) areas is. It looks quite terrible in some dark shows. Pretty much the only solution is to add a deband filter (often only effective on playback, usually has no effect while encoding), but that won't fix all the ugly discolorations. As far as I know, the only way to really prevent it is 10-bit source and processing.

AVIL
4th February 2007, 00:17
Hi,

A good debanding filter is explained in this thread:

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

Gackt
4th February 2007, 10:34
Hello,
Thank you for your good informations foxyshadis, i'll try to keep this in mind :). For the debanding filter, as you said, it has "usually has no effect while encoding" and in AVIL's link (thanks) people said that it is effective when used on decoding process only. But, debanding used like:
imagesource("intput6.png").convertToYv12()
gradfunk(2.25).DeGrainMedian()
undot()
It's not bad, but not very 'viewed' when it's XViD encoded. Perhaps better in x264... So bad for me.