clear all
close all

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