Matching orientations of 2-d arrays of values - using fft?

  • Context: Undergrad 
  • Thread starter Thread starter n00bot
  • Start date Start date
  • Tags Tags
    Arrays Fft
Click For Summary
SUMMARY

This discussion focuses on the use of Fast Fourier Transforms (FFT) to match the orientations of two identical 2-D arrays of values. The user, an undergraduate student, seeks to avoid the time-consuming process of manually checking and rotating the arrays by leveraging FFT to transform the arrays into functions for easier comparison. The conversation highlights the importance of understanding how to manipulate the phase of the Fourier-transformed function to achieve the desired orientation. Additionally, the user inquires about handling 3-tuple color values in the context of 2-D arrays during the transformation process.

PREREQUISITES
  • Understanding of 2-D arrays and their representation
  • Basic knowledge of Fast Fourier Transforms (FFT)
  • Familiarity with Fourier transform equations for 2-D images
  • Introductory knowledge of differential equations
NEXT STEPS
  • Research the mathematical foundations of Fast Fourier Transforms (FFT)
  • Learn about 2-D Fourier transform applications in image processing
  • Explore techniques for manipulating phase in Fourier-transformed functions
  • Investigate methods for handling multi-channel data (3-tuple color values) in FFT
USEFUL FOR

This discussion is beneficial for undergraduate students in mathematics or computer science, image processing enthusiasts, and developers working on projects involving 2-D array manipulations and transformations.

n00bot
Messages
11
Reaction score
0
Matching orientations of 2-d arrays of values -- using fft?

I was discussing the following problem (a subproblem of a personal project I'm working on) with a professor:

we're given two 2-d arrays of values. We know them to be identical, but they might not be oriented corrected -- i.e.,

0 0 7 0
7 7 0 7
0 7 0 8
0 9 9 0

and

0 7 8 0
7 0 0 9
0 7 7 9
0 7 0 0

I'm working with much much bigger arrays, and was saying that checking to see if they line up, recalculating/turning and checking again was going to be a huge time sink. He suggested that I look into Fast Fourier Transforms.

I'm an undergrad, currently taking Diff Eq, and I've never dealt with Fourier transforms. So far, it seems to me that in order to use FFTs, I'll have to extrapolate (somehow? I think using diff eqs?) a function describing arrays, and then, using another function (the Fourier transform), transform one function into another function, so that I'm just comparing functions. (Does that make any sense?)
As is probably obvious, I'm having a hard time understanding Fourier transforms and how this relates. Can anyone help point me in the right direction? Thanks!
 
Last edited:
Physics news on Phys.org


Google "image rotation FFT" and you'll find tons on this.
 


pmsrw3 -- thanks, not sure why I was having so much trouble before. I did find some good explanations and I have a better, though still vague, idea of how this works now.

My understanding is that when you apply the Fourier transform equation (for a 2-D image) to your image, you come up with the new function you'll be manipulating. So, this new function is what you'd change the phase of to 'rotate' it. Am I understanding this right?

If so, then an implementation question:
The formula I've seen for 2d arrays uses x, y sums -- How do you take into account the 3-tuple color values in the 2-d array? Are we taking an average or maintaining a 3-tuple sum?

Thanks again.
 

Similar threads

Replies
235
Views
15K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
3K
  • · Replies 20 ·
Replies
20
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K