Hi everyone. I have just today attempted my first bluescreen video (related to greenscreen except using blue instead of green). You can view the video at http://www.youtube.com/watch?v=kMQ_QWt5O4M
Last weekend when I took my kids to the gym, I realized that the bottom of the pool, other than the lane markings, might make a good background for a blue screen effect, which might be used to have the kids swimming around over background scenes. So today I took the camera over to the pool and attempted to shoot some vids of the kids swimming around.
The pool is in a room that is pretty evenly lit by fluorescent lights, but I did still see some noise in the DV that the camcorder produced. The tolerance on the ColorKeyMask function call was chosen by trial and success, and I picked an average looking blue color from the bottom of the pool for the key value to use. With the depth of the pool being 3-5 feet, and shooting from above the kids, I wasn't too worried about shadows or blue from the bottom of the pool reflecting up onto the kids.
I thought of having my son not wear blue shorts, unfortunately didn't realize that my daughter's swimsuit had blue in it until it was too late. I also thought that the blue in the goggles the kids were wearing was different enough from the pool bottom to not be a problem. Unfortunately had to turn the tolerance up a bit so the kids are gonna have to wear different goggles when I do this for real. As I said, this was just a test.
For those interested, below is the AVISynth script I used for the video. The bob, selecteven, and resize function calls were just to get it so it could be uploaded to youtube for viewing.
It would seem that a reasonable bluescreen using the bottom of the pool is possible with some more tweaks and care in shooting, using nothing more than avisynth. I'm not looking for perfection here, just some simple blue screen of home video, although would like this to be as good as I can make it with the tools and environment I have.Code:in=avisource("c:\vidcap\dv2.09-04-15_17-55.00.avi") bluescreen=in.trim(833,1130)+in.trim(1573,1832)+in.trim(2764,3037)+in.trim(3092,0) bluescreenmask=colorkeymask(bluescreen.converttorgb32(interlaced=true),$356471,35) background=avisource("f:\dv files\2008-06-14 thru 2008-06-19\dv2.08-06-19_07-19.00.avi").trim(0,1153).converttorgb32(interlaced=true) return layer(background,bluescreenmask).bob().selecteven().bicubicresize(320,240)
Critique? Comments? Criticism?
CogoSWSDS
+ Reply to Thread
Results 1 to 5 of 5
-
Old ICBM Coordinates: 39 45' 0.0224" N 89 43' 1.7548" W. New coordinates: 39 47' 48.0" N 89 38' 35.7548" W.
-
DV is notoriously difficult to pull clean mattes from, and you can see the fringing and other issues in this clip. Overall though, for just avisynth, it's not bad.
I would be interested to see if you can get better results from a dedicated tool. Cinegobs is worth having a play with if you want to do blue/green screen work without forking out for the bigger toys.Read my blog here.
-
Chroma Key technical issues with DV format.
Studio cameras have pre-encoder RGB wide band outputs for chroma Key. Any color can be used. Blue is favored in a news studio since it is easier on the eyes vs. green for people working there. Green still has performance advantage so is used more for effects.
Since most camcorders matrix and store video as YCbCr, green is heavily favored for chroma key. Note that Y is made up primarily from green (59%) vs. blue (11%). Blue tends to have lower signal to noise.
Rec. 601 Y' = 0.299 R' + 0.587 G' + 0.114 B'
Pro camcorders mostly use 4:2:2 component sampling. Since Y is fully sampled and is mostly made of green, the dematrixed green tends to have more resolution and less stepped edges vs. blue.
DV (NTSC) uses 4:1:1 component sampling. Cb blue has quarter horizontal resolution resulting in more stepped diagonals.
DV (PAL), HDV* and AVCHD* use 4:2:0 component sampling. Cb is half sampled both H and V so again blue diagonals are more stepped than green.
Some HDV and AVCHD cameras output 4:2:2 over HDMI when live. Uncompressed external recording from HDMI is preferred for chroma key and effects work.
Another hint for consumer camcorders is suggested by Ultimatte. You can get smoother chroma key edge performance from DV camcorders by capturing an analog vs digital Firewire feed for the chroma key filter. The NTSC or PAL encoded analog output has less resolution so produces less stepped edges. The analog capture is used to create the key, the sharper digital capture can be used for foreground video.
I realize you have no control of the pool floor color. This is general information.
* Rec 709 Y is even more green dominant.
Rec. 709 Y' = 0.2126 R' + 0.7152 G' + 0.0722 B'Recommends: Kiva.org - Loans that change lives.
http://www.kiva.org/about -
That's pretty neat. Thanks for sharing your avisynth script as well.
btw. You could have embedded the youtube video into your post. When writing your post if you will look up at the bbcode buttons you will see a button called "video". Just place put your youtube link on the post , highlight it and press the video button and your video will be embeded into your post.Donadagohvi (Cherokee for "Until we meet again") -
To Guns1inger and EdDV: Thank-you for the helpful advice. I'd done a little chromakey on CGI stuff but nothing like with live video. I think I may try a little convolution3d on it to clean the mask up before the call to the ColorKeyMask function in my next version. Do you think that will clean the noise up enough to get a better key? Will I be able to tighten up the tolerance parameter in the script?
Unfortunately all I have is my consumer-grade cam. But at least I can get the memories on DVD, even if they're not as good a quality as shooting it with pro equipment on expensive 35mm movie film.Or Imax - was reading the other day that there are only 2 3-D imax cameras in the world, they weigh a couple tons each and are so noisy that all the audio has to be done in post-production!
But I digress. This was a simple test to see what AVISynth was capable of with a short little script. I need to do some more tweaks though, or as guns1inger suggested, try out Cinegobs.
Thank you all for your advice, and hopefully I can get a new version of the video up in the next couple days and we can have another look.
CogoSWSDSOld ICBM Coordinates: 39 45' 0.0224" N 89 43' 1.7548" W. New coordinates: 39 47' 48.0" N 89 38' 35.7548" W.
Similar Threads
-
Complex chroma key matting problem
By Morality124 in forum EditingReplies: 33Last Post: 7th Nov 2010, 15:36 -
Can Premiere CS4 do quality chroma key? I can't
By MAtkins in forum Newbie / General discussionsReplies: 35Last Post: 26th Mar 2010, 02:49 -
Vegas adding video overlays using chroma key
By SearchQuality in forum EditingReplies: 12Last Post: 14th Dec 2007, 17:12 -
Chroma Key workflow for large number of clips
By pablogott in forum MacReplies: 0Last Post: 27th Jun 2007, 19:21 -
An alternative to the Chroma Key.
By fr4nk in forum EditingReplies: 10Last Post: 8th Jun 2007, 13:45