# Gesture Recognition of Sign Language Alphabet Using a Magnetic Positioning System
## 2 Materials and Methods
### Reconstruction of the Hand Gesture  
In this section, we provide details on the reconstruction method that allows obtaining complete gesture information from raw data provided by the magnetic positioning system. The method is based on a kinematic model of the hand. In order to capture the gesture of the hand, all the magnetic nodes have been mounted on a glove for easy and rapid wearing. The gesture is reconstructed by means of the technique illustrated in [38], which we called MagIK (magnetic and inverse kinematics). The method allows to reconstruct the movement of the hand with 24 degrees-of-freedom (DOF). Positions and orientations of all the magnetic nodes, measured by means of the MPS, are fed to a kinematic model of the hand, allowing to obtain the position and flexion of each joint and the position and orientation of the whole hand with respect to the MPS reference frame shown in Figure 3. Here we review the principal features of MagIK and illustrate some empirical modifications that we introduced in the model in order to optimize the reconstruction of the gesture among different test subjects. Transmitting nodes are mounted on the hand, as shown in Figure 8. Nodes 1 and 2 are used to determine a Cartesian reference frame rigidly attached to the palm. Nodes 3-7 are used to measure the position and orientation of each finger tip with respect to the MPS frame, then, by a coordinate transformation, position \(\textbf{r}_{0}^{i}\) and orientation \(\textbf{h}_{0}^{i}\) with respect to the hand reference frame are obtained (we use the same notation as in [38];identifies the fingers, numbering them from I to V starting from the thumb; for position vectors, homogeneous coordinates are used, i.e., in general \(\mathbf{r}=[x,y,z,1]^{T}\)). We also define positions \(\mathbf{R}^{i}\) and orientations \(\hat{\mathbf{N}}^{i}\) of the finger tips, with respect to a reference frame attached to each IP/DIP joint, as \(\mathbf{R}^{i}=\left[L_{4}^{i},0,0,1\right]^{T}\) and \(\hat{\mathbf{N}}^{i}=[0,1,0]^{T}\), where \(L_{4}^{i}\) is the length of the terminal phalanx of each finger (\(L_{3}^{I}\) for the thumb). The following relations hold:  
\[\mathbf{r}_{0}^{i} =T^{i}\left(\mathbf{d}^{i},\mathbf{\theta}^{i},\mathbf{a}^{i},\mathbf{\alpha}^{i} \right)\mathbf{R}^{i}, \tag{1}\] \[\mathbf{\hat{n}}_{0}^{i} =T_{\text{rot}}^{i}\left(\mathbf{\theta}^{i},\mathbf{\alpha}^{i}\right) \hat{\mathbf{N}}^{i}, \tag{2}\]  
where \(T^{i}\) is a \(4\times 4\) roto-translation matrix defined according to the widely used modified Denavit-Hartenberg (MDH) formalism introduced by [PERSON] (2007) to describe mechanical links. In this formalism, a reference frame is attached to each link (all the details can be found in ([PERSON], 2018)); \(x\)-axes are oriented along link directions; \(z\)-axes are attached to the rotation axis of each link; \(y\)-axes are thus determined by the right-hand rule. The MDH parameters are defined as follows: angle \(\theta\) measure rotations around \(z\)-axes; angle \(\alpha\) measure link twists around \(x\)-axes; length \(a\) measure translations along \(x\)-axes; length \(d\) measure link shifts along \(z\)-axes. \(T_{\text{rot}}^{i}\) is the \(3\times 3\) rotation submatrix of \(T^{i}\), obtained from the latter by removing the fourth row and the fourth column. For the kinematic model of the hand, only angles \(\theta\) and \(a_{\text{MCP}}^{\text{I}}\) are mobile, while all the other MDH parameters are fixed. MDH parameters for the hand are given in Tables 1 and 2, where \(L_{j}^{i}\) are the lengths of the phalanges, determined through the calibration procedure described in ([PERSON] and [PERSON], 2018). Tabulated parameters are the same as in ([PERSON] and [PERSON], 2018), except for some empirical modifications for the thumb that have been introduced for a more realistic gesture reconstruction. Angle \(a_{\text{CMC},a}^{\text{I}}\) is \(\frac{11}{18}\pi\) (\(110^{\circ}\)), while in ([PERSON] and [PERSON], 2018), the value was \(\frac{\pi}{2}\).