idamnjanovic@38: function [RMSErn, RMSEcd, rn_im, cd_im] = vmrse_type2(orig, corr, recon) idamnjanovic@38: idamnjanovic@38: %%% Implementation of VectorRMSE type2 idamnjanovic@38: % idamnjanovic@38: % Centre for Digital Music, Queen Mary, University of London. idamnjanovic@38: % This file copyright 2011 Ivan Damnjanovic. idamnjanovic@38: % idamnjanovic@38: % This program is free software; you can redistribute it and/or idamnjanovic@38: % modify it under the terms of the GNU General Public License as idamnjanovic@38: % published by the Free Software Foundation; either version 2 of the idamnjanovic@38: % License, or (at your option) any later version. See the file idamnjanovic@38: % COPYING included with this distribution for more information. idamnjanovic@38: % idamnjanovic@38: % Input: idamnjanovic@38: % - Original image idamnjanovic@38: % - Corrupted image idamnjanovic@38: % - Reconstructed Image idamnjanovic@38: % idamnjanovic@38: % Output: idamnjanovic@38: % - RMSErn - RMSE from residual noise (noise not completely removed) idamnjanovic@38: % - RMSEcd - RMSE from collateral distortion - excessive filtering idamnjanovic@38: % - rn_im - image of residual noise idamnjanovic@38: % - cd_im - image of collateral distortion idamnjanovic@38: % idamnjanovic@38: % F. Russo, "New Method for Performance Evaluation of Grayscale Image idamnjanovic@38: % Denoising filters", IEEE Signal Processing Letters, vol. 17, no. 5, idamnjanovic@38: % pp.417-420, May 2010 idamnjanovic@38: %% idamnjanovic@38: idamnjanovic@38: recon_int = round(recon); idamnjanovic@38: idamnjanovic@38: RN1 = ((origrecon_int)&(recon_int>=corr)); idamnjanovic@38: CD1 = ((origcorr)); idamnjanovic@38: CD2 = ((orig>recon_int)&(recon_int