Leak
4th July 2004, 01:38
EDIT: While you can of course use the script posted here I'd suggest using my BlendBob plugin (http://forum.doom9.org/showthread.php?postid=528315) that does basically the same thing, but faster... :)
EDIT: Added a few more images, maybe then someone - anyone - will respond to this... does suddenly everybody only have sources without rainbowing anymore and I didn't get the memo? :confused: :D
(And as I said further down below, the effect is more noticeable once you look at the video...)
Okay, so there I was, toying around with my (relatively) simple fieldmatcher that works on bobbed sources using my Japanese disc of Armitage III (dubbed "Rainbow-o-Rama" by me) as a test subject, being annoyed at all the rainbows this disc contains as ever.
Then it struck me...
Using a smart bobber on the source (which was 24 FPS film material) yields frames where 2 (or sometimes 3, in the case of telecine) should be mostly identical, save for some blurriness introduced by the bobber. But since the rainbows on that disc were produced by somehow running an already telecined source through some process that introduced them, the rainbows are actually the biggest chroma difference between 2 upscaled fields of the same frame as they change in every field, while the other chroma stays mostly the same.
So what I did now was improve my field matcher to not only blend 2 bobbed frames together that started out as 2 fields of the same frame, but to also calculate the difference between those 2 new frames (which almost leaves just the rainbows in the chroma), build a mask out of that and then use it to try to reduce the rainbows in these areas.
Well, apart from my current approach of reducing the rainbows (blurring the chroma by replacing it with a down- and upscaled version) I have to say it does a very good job of masking the rainbows...
BobBlended source without derainbowing:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Source.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Source.png)
BobBlended source with derainbowing:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Derainbowed.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Derainbowed.png)
(Try flipping back and forth between tabs with those pictures; it's even more noticeable in motion, so you'll find an AVI below...)
Marked rainbows:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Rainbows1.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Rainbows1.png)
Just the rainbows:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Rainbows2.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Rainbows2.png)
Another example:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Source.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Source.png)
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Derainbowed.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Derainbowed.png)
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Rainbows1.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Rainbows1.png)
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Rainbows2.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Rainbows2.png)
AviSynth script that I used:
MPEG2Source("Armitage3.d2v",cpu=6,iPP=true)
AudioDub(last,DirectShowSource("Armitage3-66ms.ac3",video=false,audio=true))
DelayAudio(-0.066)
KernelBob(1,8)
BlendBob(derainbow=false,showRainbows=0)
#BlendBob(derainbow=true,showRainbows=0)
#BlendBob(derainbow=true,showRainbows=1)
#BlendBob(derainbow=true,showRainbows=2)
#Decimate()
(yeah, you'll want a Decimate() at the end to throw out the dupes, but for taking screenshots I left it out...)
My BlendBob script (http://leak.no-ip.org/AviSynth/Rainbows/BlendBob.avsi) (Documentation inside, I guess)
The intro of Armitage III after derainbowing (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_Derainbowed.avi) (XviD with constant quant 4)
The intro of Armitage III without derainbowing (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_Source.avi) (XviD with constant quant 4)
More screenshots can be found in the parent dir... (http://leak.no-ip.org/AviSynth/Rainbows/)
Now all I need is probably some better way of coming up with chroma values for the areas where rainbows have been detected - if anybody has ideas on that I'd be grateful. Also, it (and KernelBob) doesn't work too well on the first and last few lines, but that's probably fixable by some padding beforehand and cropping afterwards...
Oh, and I guess since I've got all exams for this term behind me, I'll have to get my ass in gear and actually pour this script into C code...
np: Amorphous Androgynous - Elysian Feels (Abbey Road Version) (The Otherness)
EDIT: Added a few more images, maybe then someone - anyone - will respond to this... does suddenly everybody only have sources without rainbowing anymore and I didn't get the memo? :confused: :D
(And as I said further down below, the effect is more noticeable once you look at the video...)
Okay, so there I was, toying around with my (relatively) simple fieldmatcher that works on bobbed sources using my Japanese disc of Armitage III (dubbed "Rainbow-o-Rama" by me) as a test subject, being annoyed at all the rainbows this disc contains as ever.
Then it struck me...
Using a smart bobber on the source (which was 24 FPS film material) yields frames where 2 (or sometimes 3, in the case of telecine) should be mostly identical, save for some blurriness introduced by the bobber. But since the rainbows on that disc were produced by somehow running an already telecined source through some process that introduced them, the rainbows are actually the biggest chroma difference between 2 upscaled fields of the same frame as they change in every field, while the other chroma stays mostly the same.
So what I did now was improve my field matcher to not only blend 2 bobbed frames together that started out as 2 fields of the same frame, but to also calculate the difference between those 2 new frames (which almost leaves just the rainbows in the chroma), build a mask out of that and then use it to try to reduce the rainbows in these areas.
Well, apart from my current approach of reducing the rainbows (blurring the chroma by replacing it with a down- and upscaled version) I have to say it does a very good job of masking the rainbows...
BobBlended source without derainbowing:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Source.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Source.png)
BobBlended source with derainbowing:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Derainbowed.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Derainbowed.png)
(Try flipping back and forth between tabs with those pictures; it's even more noticeable in motion, so you'll find an AVI below...)
Marked rainbows:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Rainbows1.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Rainbows1.png)
Just the rainbows:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_999_Rainbows2.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_999_Rainbows2.png)
Another example:
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Source.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Source.png)
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Derainbowed.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Derainbowed.png)
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Rainbows1.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Rainbows1.png)
http://gast3.ssw.uni-linz.ac.at/~kp/AviSynth/Rainbows/Armitage3_37948_Rainbows2.png (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_37948_Rainbows2.png)
AviSynth script that I used:
MPEG2Source("Armitage3.d2v",cpu=6,iPP=true)
AudioDub(last,DirectShowSource("Armitage3-66ms.ac3",video=false,audio=true))
DelayAudio(-0.066)
KernelBob(1,8)
BlendBob(derainbow=false,showRainbows=0)
#BlendBob(derainbow=true,showRainbows=0)
#BlendBob(derainbow=true,showRainbows=1)
#BlendBob(derainbow=true,showRainbows=2)
#Decimate()
(yeah, you'll want a Decimate() at the end to throw out the dupes, but for taking screenshots I left it out...)
My BlendBob script (http://leak.no-ip.org/AviSynth/Rainbows/BlendBob.avsi) (Documentation inside, I guess)
The intro of Armitage III after derainbowing (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_Derainbowed.avi) (XviD with constant quant 4)
The intro of Armitage III without derainbowing (http://leak.no-ip.org/AviSynth/Rainbows/Armitage3_Source.avi) (XviD with constant quant 4)
More screenshots can be found in the parent dir... (http://leak.no-ip.org/AviSynth/Rainbows/)
Now all I need is probably some better way of coming up with chroma values for the areas where rainbows have been detected - if anybody has ideas on that I'd be grateful. Also, it (and KernelBob) doesn't work too well on the first and last few lines, but that's probably fixable by some padding beforehand and cropping afterwards...
Oh, and I guess since I've got all exams for this term behind me, I'll have to get my ass in gear and actually pour this script into C code...
np: Amorphous Androgynous - Elysian Feels (Abbey Road Version) (The Otherness)