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 --- .../texture_synthesis/src/matlabPyrTools/ifftshift.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/ifftshift.m (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/ifftshift.m') diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/ifftshift.m b/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/ifftshift.m new file mode 100755 index 0000000..2ade297 --- /dev/null +++ b/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/ifftshift.m @@ -0,0 +1,15 @@ +% [RES] = ifftshift (MTX) +% +% Inverse of MatLab's FFTSHIFT. That is, +% ifftshift(fftshift(MTX)) = MTX +% for any size MTX. + +% Eero Simoncelli, 2/97. + +function [res] = ifftshift(mtx) + +sz = size(mtx); +DC = ceil((sz+1)./2); % location of DC term in a matlab fft. + +res = [mtx(DC(1):sz(1), DC(2):sz(2)) , mtx(DC(1):sz(1), 1:DC(2)-1); ... + mtx(1:DC(1)-1, DC(2):sz(2)) , mtx(1:DC(1)-1, 1:DC(2)-1)]; -- cgit v1.2.2