Previous | Next --- Slide 55 of 85
Back to Lecture Thumbnails
skim

I'm having a hard time understanding the difference between what's happening on this slide and the previous slide. It seems like the only difference was that instead of applying the upsampled alpha to the upsampled color, we apply the (1 - upsampled alpha) to the background. Is there any difference between the upsampled color pre-multiplied by alpha and the non-pre-multiplied upsampled color in this example?

mapqh

I think in the previous slides we are also applying upsampled alpha to upsampled color but not for this slide. So the blue still has 100% alpha.

henryw7

I think the difference lies in interpolation: if we have (rgb1, a1) and (rgb2, a2), and want to interpolate with ratio s : (1-s), then with non-pre-multiplied method we'll get (s * rgb1 + (1-s) * rgb2, s * a1 + (1-s) * a2); with pre-multiplied method we'll get (s * a1 * rgb1 + (1-s) * a2 * rgb2, s * a1 + (1-s) * a2). There's a clear difference how a1 and a2 ends up in the color channel.

goku2021

I think the premultiplied alpha for upsampling ensures that the blue color would stay blue, and not blend with the neighboring dark colors.

jochuang

@henryw7 although I think you'd have to convert back from pre-multiplied space to regular color space? Unless I'm misunderstanding how jumping in between actually works/what your original description means.

jochuang

A slightly more intuitive way of thinking about this - https://limnu.com/premultiplied-alpha-primer-artists/ from a photo editing perspective. I think the key here is that we upsample, which performs blurring and is a sort of composition as it blurs values at the edge.

Please log in to leave a comment.