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), 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: 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) |
|
Posts: 32509
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).
Posts: 25
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.
Posts: 32509
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.
Posts: 2
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
Posts: 397
This *is* great news.
Posts: 32509
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.
Posts: 565
Sounds good. How much difference is there to the existing (and costly) Digimarc invisible watermarking stuff?
----best wishes, Robert
Posts: 1
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.
Posts: 32509
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) ?
Posts: 1
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?
Posts: 8601
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.
Posts: 32509
Do you need any help? I'm curious about the state of this feature, it sounds very promising
Posts: 1
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
Posts: 10
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
Posts: 69
sorry for replying an old post, but how is it going on? Really promising.
Posts: 4342
After three years? and for a product (gallery2) no longer under development? You are kidding, right?
Posts: 2
Hey, thats nice, but most of them are patented I can suggest you (after three years, right ;-) shareware named SignMyImage.
Posts: 1
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
Posts: 4342
Probably abandoned.
Posts: 4342
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.