# How do phase values are able to capture motion from video?

1. Jun 17, 2014

### ramdas

hi everyone,i know that the phase spectrum contains most of the structural information about the image.But i want to know more about importance of phase spectrum related to video signals.

I have read that temporal variations of phase values are able to capture most of the dynamical characteristics of the video sequence like global motion in the video.But i don't understand how it does?
so can anybody explain the relation between motion and phase? It will be very useful for my project.thank you..

Last edited: Jun 17, 2014
2. Jun 17, 2014

### UltrafastPED

I'm not familiar with this; do you have a reference to the technique? An article would be nice.

3. Jun 17, 2014

### ramdas

4. Jun 17, 2014

### cpscdave

5. Jun 17, 2014

### MrSparkle

global motion in images is a simple translation of all pixels.
ƒ(x-x0, y-y0)

when you apply the Fourier transform, the intensity spectrum F(u,v) stays exactly the same.
Only the phase spectrum changes, e-j2∏(ux0/m, vy0/N).
The only thing not completely described by the phase angle are the gained/lossed pixels along the edge.

Last edited: Jun 17, 2014
6. Jun 18, 2014

### ramdas

@MrSparkle thank u sir for your explanation .but will please explain it with any real time or simple example so that my concept will get cleared properly .thank you very much

7. Jun 18, 2014

### ramdas

let us consider an example .....

please consider any real time example say video of rotating wheel or wave (or video of traffic on road.) if i compute its phase spectrum using Fourier Transform,the phase values captures motion of rotating wheel (or complex motion of moving car on road). but i don't understand how it does?By which property of Fourier transform could u explain it to me?

8. Jun 18, 2014

### MrSparkle

I personally can't explain it any better than by saying it is simply a basic property of the Fourier Transform. This is what you get when you do the math.

ƒ(x-x0, y-y0) ⇔ F(u,v)e-j2∏(ux0/M, vy0/N)

Do you have access to MATLAB? It you want real world examples, I highly recommend it since you can pretty easily create your own. Here is a link for the basic commands. http://matlabgeeks.com/tips-tutorials/how-to-do-a-2-d-fourier-transform-in-matlab/ I'm sure you could do the same stuff in R or Octave, but I don't have much experience with those.

9. Jun 18, 2014

### ramdas

@MrSparkle ok i will look at what you are talking about.thank you for helping ;-)

10. Jun 20, 2014

### Baluncore

To understand the effect first consider the simple case of a one dimensional line of length TwoPi. Along that line we consider values of a simple cosine wave of unit amplitude and frequency. When we take the FT of the cosine signal that is spaced along the line, we get a value of 1 for the cosine coefficient of spatial frequency 1. The sine coefficient for spatial frequency 1, along with all other spatial frequency components, should remain zero. The phase vector for the fundamental frequency cosine wave will lie initially along the +x axis.

As the cosine wave is shifted sideways in space, the phase of the spatial frequency component will sweep in a circle from the +cosine through the +sine, then to -cosine, through -sine and back to +cosine. In effect the phasor rotates once each time the wave is moved sideways by one spatial period. The direction of spatial frequency vector rotation is decided by the direction of spatial movement. (This is the "fourier shift theorem" at work).

If the whole of a complex pattern moves sideways the phase of the fundamental will change at a rate proportional to the rate of image movement. Small movements may show up better in higher harmonics, but the highest harmonics will look like noise as the image content will change significantly with larger movements, (unless the panorama wraps around).

A small object that crosses a large fixed background will cause only a small difference in the real cos(1) and imaginary sin(1) coefficients. The point of the phase vectors will move in a small circle due to the small contribution of the part of the image that moves. If you plot all the phase vectors on an Argand diagram then as the image pans, you will see the entire constellation of phase vectors rotating about the centre. But if only a small object moves across the background you will see all the phase vectors rotate in small circles about the tips of their average background values. The rate of rotation will be proportional to the spatial frequency.

The principle of superposition does not usually apply to spatial images because an object that moves against the background does not sum to the background, it replaces background with an object. In effect the moving object removes other information temporarily while substituting it's own. Likewise, when a camera pans, information is lost on one side of the image as new information appears on the other.

So it is easy to detect a transverse movement through phase, but a rotating wheel is hard to detect using phase in a 2D spatial transform, unless it rolls across the image.

11. Jun 20, 2014

### ramdas

thanks sir for your feed but i have doubt.

thank you very much sir for your feedback.but i have one doubt.can i say here that due to motion , moving part pixel magnitude (intensity) values becomes dominant (means its intensity values are increased so much for waveform or moving wheel or cars) compared to stationary(background or stationary road) part magnitude (intensities) in frames ? ? ? please correct me if i am going wrong....Thank u again

12. Jun 20, 2014

### Baluncore

The Fourier Transform is orthogonal, it spreads all spatial pixel values into all spatial frequency vectors.
If the moving part is significantly brighter than the background, then the movement will be easier to detect.

You need to do numerical experiments with moving one dimensional patterns to see the phase rotation effect.
Alternatively, you can approach the effect from the mathematical side by investigating the Fourier Shift Theorem.