Click here to Skip to main content
Click here to Skip to main content

Porcupine

By , 15 Sep 2009
 

Porcupine ScreenShot

Introduction

Porcupine deals with digital image watermarking. You can embed any visible watermark like a text or another image in any position, or store information invisibly inside using a secret key (password).

Digital watermarking is a type of Steganography. In this field, except for the storage capacity of the host, the integrity of the information embedded to the host is very important. It is a technique which allows the dissimulation of information that verifies the owner, in digital sound, video, or image (in this case). The information can be encrypted. It constitutes a group of bits containing information about the creator, the owner, or the signal itself. Digital watermarking aims to validate the host and the undeniable identity of the legal owner. It provides a way for controlling host signals and represents the rightful holder. It also discourages illegal reproduction, and provides a way for safe distribution via the internet.

Some applications of digital watermarking:

  • The protection of intellectual rights, which is the most important application. When an illegal reproduction is detected, the offender should suffer the consequences of the law.
  • The proof of authenticity. The host must carry the digital signature of the creator.
  • The integrity of the host, if it continues to carry the digital signature.
  • The dissuasion of reproduction (copy control), caused by the fear of the probability that the offenders will be perceptible and suffer the consequences of the law.
  • The transmission of information without becoming perceptible from a third person, thanks to the invisible placement inside the host and its likely encrypted form.

Porcupine supports all of the known image formats (BMP, GIF, ICO, TGA, JPEG, PNG, TIFF, JPEG-2000, etc.).

Features

Visible Watermarking

  • Text Watermarking: Embeds a text on the image with the color and position of your choice. Each time, the text color selected and the pixel colors behind the text are checked. If they are the same, the text color changes automatically.
  • Image Watermarking: Embeds an image of your choice. Embedding options are via logical AND, OR, XOR, adding or subtracting, or drawing using the alpha channel.

Invisible Watermarking

Spatial Domain

  • LSB manipulation: Hides any file in the Least Significant Bit of pixels chosen by a certain equation. This could be done randomly but that way, there should be a certain threshold on the file size to be watermarked (random numbers can not be given forever). The equation solution solves this issue, and exploits the image dimensions. Furthermore, there are two "LSB watermarking" options with different pixel positions for multiple watermarking. This type of watermark is considered a "fragile watermark". It can be destroyed with the slightest manipulation (so don't save the image as JPEG). The information is protected via XOR scrambling or Blowfish encryption.

Example

Watermarked

Attack Results

Attacks

  • Patchwork: This is a statistical method that adds a Gaussian distribution. There is no information stored. The distribution is added randomly, and its existence proves the authenticity of the image.

Example

Patchwork example

Attack Results

Attack Results

Frequency Domain

  • DCT Watermarking: Embeds information in the frequency domain. This is done using the 2-D Discrete Cosine Transform. The information is stored in the low-mid frequencies of the image. The storage capacity of this technique is very poor. In most cases, one or two words are enough. To prevent image destruction, the user is required to give the smallest DCT coefficient above which the watermark will be inserted. If a small coefficient, which doesn't contribute to the image creation, is changed, the image will be destroyed. This method is considered a robust watermarking method. Porcupine uses only grayscale images for this technique.

Example and attack results

DCT example

  • Batch Watermarking: This option allows you to simultaneously put a visible or invisible watermark in a number of images. The "LSB watermark" and "Patchwork" options save the final images in BMP format as it is a format with no compression.

Among others, there is also an FTP upload available for uploading your watermarked images, a text reader, and a PSNR calculator.

Image Library

Basic Image Processing Classes in:

Porcupine Index Theory

CxImage

eikonaDoc.h
eikonaView.h
mass.h

To run the program, you have to download the CxImage Library and do a batch build. Then download the Porcupine source and place the folder inside the CxImage folder, along with the others (bin, CxImage, Debug, demo, etc..). Download the required LIBs and place them inside the Porcupine source folder. Since you want to mess with the source code and have Visual Studio installed, you probably don't need the required DLLs. You're ready to go.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Lampros Giampouras
Software Developer (Junior)
Greece Greece
Member
Physics Graduate

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionHow to remove a visible watermark ?membermozart198314 Mar '13 - 16:30 
QuestionHow to Dynamically image watermarking ?membernikhil94212 Aug '12 - 16:58 
AnswerRe: How to Dynamically image watermarking ?memberLampros Giampouras2 Aug '12 - 22:28 
GeneralMy vote of 5memberJ4S21 May '12 - 21:53 
QuestionWhich version of Cximage do I need to download and build? Please give me some help!memberjiangqiong22 Oct '11 - 2:57 
QuestionI cann't build from your source code?member12kaka25 Aug '11 - 18:40 
GeneralFeel free to upgrade this program !memberLampros Giampouras7 Dec '09 - 10:10 
GeneralI can't download the full demomemberlzlm10 Nov '09 - 23:34 
GeneralRe: I can't download the full demomemberlzlm10 Nov '09 - 23:57 
GeneralRe: I can't download the full demomemberLampros Giampouras11 Nov '09 - 0:59 
AnswerRe: I can't download the full demomemberLampros Giampouras11 Nov '09 - 1:18 
GeneralRe: I can't download the full demomemberlzlm11 Nov '09 - 1:40 
Generalreally good writememberzzh1221522 Sep '09 - 17:52 
GeneralThe full demo can't downloadmemberluoxing5 Aug '09 - 2:37 
GeneralRe: The full demo can't downloadmemberLampros G5 Aug '09 - 23:12 
GeneralRe: The full demo can't downloadmemberluoxing6 Aug '09 - 0:02 
QuestionHow to open j2k (JPEG 2000) filesmemberprashant_1444 Jun '09 - 23:50 
Hi,
It is very nice work done by you.
I just want to read and display j2k files.
 
It is working very good in your application.
I am just making a j2k reader for me.
 
Which classes do i need?
Please help me in reading and display of J2K images.
I am working in C#.net.
Thanks in advance
 
pcs

AnswerRe: How to open j2k (JPEG 2000) filesmemberLampros G6 Jun '09 - 6:30 
GeneralRemove watermarksmemberMember 283490020 May '09 - 0:46 
AnswerRe: Remove watermarksmemberLampros G20 May '09 - 1:48 
JokeRe: Remove watermarksmemberJim Crafton18 Sep '09 - 6:23 
GeneralRe: Remove watermarksmemberLampros G18 Sep '09 - 10:21 
GeneralRe: Remove watermarksmemberaspdotnetdev30 Sep '09 - 13:39 
GeneralRe: Remove watermarksmembermozart198314 Mar '13 - 16:21 
GeneralCorrelation between watermarksmembereddieweenie4 Feb '09 - 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 15 Sep 2009
Article Copyright 2006 by Lampros Giampouras
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid