Dynamically building sprite by using masks in unity

There is this tutorial in imagemagick

http://www.imagemagick.org/Usage/masking/#masks

I was wondering if there was some way to mimic the behavior (like cutting the image up based on a black image mask that turns image parts transparent… )

and then trim that image in game…

trying to hack around with the webcam feature and reproduce some of the imagemagick opencv stuff in it in Unity but I am sadly unequipped with masks, shaders etc in unity skill/knowledge. Not even sure where to start.

I was wondering if there was some way
to mimic the behavior (like cutting
the image up based on a black image
mask that turns image parts
transparent… )

Typically this is done with a shader, but it can be done procedurally. Here is one shader to get you started:

http://wiki.unity3d.com/index.php/TextureMask