Ask Your Question

Revision history [back]

Shape Matching using Discrete Fourier Transform

This is the very first time messing around with DFTs so apologizes inadvance if the Math just flies over my head or my question sounds rather stupid.

Disclaimer: I have not used OpenCV API for any DFT related steps stated below

What I have done so far

Let T represent the template image and S be an image I get from the camera feed

  1. Grabbed the contours from T
  2. Applied DFT on them
  3. Made the attained DFTs scale invariant by dividing them with their magnitude i.e. F[i] = F[i]/|F[i]|
  4. Computed their magnitude spectrum
  5. Log-polar transformed the magnitudes and calculated the phases i.e. angles

My questions are:

  1. Just to confirm, after performing Step 2, my attained descriptors are translation invariant correct?
  2. How do I make them rotation invariant?
  3. Now this is where I get really confused. After reading a couple papers on image registration, Steps 4 and 5 are needed. This is in order to calculate the phase correlation then trying to maximize this value. For my application, is this really necessary? Or do I just have to make the descriptors rotation invariant then calculate the euclidean distance to the descriptors of S and trying to minimize this value my final step?

Any help/suggestions are sincerely appreciated!

Shape Matching using Discrete Fourier Transform

This is the very first time messing around with DFTs so apologizes inadvance if the Math just flies over my head or my question sounds rather stupid.

Disclaimer: I have not used OpenCV API API for any DFT related steps stated below


What I have done so far

Let T represent the template image and S be an image I get from the camera feed

  1. Grabbed the contours from T
  2. Applied DFT on them
  3. Made the attained DFTs scale invariant by dividing them with their magnitude i.e. F[i] = F[i]/|F[i]|
  4. Computed their magnitude spectrum
  5. Log-polar transformed the magnitudes and calculated the phases i.e. angles

My questions are:

  1. Just to confirm, after performing Step 2, my attained descriptors are translation invariant correct?
  2. How do I make them rotation invariant?
  3. Now this is where I get really confused. After reading a couple papers on image registration, Steps 4 and 5 are needed. This is in order to calculate the phase correlation then trying to maximize this value. For my application, is this really necessary? Or do I just have to make the descriptors rotation invariant then calculate the euclidean distance to the descriptors of S and trying to minimize this value my final step?

Any help/suggestions are sincerely appreciated!