summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m
diff options
context:
space:
mode:
authorleochanj105 <leochanj@live.unc.edu>2020-10-20 03:47:33 -0400
committerleochanj105 <leochanj@live.unc.edu>2020-10-20 03:47:33 -0400
commita32f220f06cc463e5b56e7fa0b1b1334d94d08f3 (patch)
tree4af4caa60074465d85fc2ef5cc1b23e74c064329 /SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m
parent79f30887129145e15e5172e36a7d7602859fc932 (diff)
matlab removed
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m15
1 files changed, 0 insertions, 15 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m b/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m
deleted file mode 100755
index 497297e..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m
+++ /dev/null
@@ -1,15 +0,0 @@
1% [RES] = shift(MTX, OFFSET)
2%
3% Circular shift 2D matrix samples by OFFSET (a [Y,X] 2-vector),
4% such that RES(POS) = MTX(POS-OFFSET).
5
6function res = shift(mtx, offset)
7
8dims = size(mtx);
9
10offset = mod(-offset,dims);
11
12res = [ mtx(offset(1)+1:dims(1), offset(2)+1:dims(2)), ...
13 mtx(offset(1)+1:dims(1), 1:offset(2)); ...
14 mtx(1:offset(1), offset(2)+1:dims(2)), ...
15 mtx(1:offset(1), 1:offset(2)) ];