Luminous Landscape Forum

Raw & Post Processing, Printing => Digital Image Processing => Topic started by: Guillermo Luijk on August 16, 2007, 06:54:53 pm

Title: Watermark Elimination
Post by: Guillermo Luijk on August 16, 2007, 06:54:53 pm
Hi all, I have just translated an article I wrote some time ago, maybe you find it interesting: Complete article (http://www.guillermoluijk.com/article/watermark/index_en.htm)

It's about watermark elimination. It is not a tutorial nor a program to automatically do it at all. It's simply a demonstration some images are not safe just for using a simple watermark on them.

Hope you find it interesting and you take it into account the conclusions to protect your own images.


EXAMPLE OF APPLICATION

We apply the characterisation algorithm to the real watermarked image. This picture by courtesy of his author rubichi. Just a fraction is displayed here:

(http://www.guillermoluijk.com/article/watermark/antes.jpg)
Fig. 2 Original watermarked image.


We blend the result of the colour restoration in the watermark areas with the original image out of these areas, obtaining a final image free of the watermark and with indistinguishable borders between the watermarked and non watermarked areas:

(http://www.guillermoluijk.com/article/watermark/despues.jpg)
Fig. 3 Resulting image after restoring the original colour in those areas affected by the watermark.


CONCLUSION

To preserve the authorship of photographic works we must be careful with the type of watermarks used. The algorithm explained only works on watermarks that follow the assumptions of uniform colour and transparency, that by the way are the most common. That means that if the watermark would have had some colour gradation, colour change, a visible border,... the method would have not been valid.

In any case, the most recommended is never to upload images at a size that could be usable for printing or other use in case someone manages to eliminate our watermark.
Title: Watermark Elimination
Post by: laughfta on August 19, 2007, 02:27:13 pm
Hi Guillermo,

So hard to guess where your insatiable curiosity will take you next!

I have had situations where this may have come in handy, as it corrects the color as well as the luminosity of the affected pixels. A few years ago, I used the color replacement tool in PS to improve some areas of uniform yellow discoloration on some scans of damaged color slides. I had trouble with the luminosity, which I couldn't correct using the color replacement tool set to "luminosity" for some reason. Would your method here have been effective in that case as well?
Title: Watermark Elimination
Post by: feppe on August 19, 2007, 03:23:11 pm
Very nice work. And instead of relying on watermarks and pissing off people, why not try Free Art License (http://artlibre.org/licence/lal/en/) which gives people permission to use your low-res photos, while you retain copyright.
Title: Watermark Elimination
Post by: Guillermo Luijk on August 20, 2007, 08:29:29 pm
Quote
Hi Guillermo,

So hard to guess where your insatiable curiosity will take you next!

I have had situations where this may have come in handy, as it corrects the color as well as the luminosity of the affected pixels. A few years ago, I used the color replacement tool in PS to improve some areas of uniform yellow discoloration on some scans of damaged color slides. I had trouble with the luminosity, which I couldn't correct using the color replacement tool set to "luminosity" for some reason. Would your method here have been effective in that case as well?
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=134162\")

mmmm that would be a different concept Gloria. Here we start from the assumption that a linear combination (i.e. weighted averaging) is taking place; we are in fact adding two completely different colours, not modifying a preexistent colour with some (yellow) toning applied on it. So the algorithm seeks to undo that weighted addition.

I think the case you explain is much better simulated using curves. So far I have calculated the curves that have to be applied to an image to obtain a final resulting one. If you give me two examples of your yellow toned image, and what it should look like, perhaps a set of RGB curves can be calculated to recover the original colours in a row of images.

Regards.

PS: I show you an example (in this case I calculated the curves to simulate a cross processing in developing a negative film with slide chemicals):

IMAGE 1
Original image:
(http://i31.photobucket.com/albums/c398/ppbijouks/tutosps/cross000.jpg)

IMAGE 2
After the processing (using a lot of PS layers, level adjustments, bla bla bla...) we obtain:
(http://i31.photobucket.com/albums/c398/ppbijouks/tutosps/cross012.jpg)
 
I load both images into a routine to calculate the most optimum RGB curves that will take us from IMAGE 1 to IMAGE 2, and we get:
(http://img478.imageshack.us/img478/1846/paso4jpgcurds4.gif)
 
SIMULATION OF IMAGE 2
Now we apply that particular curve to IMAGE 1 obtaining:
(http://img408.imageshack.us/img408/2318/originaljpgtonoriginaljsp8.jpg)

Close indeed to IMAGE 2, just very slightly less saturated. Saturation control is a drawback of RGB curves, that are good for contrast and tone, but not saturation. The result would have probably been better with a set of HSB curves instead of RGB. I'll try that one day...

Find more visual examples of this technique [a href=\"http://www.ojodigital.com/foro/showthread.php?t=134449]here[/url].
Title: Watermark Elimination
Post by: laughfta on August 21, 2007, 12:29:23 am
I will try to hunt down that file to show you. The color is fairly good except for a couple of yellow areas, one covering part of a face, and another on a jacket, IIRC.
I thought your process was basically isolating the change in colors by looking at two pixels that should  match, finding the color difference between them, and ...then a miracle occurs! I am clearly going to have to buy my daughter another lunch in order to have her explain your latest algorithm.

Quote
PS: I show you an example (in this case I calculated the curves to simulate a cross processing in developing a negative film with slide chemicals):


Very cool. I really like your cross process simulation. And it is another interesting application of your curve-making program. It will be quite a bit more complicated with HSB curves, won't it? Some day...
Title: Watermark Elimination
Post by: laughfta on August 21, 2007, 01:03:46 am
Found the image, Guillermo. It is the file as I received it—a scan from a slide from around 1960, I believe.
Title: Watermark Elimination
Post by: Guillermo Luijk on August 21, 2007, 11:53:11 am
Quote
Found the image, Guillermo. It is the file as I received it—a scan from a slide from around 1960, I believe.
[a href=\"index.php?act=findpost&pid=134454\"][{POST_SNAPBACK}][/a]

Hi Gloria, this is the best I could achieve. Tones were recovered quite well, but as the yellow spots don't follow exactly a transparent watermak model, the calculation was not perfect for all pixels so I had to do some transparency and curve adjustments to get this.

(http://img410.imageshack.us/img410/83/fotogloriayn1.jpg)


PS: BTW your original image was in AdobeRGB colour space, you should convert them to sRGB for proper display for Internet applications.
Title: Watermark Elimination
Post by: laughfta on August 21, 2007, 12:38:35 pm
Quote
Hi Gloria, this is the best I could achieve. Tones were recovered quite well, but as the yellow spots don't follow exactly a transparent watermak model, the calculation was not perfect for all pixels so I had to do some transparency and curve adjustments to get this.


Sorry, Guillermo, I'm not getting the image you sent. Thanks, though for going to the trouble to work on it. (I thought we were still in evaluation mode) How do the yellow spots differ from the watermark model? I know you mentioned how a gradation or color changes would void the process—was this the case here? Also, were the other adjustments you made primarily to match luminosity? When I originally worked on this, the luminosity issue was what kept  PS's color replacement tool from working easily.

Oh, and btw, a cousin has told me that this was a scan from a print, not a slide. The spots make more sense now, I guess.
Title: Watermark Elimination
Post by: laughfta on August 21, 2007, 12:52:47 pm
Okay, now I see it. Very nice indeed! Let me ask you though, if you started with  full res file of this, would you have started with the method you developed for the watermark removal, or just used other available tools?

(I know PS is not a preferred tool for you!)
Title: Watermark Elimination
Post by: Guillermo Luijk on August 21, 2007, 01:15:38 pm
Quote
Okay, now I see it. Very nice indeed! Let me ask you though, if you started with  full res file of this, would you have started with the method you developed for the watermark removal, or just used other available tools?

(I know PS is not a preferred tool for you!)
[a href=\"index.php?act=findpost&pid=134555\"][{POST_SNAPBACK}][/a]

I used the un-watermark method, but I could quickly see it is not adeuate for this yellow spots as it provides a transparency>1 (if you remember the article, transparency can only be 0<p<1). Then by applying it the image improves, but the fact of obtaining such a strange  factor means that your yellow areas cannot be expressed in terms of a unique "yellow watermark" with a constant degree of transparency.
This was clear to me when I looked first to the image, as the yellow parts are not an overlaped yellow image with some degree of transparency, but a true modification of the original image tones, but contrast remained the same.

With a watermark, contrast changes, obtaining an average of the contrast of the original image and the watermark (i.e. contrast=0), so watermarks trend to reduce contrast in the affected areas.

I used PS to blend the original image (areas not afected by the watermark) with the image resulting of applying the un-watermarking.
Title: Watermark Elimination
Post by: laughfta on August 21, 2007, 10:24:03 pm
Well, it was another really interesting bit of work, and I am going to be on the lookout for an equally interesting application for it. Thanks for sharing that.
Title: Watermark Elimination
Post by: laughfta on August 22, 2007, 06:47:22 am
Quote
Find more visual examples of this technique here (http://www.ojodigital.com/foro/showthread.php?t=134449).


Ok, Guillermo, I was looking at one of your examples, where you composited several adjustments into one curve. I believe you feel that the resulting curve causes less damage to the file than repeated single adjustments:

Curiosamente, al unificar todos los pasos en una única curva estamos mejorando la calidad tonal del resultado porque se evitan los redondeos intermedios. Así podríamos repetir el procesado con la curva unificada obteniendo un histograma que mantiene la "intencionalidad" de aplicar secuencialmente todos los pasos, pero con menos huecos debido al redondeo. Más sencillez, calidad y rapidez. Quién da más?

First, is that what you meant? And if so, can you explain? The translator program is not perfect, but it helps!