Invisible Digital Watermarking

Takeshi Nishino

Joined: 2005-10-26
Posts: 2
Posted: Wed, 2005-10-26 07:40

Dear Gallery Project team

Hello, I am Takeshi Nishino, student of Kobe Institute of Computing (Japan),
and team reader of programming practice class.

As a subject of our team practice, we would like to implement Digital Watermarking to your software (Gallery). Our proposal is to use invisible Digital Watermarking to prove who is the creator and owner of the images. Source codes for Digital Watermarking that we want to apply are on the Web site:
http://www.cosy.sbg.ac.at/~pmeerw/Watermarking/source/

We want to join your community and develop this new function together. We have four members and each member have basic knowledge about C-programming and CGI. We are studying PHP-programing now.

Still we need to study much about programming now, but we hope your Project will accept our team. We want to contribute to your Gallery Project.

Sincerely yours,

Takeshi Nishino

Kobe Institute of Computing(KIC)
Graduate School of Information Technology
Department of Information Systems
Kobe, Japan

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-10-26 12:43

That's great news :)

I guess you'll be making a lot professional photographers happy with this feature!
Digital watermarking could be added to G2 as a G2 module, much like the G2 watermark module, which adds a visible watermark to images.

Your module could register an ItemAddOption such that everytime an image is added, your code runs and you can add your digital watermark.

Most probably, adding the digital watermark is too slow to do it in pure PHP (well, you'll know). And imagemagick, GD or netpbm can't do it I guess.
So you'll have to use your external compiled binary (which you said is written in C) to do it.

Take a look at the g2 watermark module on how to register a ItemAddOption.
Also look at the archiveupload or at the imagemagick, netpbm, ffmpeg, dcraw, zipcart modules on how to call binaries from G2.

Also please see http://codex.gallery2.org and the developers link in the upper right corner.

Feel free to ask questions at any time :)

PS: You'll see that as a reader of a programming practice class, you'll learn a lot from G2. We're using OOP, MVC, test driven development (unit tests), some aspects of extreme and agile programming, we're distributed all over the world and communicate through mailing lists (gallery-devel and gallery-core) and in realtime in #gallery on irc.freenode.net).

 
donwillingham

Joined: 2003-08-17
Posts: 25
Posted: Thu, 2005-10-27 00:07

ImageMagick's composite binary supports an option -stegano with a comment "hide watermark within an image". NetPBM didn't have a similar parameter, so I went with the "lowest common denominator".

I know there is already some source, I didn't take a good enough look at it, but if the hidden watermark process was written against NetPBM, it could bridge the gap. However, I haven't tried ImageMagick's -stegano.

Good luck team.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-10-27 00:22

well, if imagemagick supports it, cool. we don't need a solution that works with all image toolkits. requiring imagemagick is better than requiring another, maybe non-portable binary. of course, if we require another binary and can offer precompiled binaries for the top 3, 4 platforms, that would be equally good.

 
Takeshi Nishino

Joined: 2005-10-26
Posts: 2
Posted: Fri, 2005-10-28 06:03

Thank you very much for kind messages and many useful instructions.
Now we are sharering the work and looking into source codes of Gallery2.
Our present approach is

1)study visible watermark module of G2 and investigate how to add digital watermaking

2)Compare ways of Digital watermarking (such as our proposal, ImageMagick)

About 2),
valiant> if we can offer precompiled binaries for the top 3, 4 platforms

To evaluate our proposal,I want to know the platform which G2 must runs on.
(According to documents of G2,required platform is UNIX(BSD,Linux,...) or Windows)

It's my pleasure to study a lot about programming in this community.
We want to enjoy studying together.:)
Thank you for your kindness.

Takeshi Nishino

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Fri, 2005-10-28 07:20

This *is* great news.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-10-28 10:17

platforms:
- linux x86
- FreeBSD x86
- Windows XP x86
- OS X PPC

well, linux and BSD would already cover a large percentage. windows and OS X are rather exotic for G2, but they are used too. today, most are using x86 compatible architectures.

 
robert070612

Joined: 2003-08-05
Posts: 565
Posted: Fri, 2005-10-28 10:25

Sounds good. How much difference is there to the existing (and costly) Digimarc invisible watermarking stuff?
----best wishes, Robert

 
Kunio Hara

Joined: 2005-11-18
Posts: 1
Posted: Fri, 2005-11-18 08:33

Hi,My name is Kunio Hara,team member of KIC programing class.
I am investigateing WaterMarking program for Gallery2. I will tell our progress report about WaterMarking program. About Gallery2 source code modification, Mr.Kotegawa will report present state and problems.
---------------
1)Meerwald's watermarking program(our proposal)
This program embeds proper romdom numbers as watermark in the target image. It contains many programs in different algorythms. Among them, we think "Cox" algorythm is good for Gallery2. "Cox" algorythm is spread spectrum watermarking and strong against modification and compression of the image.

With original image, watermark embedded image(maybe modified) and Key rondom numbers, we can evaluate wheather the image is orginal or not. We think using visible and invisible watermark togather is best way to prove originality.

For using this program, we have some problems. Above all, what we should improve is that this program supports only PBM format. For color image, we have to change source code for PPM format.
Watermark embedding process will be;
Original Image(ping,jpeg...) <==> PPM <==> WaterMark by Cox
For conversion from original image to PPM image, we are going to use ImageMagick command. In this way, for irreversible compression format (such as jpg) the embedded image might be different from original one.

(2)ImageMagick -stegano option
In this way, the 'image'(watermark) is hidden in the target image with [composite] command. This command simply put watermarkimage upon target image. So this watermark is weak against modification and compression.
We think this program is not proper for certification of originality.

(3)DIGIMARC DIGITAL IMAGERY service
I think this commecial software uses same algorhythm like Meerwald's program package. In this service, it seems that the Key Server gathers the information of watermark and manages them on internet. In Gallery2, we might be able to implement a similar service managing Key romdom numbers.
---------------
Now we are changing Meerwald's program. We will report problems and results of check continuously.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-18 12:46

thanks for letting us know of your current status!

@PPM only:
of course that's bad news for users that ask for high quality, super crisp images. every image operation (imagemagick) will slightly degrade the quality of the image and now you need 3, at least.
option nr. 1) looks of course best. if you could operate on jpg directly, that would be awesome. i guess the "add digitial watermark" step / operation doesn't affect the image quality for the human eye. so no quality degradation would be visible.
@jpeg:
but i don't see how you could add your pseudo random sread spectrum footprint on jpeg without resampling the image, unless you do the whole thing in frequency / DCT space.
so you'd have to first decode the lossless compression from jpg, apply the slight changes to each DCT block, and compute the new lossless compressed output.
the question is whether altering jpeg in frequency space actually works.
- if you change the high frequency DCT coefficients, the watermark will be lost quickly once the jpeg is resampled, especially for lower quality images
- if you change the low frequency coefficients, it will probably have a significant impact on human perseption of the image / it will alter the image visibly. and if you change it less than human visible, then a resampling of the image might quantize your changes to the same coefficient it was before you applied the watermark
- and if you apply the watermark in the normal spatial space (after iDCT), you've got to compute the new DCT etc. which might be a little expensive

i guess the above issues are not specific to jpeg and you might deal with it. i'm not a digital watermarking specialist, so i'm sure your watermarks are robust enough.

what about the performance of 1) ? :)

 
Toru Kotegawa

Joined: 2005-11-18
Posts: 1
Posted: Fri, 2005-11-18 18:01

Hi,My name is Toru Kotegawa, team member of KIC programing class.
I will tell our progress report about Gallery2 source code modification.

--
Present state and problems
--

After the setup of Gallery2, I started to read PHP source codes from HTML form which embeds visible watermark.

I found "$derivative->setPostFilterOperations($newPostFilters)" in WatermarkHelper.class.
In this class, I think the argument "$newPostFilters" includes executable command line such as "composite [options]...".

Because, it is very difficult to read more souce codes with my PHP knowledge, now I am reading "API Documentation" page to study how to embed visible watermark.

My approach is correct?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-11-18 18:25

You're looking in the right place.. you'll want to work with derivatives and setPostFitlerOperations just as watermark module does.. you just want to use a different operation. Watermark module uses 'composite' to place visible watermarks on top of images. You'll want to register a new toolkit operation that adds the invisible watermark to the image. Example toolkit modules are imagemagick and ffmpeg. Imagemagick toolkit implements the composite operation, but it might be easier to learn from ffmpeg.. this toolkit is related to movies but it has fewer operations so the code may be easier to understand.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-01-12 16:00

Do you need any help? I'm curious about the state of this feature, it sounds very promising :)

 
chrisfl

Joined: 2006-01-19
Posts: 1
Posted: Thu, 2006-01-19 21:33

My final year project at university was based on Image Watermarking in the DCT space. The General idea is that it may be either applied to jpg images during there Generation or possibly to video frames...

But the results were interesting. In in Greece and the original paper is on my PC at home but I'll stick it online and post a link at the weekend.

Cheers
Chris -- www.chrisfleming.org

 
voider

Joined: 2005-02-04
Posts: 10
Posted: Tue, 2006-02-28 21:36

Very interesting. I hope you will be able to generate a module which just adds a watermark without any degration in picture quality. Many photographers will appreciate this feature. Thank you guys very much for your effort!

Best regards,

Timur

 
yeahy

Joined: 2008-11-07
Posts: 69
Posted: Fri, 2009-01-09 18:41

sorry for replying an old post, but how is it going on? Really promising.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2009-01-09 18:44

After three years? and for a product (gallery2) no longer under development? You are kidding, right?

 
filipkrolupper

Joined: 2009-02-06
Posts: 2
Posted: Fri, 2009-02-06 21:24

Hey, thats nice, but most of them are patented :-( I can suggest you (after three years, right ;-) shareware named SignMyImage.

 
Studio Era

Joined: 2009-04-13
Posts: 1
Posted: Mon, 2009-04-13 19:25

Does anyone know of an invisible watermark for .jpg, that is actually traceable via the net?

A watermark is fine, but wouldn't it be cool to be able to type in a watermark's 'code' in Google and find one of your photos being used on a Paraquay website?

Maybe the idea is ahead of the technology . . .

We'll have to wait for Internet2, I guess. :-P

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-01-21 10:40

Probably abandoned.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-01-21 16:49
Quote:
a pity as would address a real need to counteract the massive stealing/republishing of photos on MFA sites

Not really. There's no difficulty in establishing the ownership of a photograph once you've seen it; the only benefit would be if Google would index by digital watermark so you could search for them.

However if Google can index it then anyone who wants unscrupulously to use your photo will simply remove the watermark first. In that sense there's no benefit of a digital watermark over simply putting your name in the EXIF data.