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 #90718 is a reply to message #90717] Thu, 02 April 2015 10:11 Go to previous messageGo to previous message
sam.tushaus is currently offline  sam.tushaus
Messages: 14
Registered: February 2015
Junior Member
On Thursday, April 2, 2015 at 11:40:39 AM UTC-5, Mike Galloy wrote:
> On 4/2/15 8:25 AM, 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

Yes! That's what I was trying to do. I'm not sure where you're getting a, b, c, and d though - I'm not weighting each image by anything. I don't think it's necessary, from the documentation.
[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: Thu Oct 09 23:01:22 PDT 2025

Total time taken to generate the page: 0.40341 seconds