Coverage and passes script for processing of motion capture data for a vacuum ergonomic comparison study
Script takes 3D coordinates (in meters) of motion capture markers located on the ends of a vacuum wand,
| Frame Number | x1 | y1 | z1 | x2 | y2 | z2 |
|---|---|---|---|---|---|---|
| 1 | 0.0099998333 | 0.9999500021 | 0.0149995 | 0.5099498354 | 0.8727689958 | 0.0149995 |
| 2 | 0.0199986667 | 0.9998000333 | 0.0149980001 | 0.5197987 | 0.8679191841 | 0.0149980001 |
| 3 | 0.0299955002 | 0.9995501687 | 0.0149955003 | 0.5295456689 | 0.863036661 | 0.0149955003 |
| 4 | 0.0399893342 | 0.9992005331 | 0.0149920011 | 0.5391898673 | 0.8581249182 | 0.0149920011 |
| 5 | 0.0499791693 | 0.9987513013 | 0.0149875026 | 0.5487304706 | 0.8531874017 | 0.0149875026 |
| ... | ... | ... | ... | ... | ... | ... |
and calculates the estimated floor coverage at each frame.
The process requires:
- mapping the space to a discretized (gridded) representation,
- interpolation between the two points,
- and an aggregation across trial time.
Due to the scale of the grid and duration of the trial some matrix reshaping was used to speed up the process. Matlab's sub2ind and ind2sub functions allowed a conversion to and from a linear indexing and multi dimensional indexing. This was particularly helpful in clearing a buffer to separate a single pass from multiple counts for the same pass.
The final coverage and number of passes can be seen from the generated pngs.


