Obtaining live masks for incrustations

ok. this is more a philosophical question, and i m ready to hear gladely your suggestions:

how can i obtain this type of masks from a video source ?

i know i may use the colorkeyer.fx, but i would rather have another solution for result B, has color keying black color will give problem on the body if there is shadows and movements.

in fact , i would like that incrustation mask comes from the bottom of the frame, and that a routine recognize outlines of the body ( more lighten than the background).

voilà : surely a classical one, but its better to hear good adivises first ;-)

SAMPLE.jpg (181.0 kB)

this is tricky.

if your image is representative in such ways as that the dancers are always on the floor, you could write an iterative shader or an freeframe which starts at the top of the image and scans downwards as long as the image is black.

alternatively it can be worth trying do patch e.g. 100x100 pipet spread and use some clever spread mingling to create a polygon with the highest y coordinates of each row. the polygon can then be used as a mask.

the best solution would be using a thermal camera (or body scanner :)) or a depth camera to get an image with more information.

hi oschatz thanks for your answer. i will try to concentrate on patch approach and polygons… thanks

playing with pipet, but not figuring out how to obtain points for a polygon … :-( surely not so far but…

playing with pipet, but not figuring out how to obtain points for a polygon … :-( surely not so far but…

polygons.zip (31.0 kB)

well , any help around ( or a shader idea ? )

:-)