summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/expand.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/expand.m
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/expand.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/expand.m34
1 files changed, 0 insertions, 34 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/expand.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/expand.m
deleted file mode 100755
index 5f6e4d9..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/expand.m
+++ /dev/null
@@ -1,34 +0,0 @@
1function te = expand(t,f)
2
3% Expand spatially an image t in a factor f
4% in X and in Y.
5% t may be complex.
6% It fills in with zeros in the Fourier domain.
7% te = expand(t, f)
8% See also: shrink.m
9% JPM, May 95, Instituto de Optica, CSIC, Madrid.
10
11[my mx]=size(t);
12my=f*my;
13mx=f*mx;
14Te=zeros(my,mx);
15T=f^2*fftshift(fft2(t));
16y1=my/2+2-my/(2*f);
17y2=my/2+my/(2*f);
18x1=mx/2+2-mx/(2*f);
19x2=mx/2+mx/(2*f);
20Te(y1:y2,x1:x2)=T(2:my/f,2:mx/f);
21Te(y1-1,x1:x2)=T(1,2:mx/f)/2;
22Te(y2+1,x1:x2)=((T(1,mx/f:-1:2)/2)').';
23Te(y1:y2,x1-1)=T(2:my/f,1)/2;
24Te(y1:y2,x2+1)=((T(my/f:-1:2,1)/2)').';
25esq=T(1,1)/4;
26Te(y1-1,x1-1)=esq;
27Te(y1-1,x2+1)=esq;
28Te(y2+1,x1-1)=esq;
29Te(y2+1,x2+1)=esq;
30Te=fftshift(Te);
31te=ifft2(Te);
32if all(imag(t)==0),
33 te = real(te);
34end