Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Embedded Image Resizing using FFT
Date: Thu, 20 Nov 2008 19:11:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <gg4co5$2cu$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227208262 2462 172.30.248.38 (20 Nov 2008 19:11:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 20 Nov 2008 19:11:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1300181
Xref: news.mathworks.com comp.soft-sys.matlab:502110


I'm currently looking for a way to rescale/resize images using Embedded Matlab. 
I've read it should be possible using the Frequency domain. And since the fft2 and ifft2 functions are supported by the Embedded Matlab subset I thought I'd go this way. If you have any other suggestions they are also welcome

However I haven't found any actual information on the subject or how to proceed. Can you offer any help or examples? 

I'd like to achieve something like:

factor = 0.5;
image = imread('test.bmp');
%Each of the RGB planes is 0 to 255
imageR(:,:,1) = fftResize(image(:,:,1), factor);
imageR(:,:,2) = fftResize(image(:,:,2), factor);
imageR(:,:,3) = fftResize(image(:,:,3), factor);
imwrite(imageR, 'test_resized.bmp', 'bmp');

function img_re = fftResize(img, factor)
img = im2double(img);
fft = fft2(img);

%Part where I need help%

img_re = ifft2(img_resized);
img_re = uint8(floor(img_re));
end