clear all
close all

imagedata = double(imread('D:\likun_1\codec\jasper-1.701.0_1\jasper-1.701.0\src\msvc\bin\barbara2.pgm'));
recimage = double(imread('D:\likun_1\codec\jasper-1.701.0_1\jasper-1.701.0\src\msvc\bin\barbara2_r.pgm'));
% figure; imshow(recimage, [])
calcpsnr(imagedata, recimage)