1
$\begingroup$

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

$\endgroup$
4
  • $\begingroup$ 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. $\endgroup$
    – Peter K.
    Jan 29, 2015 at 19:22
  • $\begingroup$ I totallt agree with you but unfortunately it's a task that i am supposed to do $\endgroup$
    – Alladin
    Jan 29, 2015 at 19:46
  • $\begingroup$ 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. $\endgroup$
    – MSalters
    Jan 30, 2015 at 13:13
  • $\begingroup$ 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. $\endgroup$
    – Sau001
    Jun 26, 2021 at 23:35

2 Answers 2

1
$\begingroup$

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

enter image description here

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.