From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- .../src/matlabPyrTools/mkZonePlate.m | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkZonePlate.m (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkZonePlate.m') diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkZonePlate.m b/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkZonePlate.m new file mode 100755 index 0000000..2b6a4a5 --- /dev/null +++ b/SD-VBS/benchmarks/texture_synthesis/src/matlabPyrTools/mkZonePlate.m @@ -0,0 +1,33 @@ +% IM = mkZonePlate(SIZE, AMPL, PHASE) +% +% Make a "zone plate" image: +% AMPL * cos( r^2 + PHASE) +% SIZE specifies the matrix size, as for zeros(). +% AMPL (default = 1) and PHASE (default = 0) are optional. + +% Eero Simoncelli, 6/96. + +function [res] = mkZonePlate(sz, ampl, ph) + +sz = sz(:); +if (size(sz,1) == 1) + sz = [sz,sz]; +end + +mxsz = max(sz(1),sz(2)); + +%------------------------------------------------------------ +%% OPTIONAL ARGS: + +if (exist('ampl') ~= 1) + ampl = 1; +end + +if (exist('ph') ~= 1) + ph = 0; +end + +%------------------------------------------------------------ + +res = ampl * cos( (pi/mxsz) * mkR(sz,2) + ph ); + -- cgit v1.2.2