Lumo wrote:
ofnuts wrote:
The channel values of a given pixel in the final photo is:
Cf: final result, Co: the picture over, Cu: the picture under, a: the opacity of the top picture.
Thank you, this is a great start. I'm having difficulty getting my head round what I do with the number(s) I would get though. If I get a value for C
u for the Red channel, I think value for the Green and Blue channels will be the same, since the same thing was done to all channels.
So I'd import the remaining photo over the merged photo... get my C
u number ready... but then what? We're well into Maths territory. I've tried to understand the Wikipedia article, but it seems to be written for mathematicians rather than for me
I think that because we're just using 256 values per channel (8bit), the reversal procedure should be perfect, right?
Thank you again
In practice the final image is the assembly of the red/green/blue image, each obtained by stacking the red/green/blue versions the background and overlay images with the same opacity(*). So you can really do all the computation channel by channel.
Having only 256 values is a major problem, because it leads very quickly to round-off errors, and if you implement this using layer stacking you can't even have intermediate values outside of the range.
(*) which is somewhat a restriction of the Gimp/Photoshop data model, since actual materials do not have the same opacity at all wavelengths.