diff options
author | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 03:47:33 -0400 |
---|---|---|
committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 03:47:33 -0400 |
commit | a32f220f06cc463e5b56e7fa0b1b1334d94d08f3 (patch) | |
tree | 4af4caa60074465d85fc2ef5cc1b23e74c064329 /SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m | |
parent | 79f30887129145e15e5172e36a7d7602859fc932 (diff) |
matlab removed
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m')
-rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/shift.m | 15 |
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 | |||
6 | function res = shift(mtx, offset) | ||
7 | |||
8 | dims = size(mtx); | ||
9 | |||
10 | offset = mod(-offset,dims); | ||
11 | |||
12 | res = [ 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)) ]; | ||