Calculate source RGBA value from overlay

泪湿孤枕 提交于 2019-12-08 08:59:57

问题


The title looks a bit weird, so here is a sample:
You will probably be familiar with the Windows 7 Explorer.
When you select something with the pressed left mouse button, you get a blue half transparent rectangle.
So the question is now:
It is possible to calculate the source RGBA color that was used to draw this rectangle?
The only things I know is the RGB value from the background and the RGB value with the blue overlay. Here is a screenshot from what I mean:


回答1:


No, it ist not possible from a single image. You need the target data over a black and a white image (best case).

After that, you need to use the first forumular in this article: http://en.wikipedia.org/wiki/Alpha_compositing



来源:https://stackoverflow.com/questions/10618332/calculate-source-rgba-value-from-overlay

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!