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/matlab/pointOp.m | |
parent | 79f30887129145e15e5172e36a7d7602859fc932 (diff) |
matlab removed
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m')
-rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m deleted file mode 100755 index feb7750..0000000 --- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | % RES = pointOp(IM, LUT, ORIGIN, INCREMENT, WARNINGS) | ||
2 | % | ||
3 | % Apply a point operation, specified by lookup table LUT, to image IM. | ||
4 | % LUT must be a row or column vector, and is assumed to contain | ||
5 | % (equi-spaced) samples of the function. ORIGIN specifies the | ||
6 | % abscissa associated with the first sample, and INCREMENT specifies the | ||
7 | % spacing between samples. Between-sample values are estimated via | ||
8 | % linear interpolation. If WARNINGS is non-zero, the function prints | ||
9 | % a warning whenever the lookup table is extrapolated. | ||
10 | % | ||
11 | % This function is much faster than MatLab's interp1, and allows | ||
12 | % extrapolation beyond the lookup table domain. The drawbacks are | ||
13 | % that the lookup table must be equi-spaced, and the interpolation is | ||
14 | % linear. | ||
15 | |||
16 | % Eero Simoncelli, 8/96. | ||
17 | |||
18 | function res = pointOp(im, lut, origin, increment, warnings) | ||
19 | |||
20 | %% NOTE: THIS CODE IS NOT ACTUALLY USED! (MEX FILE IS CALLED INSTEAD) | ||
21 | |||
22 | %fprintf(1,'WARNING: You should compile the MEX version of "pointOp.c",\n found in the MEX subdirectory of matlabPyrTools, and put it in your matlab path. It is MUCH faster.\n'); | ||
23 | |||
24 | X = origin + increment*[0:size(lut(:),1)-1]; | ||
25 | Y = lut(:); | ||
26 | |||
27 | res = reshape(interp1(X, Y, im(:), 'linear', 'extrap'),size(im)); | ||
28 | |||