%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Author: Matthew Gaubatz
%%% Version: 1.0
%%% Date: 01/05/2007
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Copyright (c) 2007 Visual Communications Lab, Cornell University
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Permission to use, copy, modify, distribute and sell this software
%%% and its documentation for any purpose is hereby granted without fee,
%%% provided that the above copyright notice appear in all copies and
%%% that both that copyright notice and this permission notice appear
%%% in supporting documentation. VCL makes no representations about
%%% the suitability of this software for any purpose.
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% DISCLAIMER:
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The code provided hereunder is provided as is without warranty
%%% of any kind, either express or implied, including but not limited
%%% to the implied warranties of merchantability and fitness for a
%%% particular purpose. The author(s) shall in no event be liable for
%%% any damages whatsoever including direct, indirect, incidental,
%%% consequential, loss of business profits or special damages.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The author of this source code is Matthew Gaubatz, Visual Communications Lab, Cornell University. All rights reserved by the author. Sorry for not being able to provide the original link. I just want to backup these at Github. Should this violate your rights, kindly remind me. I shall delete your document without hesitation and delay.
This repo contains code implemented by Matlab for computing PSNR and SSIM. Lines are clear for studying. Easy to figure out the internals of how the algorithm does. Tests passed with correct results.