Open shkarupa-alex opened 3 years ago
Good question.
When compositing a foreground above one another we essentially solve for the foregrounds three times.
To re-estimate the foreground you could use the pymatting library which is quite fast. Faster then the implementation I have on my github. https://pymatting.github.io/pymatting.foreground.html#module-pymatting.foreground.estimate_foreground_ml
In paper you wrote:
Could you please provide more details on how exactly you did it. Did you compose foregrounds before or after solving colors in areas where alpha is 0. And did you do something (maybe mean?) to save correct foreground colors during composition where both fg's alpha is 0?
I noticed that if i compose solved foregrounds it results to dominating "background" fg colors where alpha is 0.
Here is an example of compositioning 2 foregrounds in different order. Look at "orange"/green background.
And here is what i've got if solve combined fg one more time (but as i think, double solving could lead to incorrect colors in semitransparent regions)