Problem
I am trying to get features out of a BVH file by parsing it. The BVH file is exported through NUICapture, a software that captures body movement through Kinect.
All BVH example files I know specify the Euler angles in ZXY
notation, not ZYX
, but NUICapture exports BVH files using the ZYX
notation, so I'm having trouble parsing it.
Background
In the BVH format, the sequence of the axes may be different due to Euler angles specified for each body part. The rotation of a body part is specified by matrix multiplication of the axes specified, and movement of the entire body is taken as the product of the rotations of all successive body parts in the hierarchy. Since matrix multiplication is not commutative, ZXY
is not the same as ZYX
.
Attempts at Solution
All the existing parsers I came across are denoting ZXY
as the de facto standard, and all papers too. None of the parsers I found is able to parse the BVH file produced by NUICapture, with the exception of BVHhacker. But BVHhacker does not have source code available, and so even though it seems to be able to replay the motion captured by NUICapture, there is no access to the internal representation created by BVHhacker's parser.
I tried taking an open-source Python BVH parser such as BVHPlay and try to import the NUICapture's BVH file, but there is a file input error, which does not occur with other sample BVH files with the "correct" ZXY
format. To solve this, I need to correct the axes sequence somehow but I am not sure how to do it without affecting the integrity of the original body motion. To me, it may be quite naïve just to switch the order manually to allow the BVH to be parsed.