PSNR values of attacked watermarked image

7 vues (au cours des 30 derniers jours)
marie lasz
marie lasz le 7 Mai 2021
Commenté : Image Analyst le 8 Mai 2021
Hey all,
I am a bit confused right now after applying psnr tests between watermarked images and white noise watermarked images. PSNR value on unattacked watermarked image is 42,33 but for noisy images for variance 0,0001 i am getting psnr value 50.03. Shouldn't that noisy image's value be lesser than 42,33? And same is with jpeg compressed image 70 and 90 , psnr values are above 50 and the psnr values for unattacked watermark image is 42,33.
I am comparing psnr values with original image vs watermarked image
and
psnr values with watermarked image vs compressed/ noisy image .
Here is the code I am applying for psnr
[f_image]=uigetfile('*.jpg','select the original cover Image');
h_image=imread(f_image);
img_1= double(rgb2gray(h_image));
[rows columns] = size(rgb2gray(h_image));
[f_image2]=uigetfile('*.jpg','select the Watermarked Image');
watermarked=imread(f_image2);
img_2= double(rgb2gray(watermarked));
sq_err = (img_1 - img_2).^ 2;
mse = sum(sq_err(:)) / (rows * columns);
PSNR = 10 * log10( 255^2 / mse);
message = sprintf('The mean square error is %.2f.\nThe PSNR = %.2f', mse, PSNR);
msgbox(message);

Réponses (1)

Image Analyst
Image Analyst le 7 Mai 2021
There is a psnr() function built-in you know.
I see no reason to expect that comparing
  1. a watermarked image with the original
  2. an image with noise added compared to the original
  3. an image with JPEG compression artifacts to the original uncompressed image
that any of those would have more or less PSNR than any other. It just depends on what the watermark was and how much noise was added or how much compression loss was introduced. I would think any one of them could be more or less than any other of them.
  2 commentaires
marie lasz
marie lasz le 7 Mai 2021
thanks for your response. I also tried matlab's in built function but getting the same result. The reason for comparison was to see imperceptibility between unattacked watermarked image and attacked watermarked image.
Jpg compression i performed was with quality factor 10, 30, 50, 70,90 and for 70 and 90 values are much higher like psnr of original host image vs watermarked was 42 and with jpeg 70-90 compression , psnr between compressed and watermarked image is 555-58. I am really confused. watermark is a binary image of a small size.
Image Analyst
Image Analyst le 8 Mai 2021
As you know there are many ways to attach an image
  1. crop it
  2. change it's overall brightness or contrast
  3. rotate it
  4. scale it
  5. change the colors in it
  6. warp it
  7. change parts of it, like blurring parts or smudging or other types of changes.
  8. etc.
If the attack is mild enough, an attacked image and unattacked image might appear the same to an observer. Depending on the metric used to assess the integrity of the watermark, it should be able to detect a difference even though the observer might not detect any visible difference. A good watermark algorithm should be robust enough to handle some amount of attack and still be detected/extracted. The watermark may not be perfect but it may still be close enough to the perfect one for you to tell that the image is an attacked/forged version of your original image.
Certainly as compression artifacts grow, the watermark will degrade as well as the image itself. Users would probably be less able to discern a difference as the compression gets more extreme.

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by