Updated: DSP to Fit Functions to Joint Movements

In order to get the dominant frequencies for the sampled signal (elbow rotational values) I need to interpolate the data so that there are enough sampled values to satisfy the Nyquist sampling theory.

At first, I was trying to go down the Matlab route for getting the fft, but I want to learn more about Python and the available packages. That’s why I spent about 7 hours setting up a “Matlab alternative” environment. The previous post somewhat describes my process.

Bottom Line: I have virtual environments for python with numpy, scipy, matplotlib, and ipython.

NOW: Get the fft of the sampled data from the rotoscoped animation.

Initial data: angle values for the elbow of the horse. These angles were obtained by looking at the angle between the shoulder and the ankle and running a python script to determine the value. The sampling rate was every frame at 24 frames per second.

Talking with my friend Takis, the steps are:

  1. Condition the data: interpolate to obtain more sampled values. Also make sure that the sampled region is set so that there’s not a jump between the N-1 point and the N point. The region is from 0 to N-1.
    1. Sampled values, N, must equal 2^k which is the length of the sampled function f(n)
  2. Assume that python doesn’t need a periodic extension to evaluate the data.
  3. Filter the data before or after the fft(f)…? Bandlimit the signal with a Butterworth filter.
  4. Take the fft(f)
    1. I think that I will end up with the complex fourier series. LOOK INTO THIS…
  5. Playback will be through the summation of the sinusoids and cosines using the values from the Fourier Series as the coefficients and frequencies. I really need to look over this stuff more!

 

 

Advertisements
Tagged , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Advertisements
%d bloggers like this: