- #1

- 2,029

- 114

Thanks so much!

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- MATLAB
- Thread starter joshmccraney
- Start date

- #1

- 2,029

- 114

Thanks so much!

- #2

.Scott

Homework Helper

- 2,898

- 1,161

None of the examples deal with images - let alone video data.

It is certainly possible to do a 3-d FFT, but I doubt that is your intent.

Tell us more about this video and exactly what you want to extract from it. Is it a pendulum swinging back and forth and you want the frequency?

This sounds like a situation where an FFT could be used - but it probably isn't the best method.

If you do use an FFT, you would probably want to take a slice of the image across those frames so that you ware dealing with width and time. The slice would be selected as containing the periodic motion. Then an FFT would highlight periodic motion (with frequency spikes) along the frequency (time) axis.

- #3

- 2,029

- 114

I appreciate the response. The image only moves up and down, and I’m only tracking one pixel. Then I have the vertical position y as a function of time t, y(t). Each frame the pixel changes location, always up and down. I track the position. I extract the frequency using the MATLAB example shown above. I don’t think I need to use another technique, I’m just wanting to confirm L and Fs are as I describe. Would you input Fs as frame rate and L and total frame number?

None of the examples deal with images - let alone video data.

It is certainly possible to do a 3-d FFT, but I doubt that is your intent.

Tell us more about this video and exactly what you want to extract from it. Is it a pendulum swinging back and forth and you want the frequency?

This sounds like a situation where an FFT could be used - but it probably isn't the best method.

If you do use an FFT, you would probably want to take a slice of the image across those frames so that you ware dealing with width and time. The slice would be selected as containing the periodic motion. Then an FFT would highlight periodic motion (with frequency spikes) along the frequency (time) axis.

- #4

.Scott

Homework Helper

- 2,898

- 1,161

Yes.I appreciate the response. The image only moves up and down, and I’m only tracking one pixel. Then I have the vertical position y as a function of time t, y(t). Each frame the pixel changes location, always up and down. I track the position. I extract the frequency using the MATLAB example shown above. I don’t think I need to use another technique, I’m just wanting to confirm L and Fs are as I describe. Would you input Fs as frame rate and L and total frame number?

As I understand it, you are tracking the vertical position of a one-pixel-size feature.

For simplicity, I will assume you are not dealing with an interlaced image.

So your samples are vertical positions - likely image line numbers. And your sampling rate will be your video frame rate.

Let's assume that the frame rate is 30 frames per second and the length of the video is 1 minute.

From your link:

L would be better described as the "sample count".Fs = 1000; % Sampling frequency

T = 1/Fs; % Sampling period

L = 1500; % Length of signal

t = (0:L-1)*T; % Time vector

So for you, Fs=30 and L=1800.

Share: