How it works

The purpose of the BVH Retargeter is to transfer an animation from a BVH file to an existing armature.
Left: A BVH animation from CMU. Right: The target character.
The first idea may be to import the BVH file using Blender's built-in BVH importer, and then assign the action to the target character. However, this usually does not work at all, because the bone names of the source and target characters may differ. But even if the armatures follow the same naming conventions, the animation will be corrupt due to differences in rest poses.
Left: The target armature, DAZ Studio Genesis 8. Right: Three source armatures, found in BVH files from CMU, ACCAD, and Eyes Japan, respectively.
Here are four different armatures in rest pose. Although all four are clearly recognizable as humans, the bone hierarchies and rest poses differ.
All four armatures have the action from the yellow armature.
Here we have copied the action from the yellow armature to the others, after first having renamed bones so the armatures follow the same naming convention. The result is clearly unsatisfactory.

Part of the solution is to copy the rotation in world space rather than in the local space of each bone, which is what happens if we just the action from a different armature. In earlier versions of Blender, there was a bundled add-on which did exactly that. The result looks reasonable if we just look at the armatures, but there are some issues.
Left: Eyes Japan, rest pose and T-pose. RIght: CMU, rest pose and T-pose.
Here are the legs of two armatures, in rest pose and in T-pose. In the green armature, the legs are correctly positioned already in the rest pose (the arms are not), but in the blue armature we must bend the thighs to reach T-pose. Bend but not twist! As a result, the blue legs are positioned differently in T-pose. The Y axis points in the same direction as in the green armature, but the local X and Z axes are different.
The spines in rest pose, viewed from the side.
 Another issue is the spine. The spine can be very different in different armatures, but the spine in rest pose always corresponds to an undeformed mesh. Therefore, retargeting must map a spine in rest pose to the spine in rest pose, even if these rest poses are different in the source and target armatures.
To address these issues, the BVH Retargeter adds an extra pose at frame zero, where the armatures are put in a reference T-pose, obtained by bending but not twisting the limbs. The difference between the bone rotations in world space is recorded, and then used to correct the poses at the other frames.
And here is the result of retargeting the pose of the yellow armature to the other armatures.