diff options
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m')
| -rwxr-xr-x | SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m deleted file mode 100755 index 9844ee8..0000000 --- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | % IM = mkImpulse(SIZE, ORIGIN, AMPLITUDE) | ||
| 2 | % | ||
| 3 | % Compute a matrix of dimension SIZE (a [Y X] 2-vector, or a scalar) | ||
| 4 | % containing a single non-zero entry, at position ORIGIN (defaults to | ||
| 5 | % ceil(size/2)), of value AMPLITUDE (defaults to 1). | ||
| 6 | |||
| 7 | % Eero Simoncelli, 6/96. | ||
| 8 | |||
| 9 | function [res] = mkImpulse(sz, origin, amplitude) | ||
| 10 | |||
| 11 | sz = sz(:)'; | ||
| 12 | if (size(sz,2) == 1) | ||
| 13 | sz = [sz sz]; | ||
| 14 | end | ||
| 15 | |||
| 16 | if (exist('origin') ~= 1) | ||
| 17 | origin = ceil(sz/2); | ||
| 18 | end | ||
| 19 | |||
| 20 | if (exist('amplitude') ~= 1) | ||
| 21 | amplitude = 1; | ||
| 22 | end | ||
| 23 | |||
| 24 | res = zeros(sz); | ||
| 25 | res(origin(1),origin(2)) = amplitude; | ||
