HOW TO ADD MSE TO EXISTING TOOL (CODE)?
1 view (last 30 days)
Show older comments
I have discovered the PVD Steganography tool from Github. the code only provide psnr calculation but i want to add mse and only get error. How i do so and code is connected to GUI. Thank you.
-CODE LINK FOR PSNR-
-CODE FOR PVD TOOL-
0 Comments
Accepted Answer
DGM
on 25 May 2022
Use immse()
A = imread('peppers.png'); % some reference image
B = imnoise(A,'gaussian',0.001); % a modified copy
immse(A,B) % the MSE
3 Comments
DGM
on 11 Jun 2022
Edited: DGM
on 11 Jun 2022
The MSE is the mean of the square of a difference. If both images have a nominal range of [0 k], then the MSE will have a nominal range of [0 k^2].
If you expect that the nominal range of MSE is [0 1], then that implies that you expect your images to both have the same nominal range of [0 1].
A = imread('peppers.png'); % some reference image
B = imnoise(A,'gaussian',0.001); % a modified copy
% these images are both in the range [0 255]
err1 = immse(A,B) % the MSE
% if the images were both in the range of [0 1]
% this is what you'd get:
err2 = immse(im2double(A),im2double(B))
% which is the same as
err1/(255^2)
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!