Code covered by the BSD License  

Highlights from
updownsample

4.66667

4.7 | 6 ratings Rate this file 11 Downloads (last 30 days) File Size: 3.1 KB File ID: #4658
image thumbnail

updownsample

by Ohad Gal

 

21 Mar 2004 (Updated 22 Nov 2004)

up/down sample an input matrix using the fourier domain.

| Watch this File

File Information
Description

Up/down sample an image/matrix/vector (can be of complex numbers) using the frequency domain.
The matrix/vector should be continuous of a high degree (has continuous derivatives) in order to obtain a reasonable up/down sampling

Speed-up can be achieved if the user up-samples to a near power of 2. no optimization is done inside this code for efficient fft usage.

Documentation is found inside the *.m file.

type "updownsample" for the example

Acknowledgements

Fft Upsample inspired this file.

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
geometric transformation, image registration, upsample downsample fourier interpolation
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
29 Sep 2010 Aravind Kumar

The code works great ! Thanks.

31 Mar 2010 Sumedh Joshi  
26 Nov 2009 Jong Rah  
14 Sep 2007 Jeroen Corthout  
12 Jan 2005 David Felguera

Problems with circular convolutions ...

Just try:

in_m = ones(10,10);
in_m = [zeros(10,10);in_m;zeros(10,10)];
in_m = [in_m,zeros(30,10)];
figure(100);
imagesc(in_m);
out_x_sz = 320;
out_y_sz = 320;
out_m = updownsample( in_m,out_x_sz,out_y_sz,0,1);
figure(200);
imagesc(out_m);

I dont know exactly if its a circular convolution but it seems to. (could be some kind of aliasing too, when processing some kind of images)

10 Apr 2004 Ahmed Zakzouk

nice work

09 Apr 2004 Aaron Clarke

Nice function. Works great.

Updates
22 Nov 2004

I found a linear phase distortion in the output image (only when looking at a complex or real output image), due to spatial misplace of the input image in the fourier domain

Contact us