# Puzzle to puzzle you:image

Tags:
1. Apr 26, 2015

### ramdas

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

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

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?

2. Apr 26, 2015

### ramdas

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: Apr 26, 2015
3. Apr 26, 2015

### Staff: Mentor

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.

4. Apr 26, 2015

### ramdas

sorry but i have edited my previous post.Please go through it

5. Apr 26, 2015

### Fooality

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.

6. Apr 26, 2015

### ramdas

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)?

7. Apr 26, 2015

### Fooality

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.

8. Apr 26, 2015

### ramdas

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"

9. Apr 26, 2015

### Fooality

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.

10. Apr 27, 2015

### ramdas

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: Apr 27, 2015
11. Apr 27, 2015

### Fooality

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.

12. Apr 27, 2015

### ramdas

Thanks alot 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. Apr 27, 2015

### ramdas

Thanks alot 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. Apr 27, 2015

### Fooality

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