1

I am new to Digital Image Processing and have to simulate a Fourier Descriptor Program that is Affine Invariant, I want to know the prerequisites required to be able to understand this program, my reference is Digital Image Processing Using MATLAB by Gonzalez, I have seen a question on this site, regarding same program, but not able to understand the program as well as the solution, the question says:

"I am using Gonzalez frdescp function to get Fourier descriptors of a boundary. I use this code, and I get two totally different sets of numbers describing two identical but different in scale shapes.

So what is wrong?"

Can some body help me in knowing the prerequisite to understand this program as well as help me further?

Userhanu
  • 149
  • 8
  • I'm wondering where I should crash the material. Do you know about fourier series? – kolonel Oct 27 '14 at 17:36
  • yes Fourier Series I know and also Fast Fourier Transform (FFT) and have a basic idea of theory of Fourier Descriptors and some what MATLAB – Userhanu Oct 27 '14 at 17:39
  • So what exactly is your question if you understand the theory of Fourier Descriptors? – kolonel Oct 27 '14 at 17:40
  • ok let me give you the program in the book and the answer that they have, I am confused, the program given as a solution by Gonalez and VitoShadow(on link http://stackoverflow.com/questions/9967527/matlab-fourier-descriptors-whats-wrong) says " I assume that the boundary is a N x 2 matrix" I am not able to get this point, I know about theory of Fourier descriptors but not able to connect the dots between FFT and Fourier Descriptors, further this program the link of whose I have given is not clear to me, I have simulation work to be done on Fourier Descriptors? I hope you can get my problem. – Userhanu Oct 27 '14 at 17:49
  • I think I figured out what you are looking for. Give me some time to write it. – kolonel Oct 27 '14 at 21:03

1 Answers1

1

Let me give this a try as I will have to use english and not mathematical notation. First, this is the documentation of the frdescp shown here. frdescp takes one argument which is an n by 2 matrix of numbers. What are these numbers? This requires some understanding of the mathematical foundation of Fourier Descriptors. The assumptions, before computing the Fourier Descriptors, is that you have a contour of the object, and you have some points on that contour. So for example a contour is shown in this picture:

car

You see that black line in the image? That is where you will pick a list of points going clockwise from the contour. Let's call this vector {(x_1, y_1), (x_2,y_2),... ,(x_n,y_n)}. Now that we have these points we are ready to compute the Fourier descriptors of this contour. The complex Fourier descriptor implemented in this Matlab function requires numbers to be in the complex domain. So you have to convert the numbers in our list to complex numbers, this is easy as you can transform a tuple of real numbers in 2D (x,y) to x + iy in the complex plane. However the matlab the function already does this for you. But now you know what the n by 2 matrix is for, it is just a list of xs and ys on the contour. After you have this, the matlab function takes the discrete Fourier transform and you get the descriptors. The benefit of this descriptor business is that it is invariant under certain geometric transformations such translation, rotation and scaling. I hope this was helpful.

kolonel
  • 1,412
  • 2
  • 16
  • 33
  • It solved my problem, Can I request you to help me knowing some material I can get on implementing Affine Invariant Fourier Descriptors? I am quite weak regarding its theoritical concepts and need to implement it(I need FD for this purpose). Anyways thanks a lot :) – Userhanu Oct 28 '14 at 11:02
  • @Ankit No problem. If it is something very specific then I can help you with it here. Otherwise, if it requires about as much explanation as this post, then I recommend you post another question. – kolonel Oct 28 '14 at 16:39
  • I have written another question for the same, can you please check and tell if you can help? http://stackoverflow.com/questions/26814588/what-are-the-prerequisites-to-understand-affine-invariant-fourier-descriptors – Userhanu Nov 08 '14 at 06:45
  • @Ankit I will read it later today and try to respond before the weekend is over if no else responds. Sorry a little bit busy. – kolonel Nov 08 '14 at 17:30
  • No issues :), take your time – Userhanu Nov 08 '14 at 18:25