Anyone can help, please?
i'll give it a shot....
----- Original Message ----- From: "Armindo Dias" arm_pdlist@yahoo.co.uk To: pd-list@iem.kug.ac.at Sent: Thursday, April 03, 2003 8:21 PM Subject: [PD] [GEM] Using masks with videos
I've tried the MaskDancer example and i would like to aply that to video.
I
want to have a video as the source pix and then another video as the mask piece. I tried to do this but all i gor was an empty image... is it
possible
to do masking with videos? And videos and images?
yes this is possible using alpha channels and pix_composite or you can try pix_chroma_key which doesn't require the setting of an alpha channel (it also works with YUV images). pix_chroma_key takes a message for the "value" of the color to key with and a "range" which is a +/- offset to make keying a bit easier. in the case of the dancer you would make the key value equivalent to white and give a small range to cover any pixel value differences and that should make the other image pop through the white part of the dancer image, with the black part masking out the rest of the image,
And finally, do the two
sources need to have the same size (like 400x300)?
yes. there is no auto-scaling built into any of the objects. the reasoning behind this comes from the idea that GEM gives up a bit of convenience for performance. also that most people would 'tune' their patches to use the same image sizes to avoid the built-in scaling anyway. pix_resize currently resizes an image to the next highest power of two, but could probably be made to work with arbitrary image sizes as well.
cgc