Manual Feature Engineering with 3D Motion Capture Data

calcStepLength

This script was created to compute side specific step lengths during walks recorded via the Xsens MVN system. The computed steps will be written to csv files and visualized as bar charts. Further the script creates some diagrams: one showing the 3D positions of the feet including step positions during the recording. The others visualise velocities of the feet, the foot distance, step phase time spans and Z coordinates. Some example outputs are shown below.

Usage and argument information for R/calcStepLength:

Usage: R/calcStepLength 
	[-[-help|h]] 
	[-[-verbose|v]] 
	[-[-inputfile|i] :character:] 
	[-[-outputdir|o] :character:] 
	[-[-distepsilon|l] [:double:]] 
	[-[-velepsilon|k] [:double:]] 
	[-[-delta|d] [:integer:]] 
	[-[-min|a] [:integer:]] 
	[-[-max|b] [:integer:]] 
	[-[-colors|c] [:character:]] 
	[-[-format|f] [:character:]] 
	[-[-title|t] [:character:]]

Arguments without parameters:
  --help: show this information
  --verbose: activating informational output while parsing

Required arguments:
  --inputfile: mvnx file with 3D motion data
  --outputdir: directory to save images

Optional arguments:
  --colors: comma separated list of colors for each segment
  --delta: minimum length of a timespan [in ms]
  --distepsilon: treshold to separate distance values [in m]
  --velepsilon: treshold to separate velocity values [in m per s]
  --format: format for output, one of bmp, jpg, pdf [default], png, ps, wmf
  --min: calculate beginning at that time [in ms]
  --max: calculate ending at that time [in ms]
  --title: one title for all the diagrams
  --verbose: activating informational output while parsing
A comment on the
delta argument:
This parameter is used to remove small false positive time spans. Only time spans longer than the given delta parameter will be considered in the step length calculation. The default value is 20 milliseconds.
velepsilon argument:
This parameter is used to separate the standing foot from the moving foot. Therefore the mean values of the top 20 and low 20 percent is calculated and the middle between the two mean values is used as epsilon. You may use a personal epsilon value instead by using this optional argument.
distepsilon argument:
This parameter is used together with velepsilon to determine the standing position of a foot. The calculation is the same and you may also use a personal value with this optional argument.

Computed step lengths and diagrams for Walk05

Original call: ./calcStepLength --inputfile="../experiments/experiment1/walk05.mvnx" --outputdir="online/images/diagrams/walk05/" --format="png" --title="walk05" --colors="blue, red, green, cyan, orange, darkblue, darkred" --min="0" --max="15500"

Step Number Segment Begin[ms] End[ms] Step Length (side)
0 RightFoot 390 605 0
1 LeftFoot 1854 2300 0
2 RightFoot 3225 3531 48.7
3 LeftFoot 4507 4846 54.12
4 RightFoot 5740 6038 60.98
5 LeftFoot 6905 7292 60.99
6 RightFoot 8358 8663 60.49
7 LeftFoot 9646 10165 60.09
8 RightFoot 10941 11313 57.8
9 LeftFoot 12395 12733 55.38
10 RightFoot 13673 14003 59.97
11 LeftFoot 15001 15348 63.4
Computed steplengths from Walk05.

Computed step lengths and diagrams for Walk06

Original call: ./calcStepLength --inputfile="../experiments/experiment1/walk06.mvnx" --outputdir="online/images/diagrams/walk06/" --format="png" --title="walk06" --colors="blue, red, green, cyan, orange, darkblue, darkred" --min="1500" --max="15500"

Step Number Segment Begin[ms] End[ms] Step Length (side)
0 RightFoot 2135 2325 0
1 LeftFoot 3631 4061 0
2 RightFoot 4971 5310 59.35
3 LeftFoot 6078 6434 61.28
4 RightFoot 7318 7665 67.73
5 LeftFoot 8581 8969 72.24
6 RightFoot 9894 10233 71.75
7 LeftFoot 11145 11451 71.07
8 RightFoot 12370 12651 71.83
9 LeftFoot 13620 14000 71.22
10 RightFoot 15235 15458 56.23
Computed steplengths from Walk07.

Computed step lengths and diagrams for Walk07

Original call: ./calcStepLength --inputfile="../experiments/experiment1/walk07.mvnx" --outputdir="online/images/diagrams/walk07/" --format="png" --title="walk07" --colors="blue, red, green, cyan, orange, darkblue, darkred" --min="8000" --max="72000"

Step Number Segment Begin[ms] End[ms] Step Length (side)
0 RightFoot 9559 9833 0
1 LeftFoot 15173 15626 0
2 RightFoot 22926 23405 60.8
3 LeftFoot 28818 29165 61.63
4 RightFoot 35223 35794 64.99
5 LeftFoot 40531 41094 64.06
6 RightFoot 46523 47053 60.91
7 LeftFoot 51660 52362 63.76
8 RightFoot 55933 56421 62.66
9 LeftFoot 61570 62092 57
10 RightFoot 66827 67406 58.34
11 LeftFoot 71359 71855 57.57
Computed steplengths from Walk07.

Computed step lengths and diagrams for Walk10

Original call: ./calcStepLength --inputfile="../experiments/experiment1/walk07.mvnx" --outputdir="online/images/diagrams/walk07/" --format="png" --title="walk07" --colors="blue, red, green, cyan, orange, darkblue, darkred" --min="8000" --max="72000"

Step Number Segment Begin[ms] End[ms] Step Length (side)
0 RightFoot 2318 2517 0
1 LeftFoot 2972 3211 0
2 RightFoot 3699 3914 83.72
3 LeftFoot 4328 4559 92.7
4 RightFoot 5064 5238 98
5 LeftFoot 5635 5842 102.71
6 RightFoot 6306 6496 102.23
7 LeftFoot 6993 7200 107.78
8 RightFoot 7787 8126 105.48
Computed steplengths from Walk10.