summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m
diff options
context:
space:
mode:
authorleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
committerleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
commit25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 (patch)
treeba80e76d25d9ca9486092e2f6b6d76f0e3352bf7 /SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
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)) ];