Doing chromakey through Runrev

Jonathan Lynch jonathandlynch at gmail.com
Mon Nov 17 09:57:32 EST 2008


Hi Jacques,

Thank you for your reply.

I actually did something like that already, but...

It only works on a very clean and even background, which is surprisingly
hard to achieve in the real world. High-quality chromakey algorithms
apparently use rather complex formulas. It is not enough to determine the
color of substitution pixels based on their range around a selected color
(or relative ratios of one color component to another, like red to green,
green to blue, and red to blue). It is also necessary to have categories of
pixel colors that involve partial transparency, and another category of
pixel colors for keeping the foreground pixel, but supressing any background
color that may be splashing over onto the foreground object.

On top of all that, one needs to detect shadow pixels, in order to create
darkened shadow areas of the replacement background.

Apparently, from what I have researched, good chromakey algorithms are the
product of many years of work :(

So, I was thinking I would just find some sort of chromakey algorithm that I
can buy, and then turn into an external, or maybe a separate program that I
can acess through command-line commands.

Any thoughts?




On Mon, Nov 17, 2008 at 3:47 AM, Jacques Hausser <jacques.hausser at unil.ch>wrote:

> Hi Jonathan,
>
> I'm surprised that nobody answered till now. I did not try chromakeying
> myself, but I would suggest
> 1) to sample the color of blue background (perhaps at different places to
> get an amplitude of variation of the color - it is never absolutely
> constant) with the mouseColor function. Alternatively, put arbitrary limits
> at + - n pixels of each channel of the sampled color.
> 2) to identify pixels of the image of which the color is in these limits
> 3) to set the corresponding pixels of the alphadata or ot the maskdata of
> this image to 0. Then the image with be transparent except for what you want
> to keep
> 4) to replace the  pixels of the imageData of your new background image by
> the non-transparent pixels of the first image
> -- or alternatively to put the partially transparent image over the
> background image, what allow to change the scale, for example, and then to
> use a snapshot to merge the two images (at screen definition)
> 6) to use the alphadata or the maskdata of the first image to identify the
> limits of the incrusted one, and to apply some blurring algorithm to the
> pixels around this limit. Without that, the limit will appear jaggered.
>
> The two images must of course have exactly the same dimensions in pixel
> rows and columns. Look at the dictionnary for imageData,MaskData and
> alphaData for details... and tell us about your experiences !
>
> good luck
>
> Jacques
>
> Le 16 nov. 2008 à 21:59, Jonathan Lynch a écrit :
>
>  Does anyone have any suggestions on how to do professional-quality
>> photographic chromakeying (like blue screen or green screen) with RunRev?
>>
>> --
>> Do all things with love
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> ******************************************
> Prof. Jacques Hausser
> Department of Ecology and Evolution
> Biophore / Sorge
> University of Lausanne
> CH 1015 Lausanne
> please use my private address:
> 6 route de Burtigny
> CH-1269 Bassins
> tel/fax:        ++ 41 22 366 19 40
> mobile: ++ 41 79 757 05 24
> E-Mail: jacques.hausser at unil.ch
> *******************************************
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
Do all things with love



More information about the use-livecode mailing list