summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/pointOp.m28
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
18function 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
24X = origin + increment*[0:size(lut(:),1)-1];
25Y = lut(:);
26
27res = reshape(interp1(X, Y, im(:), 'linear', 'extrap'),size(im));
28