summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.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 15:59:54 -0400
commit0efc775370d2ff91927d1b383a99eab78dc5538f (patch)
treea41fe470fee5adc4d944ecd6b917bc48df8c7e0f /SD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.m
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
FLUSH_CACHES
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.m25
1 files changed, 0 insertions, 25 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.m
deleted file mode 100755
index 7af0151..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/shrink.m
+++ /dev/null
@@ -1,25 +0,0 @@
1function ts=shrink(t,f)
2
3% It shrinks an image in a factor f
4% in each dimension.
5% ts = shrink(t,f)
6% ts may also be complex.
7% See also: expand.m, blurDn.m
8% JPM, April 95, Instituto de Optica, CSIC, Madrid.
9
10[my,mx]=size(t);
11T=fftshift(fft2(t))/f^2;
12Ts=zeros(my/f,mx/f);
13y1=my/2+2-my/(2*f);
14y2=my/2+my/(2*f);
15x1=mx/2+2-mx/(2*f);
16x2=mx/2+mx/(2*f);
17Ts(2:my/f,2:mx/f)=T(y1:y2,x1:x2);
18Ts(1,2:mx/f)=(T(y1-1,x1:x2)+T(y2+1,x1:x2))/2;
19Ts(2:my/f,1)=(T(y1:y2,x1-1)+T(y1:y2,x2+1))/2;
20Ts(1,1)=(T(y1-1,x1-1)+T(y1-1,x2+1)+T(y2+1,x1-1)+T(y2+1,x2+1))/4;
21Ts=fftshift(Ts);
22ts=ifft2(Ts);
23if all(imag(t)==0),
24 ts = real(ts);
25end