Separation of alpha blended overlays
Suppose I have an image z with alpha mask α, and that the pixels of α have only 2 possible values: 0 and α0.
Suppose I then take a sequence of n images y(1..n) and blend them all with z to form n new images x(1..n).
i.e. x(i) = (1-α)*y(i) + α*z
(also, the ys are not necessarily related like frames of a movie would be.)
Now, given only x(1..n) and α0, can we approximate z? I understand that the blending is not a reversible transformation in general, but if we make some assumptions about z for example, smoothness, independence from the y images, etc, is there a method for this? (Links to papers are OK.)
Thanks,
Melekor
PS: Wasn't sure if I should post this in math, graphics or AI, but in the end it seems most like an AI problem :)
The first thing I would try is min(x(i))/a , taking the minimum pixel by pixel and color component by color component. What you get here is an upper bound of what each number forming z can be. If this doesn't give you satisfactory results, it's possible that you can do better, but it probably won't be easy. Perhaps you can do something like using some transform (something like FFT or wavelet), taking averages, setting small values to 0 and transforming back. Just the first two things that came to mind.
[EDIT: I actually misread the problem. I'll think about it some more. In the meantime, disregard what I said above.]
[Edited by - alvaro on February 23, 2009 5:35:47 PM]
[EDIT: I actually misread the problem. I'll think about it some more. In the meantime, disregard what I said above.]
[Edited by - alvaro on February 23, 2009 5:35:47 PM]
You could treat it as a minimization problem, e.g.,
(where c_1, c_2 are just constants that you choose. Roughly, c_1 is the importance of alpha not being outsize the range [0, alpha_0], and c_2 is inversely proportional to the importance of alpha not being between 0 and alpha_0. So that whole term there tends to make all alphas either 0 or alpha_0.)
If you wanted, you could also add a "smoothness term," e.g.,
How would you actually go about solving this? For a first attempt, you could just try gradient descent.
(where c_1, c_2 are just constants that you choose. Roughly, c_1 is the importance of alpha not being outsize the range [0, alpha_0], and c_2 is inversely proportional to the importance of alpha not being between 0 and alpha_0. So that whole term there tends to make all alphas either 0 or alpha_0.)
If you wanted, you could also add a "smoothness term," e.g.,
How would you actually go about solving this? For a first attempt, you could just try gradient descent.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement