Attacks on Watermarked Image <p>I am doing a project on Image watermarking using Discrete Wavelet Transform(DWT) and Encryption. It is carried out in the following steps</p> <p>1.) Select the host image( Image in which watermark will be hidden).<br> 2.) Select the watermark.<br> 3.) Encrypt the watermark using the following code(Matlab Code) </p> <pre><code>b= strcat(b,a); %String Concatenation c=imread(b); %Image is read and stored in the variable c [p,q,r]=size(c); %displaying the dimensions of Image %%%%%%%%%Cipher watermark%%%%%%%%%%%%%%%%%%%%% scrambleOrder = randperm(p*q); %this is a ranperm method which generated random values redChannel = c(:, :, 1); %Extarction of red channel greenChannel = c(:, :, 2); %Extarction of green channel blueChannel = c(:, :, 3); %Extarction of blue channel redChannel = redChannel(scrambleOrder); %Red channel will be given random values as generated above greenChannel = greenChannel(scrambleOrder); %Green channel will be given random values as generated above blueChannel = blueChannel(scrambleOrder); %Blue channel will be given random values as generated above redChannel = reshape(redChannel, [p,q]); %reshaping red channel as given by (p and q) greenChannel = reshape(greenChannel, [p,q]); %reshaping green channel as given by (p and q) blueChannel = reshape(blueChannel, [p,q]); %reshaping blue channel as given by (p and q) s = cat(3, redChannel, greenChannel, blueChannel); %displacing rgb channel collectively </code></pre> <p>4.) Watermarking using DWT.</p> <p>5.) Recover the Encrypted watermark using recovery formula.</p> <p>6.) Decryption of watermark using the following code.</p> <pre><code> recoverOrder = zeros([u*v], 2); %it will generate the 2 columns having maximum value u*v and where u and v are dimensions(width and height) of recoverd watermark from watermarked image. recoverOrder(:, 1) = 1 : (u*v); %make the first coluns value from 1: u*v recoverOrder(:, 2) = scrambleOrder; %make second column value od randon permutaion generated during encryption newOrder1 = sortrows(recoverOrder, 2); %sort rows of column1 and column 2 newOrder = newOrder1(:,1); Eliminate column2 redChannel = redChannel(newOrder); %New order value into red channel greenChannel = greenChannel(newOrder); %New order value into green channel blueChannel = blueChannel(newOrder); %New order value into blue channel redChannel = reshape(redChannel, [u, v]); %reshape red channel greenChannel = reshape(greenChannel, [u, v]); %reshape green channel blueChannel = reshape(blueChannel, [u, v]); %reshape blue channel D = cat(3, redChannel, greenChannel, blueChannel); %cat RGB and store it in D </code></pre> <p>My Question is that I have made many attacks on Watermarked Image like Rotation, Scaling, Croping but PSNR and MSE between (Watermark and Decrypted watermark) after and before attack remain Infinity and Zero respectively.</p> <p>I think During Decryption, I have used same ran permutation that I used to ENCRYPT the image. So I think, Attacks have no effect on decrypted image.</p> <p>Question is how to improve my code or what suggestions you can give me.</p>