View Full Version : Old filter: mfRainbow (but new version!)
mf
27th December 2003, 23:54
mfRainbow-v0.2 has hit doom9! (http://mf.creations.nl/avs/functions/mfRainbow-v0.2.avs)
For people who haven't been around long enough to know mfRainbow 0.1, the script is meant for derainbow postprocessing. That means, after a comb filter like GuavaComb has processed the image, it's been through a deinterlacer/ivtc, if there's still some rainbowing left, this is the thing you're looking for. I made it to tackle the nasty rainbows left in this raw I've got of Naruto 64. No, it doesn't remove the ones in Chouji's background. Those are too evil :D. I'm gonna do those with some shotgun-on-a-fly method. :p
Speed: 3fps. Do I look like a person that cares about slow scripts? :D
Chainmax
28th December 2003, 01:50
It would be interesting that someone made some side-by-side comparisons between mfRainbow-v0.2 and sh0dan's "rainbow killer".
mf
29th December 2003, 13:31
According to AllTimeSToneD rainbow killer is better. I haven't tried rainbow killer (wouldn't even know where to find it, although I'm sure http://forum.doom9.org/images/top_search.gif will aid me in my quest), so well, that's why I made this. I'll try it later on.
Edit: Well, I tried it, and I must say I'm very disappointed. Chroma blurring is just a too cheap way. I'll see if I can kill enough rainbows with mfrainbow + something else. Then I'll report here.
Edit2: mfRainbow was pretty screwed up too. I'll see if I can fix it.
Chainmax
30th December 2003, 15:41
What do you mean by "too cheap way"? Doing the job efficiently is all that matters, right?
HAH!! BEHOLD!!
mfRainbow-v0.3.avs (http://mf.creations.nl/avs/functions/mfRainbow-v0.3.avs)
A derainbow filter that does the job well WITHOUT resorting to brute force blurring of the entire picture.
Currently, for a picture element to be considered a rainbow, it needs to:
Be on or near a luminance edge
Be on or near a chrominance edge
Contain heavy temporal chrominance fluctuations
And a screenshot:
mfRainbow:
http://mf.creations.nl/avs/mfrainbow3-proc.png
Original:
http://mf.creations.nl/avs/mfrainbow3-orig.png
AllTimeSToneD
18th March 2004, 18:08
Hmmm... nice result what fps do you get using your script?
Dreassica
18th March 2004, 18:40
My bet is standard mf script speeds, ie. 1/2fps :D
Yeah. mfps :D.
Anyway, I'm back at the drawing board. Seems "hardlight" isn't doing what I wanted it to do. Maybe I need "multiply" after all, but the point is I don't want to just darken the mask (au contraire), I want both masks to cancel eachother out. Meaning, if one of them is black while the other is white, result should be black. "Overlay" from PSP seems to do what I want, but Overlay (funny coincidence of naming) doesn't seem to have it.
zettai
18th March 2004, 19:53
It's good in some areas, but it doesn't come close to fixing some of my anime test clips.
If you want some tougher rainbow clips to try out I can either do you vob sections or VBLE files for you to play around with. I've got some really ugly stuff :)
Didée
30th March 2004, 12:15
Originally posted by mf
Yeah. mfps :D.
LOL, that's a good one - I like it. :D
Anyway, I'm back at the drawing board. Seems "hardlight" isn't doing what I wanted it to do. Maybe I need "multiply" after all, but the point is I don't want to just darken the mask (au contraire), I want both masks to cancel eachother out. Meaning, if one of them is black while the other is white, result should be black.
Exactly. What is the problem? Well, if the mask you're going to overlay isn't dark enough in the darks (or not light enough in the lights) to give you the desired "multiply" effect (canceling), then you could first "soft/hardlight" that mask with itself, as that will greatly enhance the contrast. You could perhaps combine it with binarize() afterwards to not darken the areas where both masks show some grey, but not white.
Another tip (dunno if it fits your needs in this respect, though):
In the MaskTools, there is a little, underestimated, mostly overseen filter called "Logic" ;)
And yes, the motion part *is* tricky.
(Remark: As one might notice, I have come to consider the MaskTools essential.)
- Didée
Good idea. I'll amplify the masks with hardlight, then cancel out with mutliply.
The ghosting bug is still there, but at least I can say that mfRainbow can handle EXTREME rainbows. From zettai's lovely rainbow-1.vob:
http://mf.creations.nl/avs/ztr1-mfrainbow.png
http://mf.creations.nl/avs/ztr1-orig.png
The mask building still leaves some room for improvement though, as it kills all the rainbows unmasked, but with a fluctuation/edgemask it leaves a little. I'm pretty satisfied though.
Edit: forgot the link.
http://mf.creations.nl/avs/functions/mfRainbow-v0.31.avs
Edit2: above screenshot is not deinterlaced. If you deinterlace the chroma, most of above seen artifacts will be gone too. Also, FYI, the screenshot was made with an scd value of 20.
zettai
17th April 2004, 14:02
Nice work mf!
I'd test it out but.. um.. you haven't uploaded the script :) (404)
Whoops, put it in /avs/ instead of /avs/functions. My bad! It's available now. :)
zettai
18th April 2004, 00:39
Good work. Very good work.
There are some scenes that the filter doesnt hit if you want more samples, but these are some from the black and white episode that I would normally just greyscale away anyhow :)
Yeah, I saw that too, but that's as a result of the fluctuation mask (that makes sure no temporal/spatial nuking happens) being slightly weak. Still, apart from greyscaling, I think that scene is easy enough (after mfRainbow anyway) to postprocess with some other derainbower.
Derailed
10th June 2004, 14:14
When I try to load your mfRainbow script in avisynth, it gives me an error. It always has trouble with the two motionmask lines:
MotionMask(thY1=0, thY2=255, y=3,u=1,v=1)
It always says thY1 is not a valid argument to motion mask, and when I delete that argument, it says the same thing except this time for thY2. The cycle continues until I delete all of the arguments.
Any idea what is wrong? Thanks.
~Derailed
MasterYoshidino
18th June 2004, 20:19
update your masktools dll
http://forum.doom9.org/showthread.php?s=&postid=480494#post480494
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.