# Non Circulant Translation Using Fourier Transform

The translation property of Fourier Transform (FT) for a two dimensional image $$f$$ is as $$f(x-x_0, y - y_0) = F(u, v)e^{-j2\pi(ux_0/M+vy_0/N)}$$

Using this equation, the following code (in Matlab) computes and shows translation of the input image.

im = im2double(imread('cameraman.tif'));
F = fft2(im);
[r, c] = size(F);
x0 = 20;
y0 = 40;

% [u, v] = meshgrid(1:c, 1:r);
[u, v] = meshgrid(-c/2:c/2-1, -r/2:r/2-1);
A = fftshift(exp(-1i * 2 * pi * (u * x0 / c + v * y0 / r )));

Y = F .* A ;
y = ifft2(Y);
imshow(real(y), [])


The output of above code is as follows but I need output image be as following My question: How I can produce The second image using FT? Thanks.

## 1 Answer

You can obtain an apparently linear translation using DFT by

• first zero padding the original image into a large enough size according to the translation you want.

• then applying DFT for unavoidable circulant translation

• and finally cropping the original size of the output

Very inefficient using FT but if it's what you want...