How Can You Extract Specific Signals from a 2D Image Using Fourier Transform?

AI Thread Summary
The discussion centers on extracting specific signals from a 2D image using Fourier Transform techniques. It highlights the challenge of decomposing a 2D image into its constituent signals, similar to how 1D signals can be represented as sums of other signals. The Fourier Transform can isolate certain frequencies by applying a process where unwanted frequencies are multiplied by zero before performing an inverse transform. This method allows for the visualization of specific components of the image, focusing on low frequencies at the center of the frequency spectrum. The conversation emphasizes the need for clarity in questions regarding Fourier analysis to facilitate effective communication and understanding.
ramdas
Messages
78
Reaction score
0
Suppose 3 1D Signals x(t), y1(t) and y2(t) are given as

x(t)=sin(40*pi*t);

y1(t)=.5*sin(40*pi*t) and

y2(t)=x(t)+y1(t).

Left side =Right side

Here,values of x(t)and y1(t)i.e.(Right side) are given and we get y2(t)(Left side).The plots of x(t),y1(t) and y2(t)
are plotted below
w8gSV.jpg

Now,in the next case,suppose left side is given and we are to asked to find right side.But the twist is that here signal not 1D .It is 2D i.e an image! shown below

ML0xQ.jpg


I know that image consists ofsummation of thousand of signals but here I want to see plots of only 4 to 5 signals from the image (like of x(t) and y1(t) shown above) but not the whole spectrum. How it can be done?
 
Technology news on Phys.org
Please avoid the data after "ronaldo" image from the questionSo now if left side is an image then
how 'ronaldo' image could be
represented (as we represented
y2(t) using x(t) and y1(t)) using
summation of signals using
Fourier transform/series(or any
other signal processing tool)?
 
Last edited:
I don't understand the question. You want to add two different things, and in the 2D case you know the sum but not the summands? That is impossible, independent of dimensions.

The sum of two integers I thought of is 12, what are the integers? -> no way.
You can find specific ways to split the function into components, but then you need additional constraints on those components.
 
mfb said:
I don't understand the question. You want to add two different things, and in the 2D case you know the sum but not the summands? That is impossible, independent of dimensions.

The sum of two integers I thought of is 12, what are the integers? -> no way.
You can find specific ways to split the function into components, but then you need additional constraints on those components.
sorry but i have edited my previous post.Please go through it
 
ramdas said:
Suppose 3 1D Signals x(t), y1(t) and y2(t) are given as

I know that image consists ofsummation of thousand of signals but here I want to see plots of only 4 to 5 signals from the image (like of x(t) and y1(t) shown above) but not the whole spectrum. How it can be done

?

This is the second post of yours I've seen, and I think you're not understanding something about Fourier transforms. A Fourier transform takes a function like f(t), and a set of orthogonal basis functions or vectors that have f(t) as a linear combination thereof, and finds what scalars need to multiply each of these to make that work and returns those.

So suppose you want a computer program that takes a Fourier transform of some vector (1D) and only looks at certain frequencies in it, but discards the rest. What you do is take the full DFT (or FFT) of the vector, then you multiply all the frequencies you don't want by zero, and then take the inverse transform, usually called ifft or something like that. What you will see in the plot you get back is the sum of a couple sinosoids, whatever frequencies you didn't multiply by 0. Its that easy.

To know what frequencies you are dealing with based on their position of the output array of the FFT, look at the definition of the DFT matrix:
http://en.wikipedia.org/wiki/DFT_matrix

Now with a 2D image, you have to be clear about what you want. Its 1D FTs in each direction, but it all adds up nicely so the gist of it, as I recall, is that the lower frequencies are in the center of the image. For a square image 1000 by 1000, you could multiply all but a 10*10 square in the middle by zero, and you would see only the low frequencies that make up the image when you inverse transform it for instance. You could also then remove a 4*4 ring in the middle of that center square to rid yourself of the two lowest frequencies (I believe), and isolate whatever frequencies you want using that general idea.
 
  • Like
Likes ramdas
Fooality said:
This is the second post of yours I've seen, and I think you're not understanding something about Fourier transforms. A Fourier transform takes a function like f(t), and a set of orthogonal basis functions or vectors that have f(t) as a linear combination thereof, and finds what scalars need to multiply each of these to make that work and returns those.

So suppose you want a computer program that takes a Fourier transform of some vector (1D) and only looks at certain frequencies in it, but discards the rest. What you do is take the full DFT (or FFT) of the vector, then you multiply all the frequencies you don't want by zero, and then take the inverse transform, usually called ifft or something like that. What you will see in the plot you get back is the sum of a couple sinosoids, whatever frequencies you didn't multiply by 0. Its that easy.

To know what frequencies you are dealing with based on their position of the output array of the FFT, look at the definition of the DFT matrix:
http://en.wikipedia.org/wiki/DFT_matrix

Now with a 2D image, you have to be clear about what you want. Its 1D FTs in each direction, but it all adds up nicely so the gist of it, as I recall, is that the lower frequencies are in the center of the image. For a square image 1000 by 1000, you could multiply all but a 10*10 square in the middle by zero, and you would see only the low frequencies that make up the image when you inverse transform it for instance. You could also then remove a 4*4 ring in the middle of that center square to rid yourself of the two lowest frequencies (I believe), and isolate whatever frequencies you want using that general idea.
sorry sir but Please avoid the data after "ronaldo" image from the question .So now if left side is an image then how 'ronaldo' image could be represented (as we represented y2(t) using x(t) and y1(t)) using summation of signals using Fourier transform/series(or any other signal processing tool)?
 
ramdas said:
sorry sir but Please avoid the data after "ronaldo" image from the question .So now if left side is an image then how 'ronaldo' image could be represented (as we represented y2(t) using x(t) and y1(t)) using summation of signals using Fourier transform/series(or any other signal processing tool)?

I think you may be asking a legitimate question, but there is a problem with English. There are a million ways for me to interpret what you might be asking, but as it stands it doesn't make sense.
 
Fooality said:
I think you may be asking a legitimate question, but there is a problem with English. There are a million ways for me to interpret what you might be asking, but as it stands it doesn't make sense.
Sir in the equation y2(t) is summation of x(t) and y1(t) .so whether x(t) and y1(t) are called as bases functions here? I am confused by the term "bases function"
 
ramdas said:
Sir in the equation y2(t) is summation of x(t) and y1(t) .so whether x(t) and y1(t) are called as bases functions here? I am confused by the term "bases function"
No. You said:
x(t)=sin(40*pi*t);

y1(t)=.5*sin(40*pi*t) and

y2(t)=x(t)+y1(t).


So I know y2(t) = 1.5 sin(40*pi*t)

Basis functions/vectors would have a different frequencies, like if y1(t)=sin(20*pi*t). I can explain more if you have taken Matrix math, but really until you can clearly state what you are asking, there is no question for me to answer.
 
  • Like
Likes ramdas
  • #10
Fooality said:
No. You said:
x(t)=sin(40*pi*t);

y1(t)=.5*sin(40*pi*t) and

y2(t)=x(t)+y1(t).


So I know y2(t) = 1.5 sin(40*pi*t)

Basis functions/vectors would have a different frequencies, like if y1(t)=sin(20*pi*t). I can explain more if you have taken Matrix math, but really until you can clearly state what you are asking, there is no question for me to answer.
ok.fine.lets concentrate on 1D and keep aside 2D for some time.

Suppose there are 3 1D signals x(t),y(t) and z(t) such that equation x(t)=4*sin(10*pi*t) and y(t)=8*cos(20*pi*t).
Also, z(t)=x(t)+y(t) .

here,will you tell about concept of "bases function" in 1D signals . Also,for z(t) what are bases function.?

Further ,I know matrix operations .so you can extend the above concept of bases functions from 1D to 2D by taking any simple example( of 2D signal) of your choice for understanding.Thank you :-)
 
Last edited:
  • #11
Sure, by taking the Fourier tranform of z(t), we can detect the fact that it is the sum of x(t) or y(t), and deduce x(t) and y(t) from z(t).

The calculus way is here:
http://en.wikipedia.org/wiki/Fourier_transform#Definition
What that equation is doing is measuring how much the function f(x) matches the sinosoid function given by the frequency ε

I'm a computer guy, I think in terms of basis vectors, but the idea I believe is the same: Each basis function/vector represents a frequency, like cos(4*pi*t), cos(8*pi*t) , sin(8*pi*t) and so on. You test for each frequency how much of that frequency your function has in it. In the case of your function z(t), testing it for cos(20*pi*t) would return a value that encodes the number 8, because that's how "loud" that frequency is in the function. With a complete set of frequencies, and how loud they are, you can recreate the original function by adding them all up. For basis vectors, if you had 1000 samples of a wave, the Fourier transform would have 1000 entries, each recording how much it matches one of 1000 different basis vectors, representing or the sin/cos part of a different frequency.
 
  • Like
Likes ramdas
  • #12
Fooality said:
Sure, by taking the Fourier tranform of z(t), we can detect the fact that it is the sum of x(t) or y(t), and deduce x(t) and y(t) from z(t).

The calculus way is here:
http://en.wikipedia.org/wiki/Fourier_transform#Definition
What that equation is doing is measuring how much the function f(x) matches the sinosoid function given by the frequency ε

I'm a computer guy, I think in terms of basis vectors, but the idea I believe is the same: Each basis function/vector represents a frequency, like cos(4*pi*t), cos(8*pi*t) , sin(8*pi*t) and so on. You test for each frequency how much of that frequency your function has in it. In the case of your function z(t), testing it for cos(20*pi*t) would return a value that encodes the number 8, because that's how "loud" that frequency is in the function. With a complete set of frequencies, and how loud they are, you can recreate the original function by adding them all up. For basis vectors, if you had 1000 samples of a wave, the Fourier transform would have 1000 entries, each recording how much it matches one of 1000 different basis vectors, representing or the sin/cos part of a different frequency.
Thanks a lot for your feedback.I know matrix operations .so you can extend the above concept of bases functions from 1D to 2D by taking any simple example( of 2D signal) of your choice for understanding.Thank you :-)
 
  • #13
Fooality said:
Sure, by taking the Fourier tranform of z(t), we can detect the fact that it is the sum of x(t) or y(t), and deduce x(t) and y(t) from z(t).

The calculus way is here:
http://en.wikipedia.org/wiki/Fourier_transform#Definition
What that equation is doing is measuring how much the function f(x) matches the sinosoid function given by the frequency ε

I'm a computer guy, I think in terms of basis vectors, but the idea I believe is the same: Each basis function/vector represents a frequency, like cos(4*pi*t), cos(8*pi*t) , sin(8*pi*t) and so on. You test for each frequency how much of that frequency your function has in it. In the case of your function z(t), testing it for cos(20*pi*t) would return a value that encodes the number 8, because that's how "loud" that frequency is in the function. With a complete set of frequencies, and how loud they are, you can recreate the original function by adding them all up. For basis vectors, if you had 1000 samples of a wave, the Fourier transform would have 1000 entries, each recording how much it matches one of 1000 different basis vectors, representing or the sin/cos part of a different frequency.
Thanks a lot for your feedback.I know matrix operations .so you can extend the above concept of bases functions from 1D to 2D by taking any simple example( of 2D signal) of your choice for understanding.Thank you :-)
ramdas said:
Thanks a lot for your feedback.I know matrix operations .so you can extend the above concept of bases functions from 1D to 2D by taking any simple example( of 2D signal) of your choice for understanding.Thank you :-)
sir do you have any MATLAB code for bases functions or any already taken results with you?
 
  • #14
No, for discrete Fourier transform, the basis functions would define like the rows of the DFT matrix. What you'll find in Matlab are functions fft(v) and ifft(v), which essentially multiply the input vector v with the DFT matrix, or its inverse (for ifft). To learn the functions/basis vectors behind the DFT matrix you need to look at its definition:
http://en.wikipedia.org/wiki/DFT_matrix#Definition
 
  • Like
Likes ramdas
Back
Top