From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- SD-VBS/benchmarks/texture_synthesis/src/matlab/snr.m | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 SD-VBS/benchmarks/texture_synthesis/src/matlab/snr.m (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/snr.m') diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/snr.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/snr.m new file mode 100755 index 0000000..3945d90 --- /dev/null +++ b/SD-VBS/benchmarks/texture_synthesis/src/matlab/snr.m @@ -0,0 +1,10 @@ +function X=SNR(s,n); + +% Compute the signal-to-noise ratio in dB +% X=SNR(signal,noise); +% (it does not subtract the means). + +es=sum(sum(abs(s).^2))+0.0000001; +en=sum(sum(abs(n).^2))+0.0000001; +X=10*log10(es/en); + -- cgit v1.2.2