[magick-users] Mathematical Cloud Composition

Ashton Peters ashtonaut at hotmail.com
Mon Jul 9 14:35:32 PDT 2007


Hi, I have a question related to image composition and transparency. I have 
two satellite images, one is a map, and one is a cloud image.

Map: http://img379.imageshack.us/img379/4205/nzdaylp9.png (700k)

Clouds: http://img465.imageshack.us/img465/3254/nzcloudstc9.jpg (300k)

What I would like to do is combine these images to make a realistic looking 
cloud overlay. I have read a technical report available at

http://www.urania.be/weer/cloudmaps20060203.pdf

that obtained great results using alpha blending as a function of cloud 
image pixel intensity. An equation is used that applies a transparency to 
each pixel of the cloud image based on the following formula:

alpha = (cloudgrey^2) / (255^2)

where alpha is the output pixel transparency value, and cloudgrey is the 
greyscale value of the cloud image pixel (between 0-255).

Is it possible to use ImageMagick to create a transparency map as an 
arbitrary function of pixel values, then apply the transparency map to 
compose the two images? I have experimented with the built-in alpha 
compositing methods in ImageMagick and I can't seem to find one that allows 
the creation of a transparency map based on a user-defined function.

Any help would be most appreciated.

Regards,

Ashton

_________________________________________________________________
Live Search delivers results the way you like it. Try live.com now! 
http://www.live.com



More information about the Magick-users mailing list