function [psnr,mse]=PSNR(image1,image2,maxint)


mse=abs(double(image1)-double(image2)).^2;

[n_rows,n_coloumns]=size(image1);

mse=sum(mse(:))/(n_rows*n_coloumns);

psnr=10*log10(maxint^2/mse);


    
    