View Full Version : Colour (color!) bleed solution - does this exist?
2Bdecided
23rd November 2007, 16:05
Unless I was dreaming, I'm sure I once read about a solution to colour bleeding that works by sharpening up soft transitions in the chroma by looking for approximately co-located sharp transitions in the luma, and moving/sharpening the chroma transition to match the luma.
Does this "ring a bell" with anyone? Does this exist, or was I dreaming?
The source I'm working with is S-VHS. Depite the supposed superiority over VHS, the chroma is horrible. (yes, I'm capturing via S-video).
Cheers,
David.
EDIT: obviously the title should say "does this exist?" - how do you edit titles?!
communist
23rd November 2007, 16:18
Thats the only thing I remember: http://forum.doom9.org/showthread.php?t=77074
2Bdecided
23rd November 2007, 16:57
Thanks communist - I don't think it's what I was thinking of - I certainly hadn't seen that thread before today. Sadly, it doesn't solve the problem here.
Cheers,
David.
Didée
23rd November 2007, 17:00
aWarpSharp with chroma processed by luma's bump map (cm=1, iirc).
http://forum.doom9.org/showthread.php?t=90000
2Bdecided
23rd November 2007, 17:19
Thanks Didée, I'll shall try that.
I've been searching some more, and I may have found what I was thinking of...
http://forum.doom9.org/showthread.php?t=107437&highlight=color+bleeding
...so unfortunately it was just an idea that was never taken up!
Cheers,
David.
2Bdecided
23rd November 2007, 17:30
http://forum.doom9.org/showthread.php?t=90000Where is unsharpmask for AVIsynth? I've looked for that before and couldn't find it, and can't find it now either! Is it inside something else?
EDIT: though I'm interested to find unsharpmask for AVIsynth anyway, in this case just the first awarpsharp line...
mergechroma(aWarpSharp(depth=20.0, thresh=0.75, blurlevel=3, cm=1))
...was enough to rescure this source - thank you Didée!
Many thanks,
David.
Didée
23rd November 2007, 17:45
unsharpmask is part of warpsharp.dll (from "warpsharp package" (http://avisynth.org/warpenterprises/#warpsharp)).
But it's not like it would have to be done in absolutely the way I did it there ... the idea was just to strongly sharpen up luma beforehand, so that aWarpSharp will "see" more luma edges it can warp chroma to. (Often there will be some chroma bleeding in places where there is no prominent luma edge). That's why I used unsharpmask ... other filters like e.g. TUnsharp (tritical) or VariableBlur (tsp) did not yet exist at the time when I did the original script. ;)
2Bdecided
23rd November 2007, 17:56
Ah, thanks! That makes sense. I will try something similar.
In the other thread, you mentioned "There was additional code to fight color artefacts that aWarpSharp was producing on the outmost frame borders - but the above should suffice to give a fair starting point."
Here, the (mainly black) edges of the screen are turning green. I can just crop it in this case, but if you have a nicer solution for general use, I'd appreciate it if you could share it.
Another dumb question: is there are way of making awarpsharp work in the horizontal direction only? Sometimes there isn't much vertical chroma bleed and it might make it look a little less artificial if I left chroma alone in the vertical dimension.
Cheers,
David.
Didée
23rd November 2007, 18:21
In the other thread, you mentioned "There was additional code to fight color artefacts that aWarpSharp was producing on the outmost frame borders ...
Here, the (mainly black) edges of the screen are turning green. I can just crop it in this case, but if you have a nicer solution for general use,
aWarpSharp's chroma bug is a strange one: sometimes it's there, sometimes not, sometimes it's triggered by cropping, sometimes not, ...
IIRC, I just padded the frame boundaries with BorderMirror (http://forum.doom9.org/showthread.php?s=&postid=518131#post518131), and cropped back later on. Primitive, but effective.
Another dumb question: is there are way of making awarpsharp work in the horizontal direction only? Sometimes there isn't much vertical chroma bleed and it might make it look a little less artificial if I left chroma alone in the vertical dimension.
No, not in that sense. aWarpSharp just works like it does. Possibilities are
a) use some laaaaarge supersampling in y-direction (slow, and gives a bad taste if you have to do that)
b) fiddle out the horizontal-only effect afterwards, utilizing MaskTools and a horizontal blur filter with large radius.
rfmmars
23rd November 2007, 20:11
http://forum.doom9.org/showthread.php?t=130712&highlight=color+fit
http://forum.doom9.org/showthread.php?t=94112&highlight=color+bleed
http://forum.doom9.org/showthread.php?t=125275&highlight=color+shift
See "Fdumps" [filter->de 0.21]
Richard
2Bdecided
28th November 2007, 16:20
Thanks again everyone.
I've found this works well enough for my source...
avisource("all.avs")
tweak(sat=1.3) # because the source is (and always has been) washed out
Vshift=4 # 2 pixels per tape generation
Hshift=2
mergechroma(last.crop(Hshift,Vshift,0,0).addborders(0,0,Hshift,Vshift))
bob()
converttoyv12(interlaced=false)
#noisey=last
mc_spuds(chro=true)
mergechroma(aWarpSharp(depth=20.0, thresh=0.75, blurlevel=2, cm=1))
#MergeLuma(noisey,0.25)
...then re-interlace.
To watch the raw output on screen, I preferred mixing some of the luma channel of the original back into the output (about 25%, as commented out above) to bring some noise back. However, for encoding, this is detrimental to quality, so I leave it "clean". The footage still looks as sharp as it ever did (which isn't that sharp by modern standards, but better than many home movies from the same era). The only unsolved problem so far is the processing time - hours for minutes. I might have to do less NR.
There is still more work to do on other issues, but at least the colours are now in the right places - even if they are not always the right colours! (poor white balance).
Cheers,
David.
AVIL
29th November 2007, 00:44
Hi,
An interesting filter for chroma bleeding and another chroma diseases is a virtualdub filter called «Camcorder color denoise». It seems also usable in avisynth with loadvirtualdubplugin method.
Get it at :
http://acobw.narod.ru/
Good luck
rfmmars
29th November 2007, 05:52
This was the best using VD plugins.
http://img144.imageshack.us/img144/5849/chromapt4.th.jpg (http://img144.imageshack.us/my.php?image=chromapt4.jpg)
EDIT: Its seems I posted this jpeg on the wrong thread, sorry about that.
Richard
2Bdecided
29th November 2007, 12:09
AVIL,
That's a great collection of plug-ins! I wish I could get the auto white balance to work (it goes black after a few frames in AVIsynth). The CCD plug-in is great for removing the colour noise and pushing it towards the edges it's crept away from, but surprisingly it removes more genuine colour details than awarpsharp.
rfmmars,
Thank you for all your help. That's an impressive result - thankfully my chroma bleeding doesn't look like that - that looks more like a "mis-interlaced chroma" problem.
Cheers,
David.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.