- a watermarked image with the original
- an image with noise added compared to the original
- an image with JPEG compression artifacts to the original uncompressed image
PSNR values of attacked watermarked image
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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);
0 Kommentare
Antworten (1)
Image Analyst
am 7 Mai 2021
There is a psnr() function built-in you know.
I see no reason to expect that comparing
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 Kommentare
Image Analyst
am 8 Mai 2021
As you know there are many ways to attach an image
- crop it
- change it's overall brightness or contrast
- rotate it
- scale it
- change the colors in it
- warp it
- change parts of it, like blurring parts or smudging or other types of changes.
- 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.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!