GapFill: A Python module of gap filling functions for motion capture marker data
Project description
GapFill
GapFill: A Python module of gap filling functions for motion capture marker data
Description
Collection of several functions for gap filling and recovering of motion capture marker data
Installation
GapFill can be installed from PyPI using pip
on Python>=3.7.
pip install gapfill
Usage
Rows of ndarray values for marker coordinates should be filled with numpy.nan for occluded (blocked) frames.
import gapfill as gf
# numpy is required in order to provide necessary markers' coordinate values
import numpy as np
# 'fill_marker_gap_interp()' function will update the given ndarray by filling its gaps using bspline interpolation
# 'tgt_mkr_pos0': a 2D (n, 3) ndarray of a target marker position to fill the gaps
# 'n' is the total number of frames
tgt_mkr_pos0 = np.array((n, 3), dtype=np.float32)
# 'ret0': either True or False, True if there is any frame updated, False if there is no frame updated
# 'updated_frs_mask0': a boolean ndarray to indicate which frames are updated
ret0, updated_frs_mask0 = gf.fill_marker_gap_interp(tgt_mkr_pos0)
# 'fill_marker_gap_pattern()' function will update the given ndarray by filling its gaps using a donor marker
# 'tgt_mkr_pos1': a 2D (n, 3) ndarray of a target marker position to fill the gaps
# 'n' is the total number of frames
tgt_mkr_pos1 = np.array((n, 3), dtype=np.float32)
# 'dnr_mkr_pos': a 2D (n, 3) ndarray of a donor marker position
# 'n' is the total number of frames
dnr_mkr_pos = np.array((n, 3), dtype=np.float32)
# 'ret1': either True or False, True if there is any frame updated, False if there is no frame updated
# 'updated_frs_mask1': a boolean ndarray to indicate which frames are updated
ret1, updated_frs_mask1 = gf.fill_marker_gap_pattern(tgt_mkr_pos1, dnr_mkr_pos)
# 'fill_marker_gap_rbt()' function will update the given ndarray by filling its gaps using a cluster of 3 markers
# 'tgt_mkr_pos2': a 2D (n, 3) ndarray of a target marker position to fill the gaps
# 'n' is the total number of frames
tgt_mkr_pos2 = np.array((n, 3), dtype=np.float32)
# 'cl_mkr_pos': a 3D (m, n, 3) ndarray of the cluster markers
# 'm' (at least 3) is the number of markers, and 'n' is the total number of frames
cl_mkr_pos = np.array((m, n, 3), dtype=np.float32)
# 'ret2': either True or False, True if there is any frame updated, False if there is no frame updated
# 'updated_frs_mask2': a boolean ndarray to indicate which frames are updated
ret2, updated_frs_mask2 = gf.fill_marker_gap_rbt(tgt_mkr_pos2, cl_mkr_pos)
Dependencies
References
- Smolka, J. and Lukasik, E., 2016, July. The rigid body gap filling algorithm. In 2016 9th International Conference on Human System Interactions (HSI) (pp. 337-343). IEEE.
- Arun, K.S., Huang, T.S. and Blostein, S.D., 1987. Least-squares fitting of two 3-D point sets. IEEE Transactions on pattern analysis and machine intelligence, (5), pp.698-700.
- Wikipedia: Kabsch algorithm
- Kwon3D: Computation of the Rotation Matrix
- Vicon: What Gap Filling Algorithms are used Nexus 2?
- Qualisys: Featuring the Trajectory Editor in QTM
How to cite this work
Here is a suggestion to cite this GitHub repository:
Jung, M. K. (2020) GapFill: A Python module of gap filling functions for motion capture marker data. GitHub repository, https://github.com/mkjung99/gapfill.
And a possible BibTeX entry:
@misc{Jung2020,
author = {Jung, M. K.},
title = {GapFill: A Python module of gap filling functions for motion capture marker data},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/mkjung99/gapfill}}
}
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gapfill-0.0.7.tar.gz
.
File metadata
- Download URL: gapfill-0.0.7.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7213ede542453cb6fc40337cb7573f739164a187b7c0f80202ab3ddd801b7f12 |
|
MD5 | 42ac892703b5d9092c5bc1e1d407fb11 |
|
BLAKE2b-256 | e23c45d1acb41176eec1ceaf088bbb54dc87f3fb288c7f4353471ad9ba988873 |
File details
Details for the file gapfill-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: gapfill-0.0.7-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efc0a50a500d3fa60055c37fdbd30923d7a8ef2e79253a9078ac642ef1114f65 |
|
MD5 | 3ec6ad9d99c4048ac37b7f75881f2900 |
|
BLAKE2b-256 | 03c2559282f1d354927afcd38c3df9e61e858704dcf8af8e47abad36e3c16e94 |