summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/rcosFn.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/matlab/rcosFn.m
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/rcosFn.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/rcosFn.m45
1 files changed, 0 insertions, 45 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/rcosFn.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/rcosFn.m
deleted file mode 100755
index 5dac344..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/rcosFn.m
+++ /dev/null
@@ -1,45 +0,0 @@
1% [X, Y] = rcosFn(WIDTH, POSITION, VALUES)
2%
3% Return a lookup table (suitable for use by INTERP1)
4% containing a "raised cosine" soft threshold function:
5%
6% Y = VALUES(1) + (VALUES(2)-VALUES(1)) *
7% cos^2( PI/2 * (X - POSITION + WIDTH)/WIDTH )
8%
9% WIDTH is the width of the region over which the transition occurs
10% (default = 1). POSITION is the location of the center of the
11% threshold (default = 0). VALUES (default = [0,1]) specifies the
12% values to the left and right of the transition.
13
14% Eero Simoncelli, 7/96.
15
16function [X, Y] = rcosFn(width,position,values)
17
18%------------------------------------------------------------
19% OPTIONAL ARGS:
20
21if (exist('width') ~= 1)
22 width = 1;
23end
24
25if (exist('position') ~= 1)
26 position = 0;
27end
28
29if (exist('values') ~= 1)
30 values = [0,1];
31end
32
33%------------------------------------------------------------
34
35sz = 256; %% arbitrary!
36
37X = pi * [-sz-1:1] / (2*sz);
38
39Y = values(1) + (values(2)-values(1)) * cos(X).^2;
40
41% Make sure end values are repeated, for extrapolation...
42Y(1) = Y(2);
43Y(sz+3) = Y(sz+2);
44
45X = position + (2*width/pi) * (X + pi/4);