FFT interpretation of time vector (simple)

Click For Summary

Discussion Overview

The discussion revolves around the interpretation of the Fast Fourier Transform (FFT) in the context of analyzing video data that captures the vertical motion of an object. Participants explore how to extract frequency information from the video, specifically focusing on the definitions of sampling frequency (Fs) and signal length (L) in relation to the data being analyzed.

Discussion Character

  • Technical explanation
  • Exploratory
  • Conceptual clarification

Main Points Raised

  • One participant suggests that the sampling frequency (Fs) should correspond to the camera frame rate and the length (L) should represent the total number of frames in the video.
  • Another participant notes that video data is three-dimensional and questions whether a three-dimensional FFT is the intended approach, suggesting that a slice of the image across frames may be more appropriate for analyzing periodic motion.
  • A participant clarifies that they are tracking the vertical position of a single pixel over time and confirms their intention to use the MATLAB example for frequency extraction, seeking confirmation on the definitions of Fs and L.
  • There is a suggestion that L could be better described as the "sample count" rather than just the length of the signal.
  • One participant provides an example calculation for Fs and L, assuming a frame rate of 30 frames per second and a video length of 1 minute, leading to specific values for these parameters.

Areas of Agreement / Disagreement

Participants express some agreement on the definitions of Fs and L, but there is also uncertainty regarding the best method to analyze the video data, with differing views on the appropriateness of using FFT in this context.

Contextual Notes

There are assumptions about the nature of the video data, such as the absence of interlacing, and the discussion does not resolve whether FFT is the optimal technique for this analysis.

member 428835
I have video data that shows an object moving up and down. I'd like to extract the frequency the object moves. Following the given example here (scroll down to "Examples"), am I correct in assuming Fs would be camera frame rate and L would be the total number of frames?

Thanks so much!
 
Physics news on Phys.org
Video data is three-dimensional: horizontal, vertical, and time.
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.
 
.Scott said:
Video data is three-dimensional: horizontal, vertical, and time.
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.
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?
 
joshmccraney said:
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?
Yes.

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:
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 1500; % Length of signal
t = (0:L-1)*T; % Time vector
L would be better described as the "sample count".

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

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
19K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 1 ·
Replies
1
Views
10K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K