# Is there a better Fourier Transform-based algorithm to use in Image recognition

I have been trying to use the Fourier transform in recognizing images of the same size 200x400.

I have tried many different ways to do that such as:

1. Performing the Fourier on the full image and then try to match it with the ones in the database. the accuracy rate was very bad.
2. Performing the Fourier on the full image and then take only the sub-matrix contained in centre of the image and then match it with the ones in the database. the accuracy rate was also very bad.
3. Performing the Fourier on the full image and then take only the horizontal and vertical vector that intersect in the centre of the image, and then match it with the ones in the database. also, the accuracy rate was very bad.

Is there any better algorithm that might help me solve this problem?

Thank you very much

• Why do you think the Fourier transform will be any use for image recognition? What feature set to use often depends on the sorts of things you're trying to recognize.
– Peter K.
Jan 29 '15 at 19:22
• I totallt agree with you but unfortunately it's a task that i am supposed to do Jan 29 '15 at 19:46
• How exactly did you compare the Fourier Transforms anyway? Similarity is a real number, your 2D fourier transforms are both matrices of 400x200 complex numbers. Jan 30 '15 at 13:13
• You could try doing the Fourier transform on smaller patches. E.g. 50X50 and also use a stride of 25 so that no information is lost in the boundary of the ptach. Jun 26 at 23:35

The Fourier Transform is good for picking up some similarities between images:

• Shifts in $x$ and $y$ are just phase changes in the Fourier domain.
• Rotations in the $x-y$ plane cause rotations in the Fourier domain.

So, if this is what you are trying to achieve, then it makes sense.

See this paper for a performance analysis of doing this using the following algorithm Matching images is very common function in image processing, and there is a great deal of literature available on the subject. Cross-correlation via template (or pattern) matching is one of many ways of accomplishing it. Download the following tutorial to see an explanation and C++ example:

http://fftguru.com/fftguru.com.tutorial3.pdf

Note that, in the code, the 2D inverse FFT is accomplished by reversing the FFT arguments (ie: if fft_8(r1,i1) is the forward 2D transform, then fft_8(i1,r1) is the inverse 2D transform - the fft routine must, of course, be for complex inputs/outputs).

There are many other image processing tutorials available, some of which use different methods.