View Full Version : color replacer or fill script?
FredThompson
6th November 2005, 01:27
I'm looking for a way to do a simple color replacement or fill, as done in paint programs, but with a script. Long story short, this seems like the easiest way to remove posterization and chroma changes across frames for single-color characters in animation. ("Den" in Heavy Metal') Either of these combined with ApplyRange would allow denoising that maintains the complex backgrounds.
Color replacement would use 3 arguments: test color value, target color value and tolerance. I suppose it could be enhanced with some form of lesser impact at the extremes of the tolerance to reduce creating hard edges in what should be gradients.
Fill would use 3 arguments: x, y, target color value. This seems easy enough to do in RGB32 with edge detection code borrowed from something like The GIMP.
Do either of these exist?
Wilbert
6th November 2005, 02:00
Use ColorKeyMask to put a mask on the test color value: http://www.avisynth.org/Layer
FredThompson
6th November 2005, 02:45
Good idea, thanks.
There are lots and lots of small white single-frame dropouts which must be damage to the source film. Are there routines to replace such pixels with an average of the same location from the preceeding and following frames? Two successive white pixels should prevent the replacement. This would probably also work for odd-shaped single-frame scratches.
foxyshadis
6th November 2005, 08:23
Clouded's CelForeground will also do something similar (veeeeeeeeery slowly), you could give a look at that if you want something even more automatic.
FredThompson
6th November 2005, 08:43
I'll give it a try. DeSpot isn't catching everything. I'm not looking for a magic bullet, just something that would detect a white pixel that is only one frame but stable for 2 frames before and 2 after. The odds are that's a film dropout.
This is turning into an obsession.
mg262
6th November 2005, 14:38
Also this, if you want speed, and you don't mind a lot of work by hand:
http://forum.doom9.org/showthread.php?t=99890
I think there are quite a few plug-ins that are intended to catch jumps like that... IIRC Fizick also wrote DeSpotMedian? Have a look at the ones that aren't being caught, and make sure that they are only jumping up for one frame...
FredThompson
6th November 2005, 16:01
I'm planning to learn CelForeground. Time is time, better to invest it once to learn the more powerful tool. Fast processing plus lots of manual work = slow speed :)
mg262
6th November 2005, 16:15
Well, I'm very happy to see people using it... but in all fairness I should repeat this:
This is a first attempt at a (for us) very ambitious project... so please go easy on us.
It's still a very experimental tool. We decided to release it because it suggests that this basic idea -- separating out foreground and recolouring it -- is feasible. It's far from perfect. But it had hit the point where it wasn't going to get better without feedback, so...
FredThompson
6th November 2005, 17:23
I haven't actually used it yet, just got pointed to the thread. It has some definite possibilities for a frustrating animation segment I'm fighting. There is posterization in the original which should have large flat surfaces (Den sequence of Heavy Metal.)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.