Page 1 of 1

Un-watermark a set of images

Posted: 2013-07-21T16:52:00-07:00
by elmuSSo
Hi.

A different images was watermarked with the same watermark.

Is it possible to recreate an original images knowing how this watermark behaves when overlaid on these images? In the first line you can see how watermark behaves overlaid on pure white background. Is it possible to firstly obtain a watermark in its original form, and then to somehow subtract/divide etc. it from the images to obtain their genuine form?

Example:

Image

Image

X - watermark
? - unknown background beneath watermark

Re: Un-watermark a set of images

Posted: 2013-07-21T18:49:49-07:00
by fmw42
Given that you know the watermark and can make the image transparent where the watermark resides, there is a technique called inpainting, that can attempt to fill in the transparent pixels. But IM does not include such a function.

See
http://en.wikipedia.org/wiki/Inpainting
http://docs.opencv.org/modules/photo/do ... nting.html
http://math.univ-lyon1.fr/~masnou/fichi ... survey.pdf
http://iwi.eldoc.ub.rug.nl/FILES/root/2 ... sTelea.pdf
https://fadili.users.greyc.fr/demos/Wav ... index.html
ftp://138.96.0.43/athena/Team/Rachid.De ... aneous.pdf

Re: Un-watermark a set of images

Posted: 2013-07-23T17:28:50-07:00
by anthony
The question is how was the watermark applied?

Was it overlaid?
Was it blended multiplied?
Was it color distorted?
Was it done in a different colorspace?
EG: composition was done correctly in linear RGB, or in a non-linear sRGB (which is more commonly done, though it is incorrect)

Basically we not only need to know the watermark that needs to be removed (especially its transparency), but also how the colors of the original image was modified based on the color and transparency.

For a semi-transparent logo that was simply overlaid, which may be the case from the examples, then yes, once the logo is recovered (simple to extract from pure white watermarked image) then any other image can be restored. We have the maths to do this!

I can see from the test images the overlay isn't just black, but at least a semi-transparent greyscale image. As such we will need two different 'known' background images (like pure white and pure black watermarked images) to recover the watermark fully (colors and transparency).

If it isn't a 'over' composition. Well then we would need to know how it was 'composed' so the maths can be reversed, so we can then recover the watermark and how to remove it.

So in short.. More Information on watermark technique used. and perhaps a watermarked images of pure black and pure white. As well as other colors for testing attempts at watermark removal, especially with regards to RGB vs sRGB colorspace processing determination.


Then there comes a 'ethical' issue... Should we help you remove watermarks :-)

Watermarks are added to images for a reason, and owners of the graphic should have the original images anyway, so will not need to remove watermarks from a 'lower-quality' image.

Re: Un-watermark a set of images

Posted: 2013-08-12T13:04:03-07:00
by elmuSSo
Thanks for answer.

Lets assume that this is just my private computer-science challenge and I'm doing that just for a sake of testing if this is even possible to do. No law is planned to be broken.

As a computer programmer I'm really interested if something like that can be done and how it can be done. Was it done before? Maybe there are some publications about this that I'm not aware of?

This is a first time I'm touching graphics mixed with math so I'm total beginner on this territory. Like I was trying to depict on my screens, watermark and its method of overlaying is totally unknown.
As I understood, there is a need of providing a watermark overlaid on a pure black background. That was impossible, but there the best I could get:

Image

Is it enough to do a good calculations?