Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Embedded Image Resizing using FFT
Date: Fri, 21 Nov 2008 16:29:02 +0000 (UTC)
Organization: Oxford University
Lines: 9
Message-ID: <gg6nkd$bjq$1@fred.mathworks.com>
References: <gg4co5$2cu$1@fred.mathworks.com> <gg4jc2$bck$1@fred.mathworks.com> <gg4kn6$2va$1@fred.mathworks.com> <gg4mdj$sjg$1@fred.mathworks.com> <gg4o3u$qfh$1@fred.mathworks.com> <gg4pkl$h47$1@fred.mathworks.com> <gg53fl$f0n$1@fred.mathworks.com> <gg56bi$fe6$1@fred.mathworks.com> <gg64up$sn8$1@fred.mathworks.com> <gg6k3u$ea4$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227284942 11898 172.30.248.35 (21 Nov 2008 16:29:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 21 Nov 2008 16:29:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1073021
Xref: news.mathworks.com comp.soft-sys.matlab:502333


Code which doesn't use toolboxes:

>> A = sum(imread('street1.jpg'), 3);
>> subplot(121); imagesc(A); colormap(gray(255)); axis image off
>> B = fftshift(fft2(A));
>> B = ifft2(ifftshift(B(116:end-114,171:end-169)));
>> subplot(122); imagesc(B); colormap(gray(255)); axis image off

Matt, your point on symmetry was correct and removes the imaginary component. However, the intensity scale still changes. Quality is ok, but there are still some high frequency artifacts - most visible at the top of this image, but more visible still on the cameraman image.