Eye of the eclipse...

by darkhausen

submit your photo

Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Sign up ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

If I overlay an image( lets say A) with another image(B) using 50% transparency. is it possible to recover A without knowing what B is? Dose overlaying make it hard to extract the original content? Also, if I do a process on an overlaid image, let say I do an edge detection on A#B (where # means overlaying) then if I find the edges on B, is it possible to extract the edge of image A from A#B?


share|improve this question

closed as off topic by Itai, John Cavan, Mark Whitaker, Imre, mattdm Nov 15 '12 at 15:49

Questions on Photography Stack Exchange are expected to relate to photography within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

I have to admit, I don't see the photography angle here. Interesting question, but looks off-topic to me I'm afraid. – John Cavan Nov 15 '12 at 4:50

2 Answers 2

In the computer vision literature this is called "blind image separation", which is a special case of "blind source separation", see:


The problem is not possible in the general case. Let's say the images are only a single pixel. A#B = 42. Can you tell me what A is without knowing B?

Some results can be obtained by making assumptions about the content of A & B, but this problem is very hard and the results aren't amazing.

share|improve this answer
If I tell you the answer, the universe will disappear and be replaced by something even more bizarre and inexplicable. – user2719 Nov 15 '12 at 11:57

This is an image processing question and belongs to stackoverflow I think. But I give it a try to clarify the issue, however, you have to consider my computer vision and image processing knowledge is narrow.

Overlay mode, is a combination of multiply and screen modes. On the other words, if pixel on image A is darker than 50% gray, pixels of A and B are multiplied and otherwise, it would be a screen blend mode behavior which is like an inverse of multiply (image looks brighter). That's why overlaying an image with itself, looks like an increase in contrast. from wikipedia article of blend modes:

enter image description here

Now having this in mind let me make you an example. I'm going to use two images which are the courtesy of this and this users. I found them on the image of the week page and copied them from their flickers at + and +.

This is the overlayed images:

enter image description here

The point is, human eye can detect there is photo of a flower and a photo of birds but I'm scared CV algorithms are not that powerful. This is the edges extracted from the first image:

enter image description here

If you open these two images on gimp or other photo manipulation softwares and try different blendings, you will see that you can extract too much useful information about the other image. The problem is that based on definition I quoted above, on overlaying, we multiple some pixel values and this can simply cause the loss of certain data. Here is another example:

This is the overlayed images:

enter image description here

And this is the the first image:

enter image description here

Can you guess how the image under looks like? Here it is:

enter image description here

As you see, even if you have the exact edges of the firs image, you can not certainly decide about the second image. This is due to nature of the overlay blending mode.


Disclaimer: What I wrote above is based on my limited knowledge of CV and there might be techniques that can effectively solve your problems that I am not aware of them.

P.S. Here are the original images of the examples above:



share|improve this answer
"overlay" is a general term, which the questioner defines as a simpler operation just taking the mean pixel values, Photoshop's "overlay" blending mode is something different. – Matt Grum Nov 15 '12 at 9:34
@MattGrum I see your point. But since the question is asked here on photo.shatckexchange, I assumed overlay is not simple mean pixel operation. Nevertheless, my point was about the loss of data and I think (though not sure) it still holds in mean operation as well. – Pouya Nov 15 '12 at 9:52
The loss of data holds for both cases, but the mean pixel problem has been studied extensively in the past and there is plenty of further material on the subject! – Matt Grum Nov 15 '12 at 9:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.