How to calculate PSNR in Matlab Figure file?
Show older comments
I wish to calculate the PSNR between two signals.
The input file would be Matlab Figure file.
signal1 = openfig('Figure1.fig');
signal2 = openfig('Figure2.fig');
[R C]=size(signal1);
err = sum((signal1-signal2).^2)/(R*C);
MSE=sqrt(err);
MAXVAL=65535;
PSNR = 20*log10(MAXVAL/MSE);
disp(MSE);
disp(PSNR);
However, the error shows:
Operator '-' is not supported for operands of type 'matlab.ui.Figure'.
Error in file (line 4)
err = sum((signal1-signal2).^2)/(R*C);
How can I solve the error?
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!