comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » cgBlendImage, more than 2 images?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: cgBlendImage, more than 2 images? [message #90717 is a reply to message #90716] Thu, 02 April 2015 09:40 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 4/2/15 8:25 AM, sam.tushaus@gmail.com wrote:
> Hello! I was wondering if anyone had tried using cgBlendImage to
> blend more than 2 images. I have 4 images - I've tried blending 2 of
> the images, blending the other 2, and blending those together, but
> I've had no luck thus far. Has anyone tried this? Should I simply
> stick with two separate blended images instead?

I don't know the details of cgBlendImage, but if you want to blend four
images like:

I = a * I1 + b * I2 + c * I3 + d * I4

where a + b + c + d = 1, then you should blend the first two images
together to get I12:

I12 = a / (a + b) * I1 + b / (a + b) I2

Blend images 3 and 4 to get I34:

I34 = c / (c + d) * I3 + d / (c + d) I4

Then blend the I12 and I34 to get the result:

I = (a + b) / (a + b + c + d) * I12 + (c + d) / (a + b + c + d) * I34

Is that what you are doing?

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rebin or interpolate to resample data
Next Topic: OPENR F77 SWAP_IF_LITTLE_ENDIAN

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:03:43 PDT 2025

Total time taken to generate the page: 0.00417 seconds