图像质量评价指标及MATLAB程序

指标名称:RMSE

针对一个volume的程序:

M = 230; % 行数
N = 140; % 列数
P = 11; % 切片数
% -------------计算RMSE(volume)-------------
P_origin_vector = p(:);
P_recon_vector = P_recon(:);
MNP = M*N*P;
numerator_volume = ((sum((P_recon_vector-P_origin_vector).^2)));
disp('***********RMSE:****************');
RMSE_volume = sqrt(numerator_volume/MNP)

针对一个slice的程序:

P_origin_slice_vector = P_origin_slice(:);
P_recon_slice_vector = P_recon_slice(:);
MN = M*N;
numerator_slice = ((sum((P_recon_slice_vector-P_origin_slice_vector).^2)));
RMSE_slice = sqrt(numerator_slice/MN)

你可能感兴趣的:(小知识,MATLAB编程)