Data Smoothing for Motion Capture

From Lofaro Lab Wiki
Revision as of 17:07, 10 May 2016 by Agoldsto (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Software: MATLAB

1. Download file dataStabilization.m here.[1]

2. Open the position data and time data files. Copy the body position data to sheet 1, face data to sheet 2, and time data to sheet 3 of an Excel file, and save it in the same folder of the file dataStabilization.m. Let’s say the Excel file’s name is Hello.xlsx.

3. Open the dataStabilization.m file, and replace the file name “Hello.xlsx” in lines 2 and 3 with the name of your file.

clear all;
[body,txt,raw] = xlsread('Hello.xlsx',1); % replace "Hello" with your file name 
[face,txtf,rawf] = xlsread('Hello.xlsx',2); % replace "Hello" with your file name

4. Replace “HelloB” and “HelloF” with your desired name at lines 396 and 397. These are MATLAB data file.

save('HelloB.mat','BODYA') % body data for "Hello"
save('HelloF.mat','FACE') % face data for "Hello"

5. Then “Run” the program and new MATLAB data files are created.