diff options
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkAngle.m')
-rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkAngle.m | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkAngle.m b/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkAngle.m deleted file mode 100755 index bd54f8d..0000000 --- a/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkAngle.m +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | % IM = mkAngle(SIZE, PHASE, ORIGIN) | ||
2 | % | ||
3 | % Compute a matrix of dimension SIZE (a [Y X] 2-vector, or a scalar) | ||
4 | % containing samples of the polar angle (in radians, CW from the | ||
5 | % X-axis, ranging from -pi to pi), relative to angle PHASE (default = | ||
6 | % 0), about ORIGIN pixel (default = (size+1)/2). | ||
7 | |||
8 | % Eero Simoncelli, 6/96. | ||
9 | |||
10 | function [res] = mkAngle(sz, phase, origin) | ||
11 | |||
12 | sz = sz(:); | ||
13 | if (size(sz,1) == 1) | ||
14 | sz = [sz,sz]; | ||
15 | end | ||
16 | |||
17 | % ----------------------------------------------------------------- | ||
18 | % OPTIONAL args: | ||
19 | |||
20 | if (exist('origin') ~= 1) | ||
21 | origin = (sz+1)/2; | ||
22 | end | ||
23 | |||
24 | % ----------------------------------------------------------------- | ||
25 | |||
26 | [xramp,yramp] = meshgrid( [1:sz(2)]-origin(2), [1:sz(1)]-origin(1) ); | ||
27 | |||
28 | res = atan2(yramp,xramp); | ||
29 | |||
30 | if (exist('phase') == 1) | ||
31 | res = mod(res+(pi-phase),2*pi)-pi; | ||
32 | end | ||