View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

4.9 | 9 ratings Rate this file 66 Downloads (last 30 days) File Size: 1.86 MB File ID: #41686 Version: 1.1
image thumbnail

DWT - SVD robust and secure watermarking scheme


Chez (view profile)


08 May 2013 (Updated )

Watermarking scheme based on DWT and SVD techniques.

| Watch this File

File Information

This is a methodology of robust and secure watermarking scheme as described in the following paper Besides that the code implements ROC curves and different methods of attacks to justify the robustness of the scheme.

You can also download the source code from github:

Required Products Data Acquisition Toolbox
Fuzzy Logic Toolbox
Image Processing Toolbox
Signal Processing Toolbox
Statistics and Machine Learning Toolbox
Wavelet Toolbox
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (22)
09 Jan 2017 Zakir

Zakir (view profile)


21 Apr 2016 chaitanya g p

Error: File: dwt_svd.m Line: 91 Column: 11
Expression or statement is incorrect--possibly unbalanced (, {, or [.

getting this error. please help me out

Comment only
16 Feb 2016 Manu BN

Manu BN (view profile)

17 Jan 2016 DAVID KING

If u have any query regarding ur project either mail at or, Kindly Spread it to Help Others.

Comment only

Siddhart Gupta,
Try to make three directory with the names:
"watermarked_images", "logos", and "attacked".
Those are just places that your code wants save the images.

13 Mar 2015 Siddharth Gupta

Hey Chez, thanks.... this source code really help me.
I am having some errors like,
??? Error using ==> imwrite at 453
Can't open file "C:\Users\sid\Documents\MATLAB\wateramarking-master\watermarked_images\1.png" for writing.
You may not have write permission.
Error in ==> dwt_svd at 75
imwrite(uint8(watermarked_image), watermarked_images_dir, 'png');
while executing the dwt_svd.m file
I have done those changes like bi2de and de2bi as you have mentioned in your comments.
Please help me to remove these errors.

26 Sep 2014 xuxiaojun

21 May 2014 Chez

Chez (view profile)

@Eshwar Gowda: you're right I will add a readme file once I get some free time. Until then you can read my answer to @ddd hhh: about how the application works. Thanks!

Comment only
16 Apr 2014 Hatem Almabrouk

hello dear
I want the main program that call all your functions and I want the images that work in this program
thank you

Comment only
05 Apr 2014 ENTC

ENTC (view profile)

Thank you... this is very helpful..
I am getting error in function attacks()
error is as following
??? Input argument "watermarked_images" is undefined. plz help

Error in ==> meanAttack at 4
meanImageAttacked = filter2(h, watermarked_images);

Error in ==> attacks at 20
attack = input('Please insert the name of the attack you wanna try!\n');

Error in ==> dwt_svd4 at 157

05 Apr 2014 ENTC

ENTC (view profile)

21 Feb 2014 Eshwar Gowda

Thank you! This is helpful.
Please include a Readme file along with the code.

14 Nov 2013 Nguyen

Nguyen (view profile)

thanhk you! this file very helpful.

Comment only
11 Nov 2013 Chez

Chez (view profile)

@dungke, you can definitely use the functions "de2bi" and "bi2de" instead of "decimalToBinaryVector" and "binaryToDecimalVector" in signature embedding

Comment only
31 Oct 2013 dungke

dungke (view profile)

Hello Chez,
First of all,i also get the error for "decimalToBinaryVector" and "binaryVectorToDecimal" function.Can i use "de2bi" and "bi2de" instead?

-If no, please help to replace the code in file "signature_embedding.m" on line 66: "bin2decimal(x) = binaryVectorToDecimal(double(binary_coefficients{1, x}));" by "bitset" .

-If yes,i have a problem need your help:
I have executed the code as Part A but the image is not clear it is in the form of blocks.I took a look your code and found: in file watermark_embedding.m, on line 66 : watermarked_image = idwt2(LL_inv, HL, LH, HH_modified, 'haar');
if i changed "LL_inv" to "LL" (I did not use signature_embedding process)then image is ok.
Could you tell me why this is happening?? Please I really need your help...

Comment only
22 Sep 2013 Chez

Chez (view profile)

@ddd hhh, let me briefly explain what the code does.

Part A:

If you just want to hide a logo "let's say a watermark image" inside another image then simply open "dwt_svd.m" go to line 41: and change the "gaussian_plot = true" to "gaussian_plot = false".

On line 42: change "print_figures = false" to "print_figures = true".

Finally execute the dwt_svd.m from matlab command window and watch the figures.

Part B:

Now if you want to :

1. embed a watermeark logo into some images

2. attack those watermarked images to see the strength of watermarking scheme

3. plot gaussians and roc curves

Then don't make the changes I mentioned in Part A.

Execute (when I say execute I mean run them from matlab command window) "dwt_svd.m" to apply the watermark to the image you want, then execute "attacks.m" and enter in single quotes the name of the attack you want to apply to the watermarked images (e.g. 'mean' or 'median' or 'noise' or 'rotation' or 'shear' or 'crop').

Then a popup window will ask you to indicate the watermark logo you used in the embeding step when you initial applied the watermark to the cover image when you executed the "dwt_svd.m" file.

After the code stops executing you should have images with numeric names from [1-1000] in the following directories:

attacked = in this directory will be stored the watermarked images after the attack has been applied to them

logos = here you'll have the corresponding watermark logos extracted from the attacked images

watermarked_images = here you'll have the images with the watermark applied to them

Comment only
20 Sep 2013 ddd hhh

I have executed the code but the image is not clear it is in the form of blocks. Can you tell me y this is happening?? Please I really need your help...

Comment only
17 Sep 2013 ddd hhh

Can I modify the code so that it can accommodate two different watermarks. One watermark will be in the HH band And where can I place the other watermark so that the cover image is not distorted?? Please help!!!

Comment only
16 Sep 2013 Chez

Chez (view profile)

You're either using an older matlab version than 8 or you don't have the exact toolbox that supports that native matlab function. You're gonna have to replace the function "decimalToBinaryVector" with equivalent "bitset" or "bitget" supposing that your matlab version does include the above functions

Comment only
16 Sep 2013 ddd hhh

when I run the code the error I get is

Undefined function 'decimalToBinaryVector' for input arguments of type 'double'.

Error in signature_embedding (line 51)
binary_coefficients{p} = decimalToBinaryVector(integer_part(p), 16);

Error in watermark_embedding (line 57)
LL_inv = signature_embedding(LL, signature, print_figures);

Error in dwt_svd (line 71)
[watermarked_image, original_signature] = ...

I am not getting what the problem is. Please help

Comment only
16 Sep 2013 ddd hhh

The source code that I have downloaded from github is giving error in embedding section.

Comment only
29 Aug 2013 1.1

I have inserted and additional online source such as github from where anyone can download the source code

Contact us