## 2 Materials and Methods  
### The proposed Motion Analysis System  
The motion analysis system based on RGB cameras (RGB-motion analysis system, RGB-MAS), here proposed, is conceptually based on that described in [18] and improves its features and functionalities as follows:  
* New system based on the CMU model from the tf-pose-estimation project, computationally lighter than those provided by Openpose and therefore able to provide real-time processing requiring lower CPU and GPU performances.
* Addition of estimation of torso rotation relative to the pelvis and of head rotation relative to shoulders.
* Distinction between abduction, adduction, extension, and flexion categories in the calculation of the angles between body segments
* Person tracking is no longer based on K-Means clustering, as it was computationally heavy and not very accurate.
* Modification of the system architecture to ensure greater modularity and ability to work even with a single camera shot.  
The main objective, using these tools, is to measure the angles between the main body segments that characterize the postures of one or more people framed by the cameras. The measurement is carried out starting from the recognition of the skeletal joints and following with the estimation of their position in a digital space. It is based on a modular software architecture (Figure 1), using algorithms and models of deep learning and computer vision, to analyze human subjects by processing videos acquired through RGB cameras.  
The proposed system needs one or more video recordings, retrieved by pointing a camera parallel to the three anatomical planes (i.e., Sagittal Plane, Frontal Plane, and Transverse Plane) to track subjects during everyday work activities. In most cases, it is necessary to use at least two points of view, taken from the pelvis height, to achieve good accuracy: this trade-off guarantees a good compromise between the prediction accuracy and the system portability. For the calculation of the angles, the optimal prediction has been  
Figure 1: High-level software architecture and an example of possible hardware configuration.  
evaluated when the camera directions are perpendicular to the person's sagittal and coronal planes. However, the system tolerates a deviation in the camera direction perpendicular to these planes in the range between \(-45^{\circ}\) and \(+45^{\circ}\). In this case, empirical tests evidenced that the system performs angle estimation with a maximum error equal to \(\pm 10\%\). The accuracy of the skeletal landmark recognition tends to worsen the closer the orientation angle of the subject is to \(\pm 90^{\circ}\) to the reference camera, due to obvious perspective issues in a two-dimensional reference plane.  
The system does not necessarily require that video recordings taken from different angles be simultaneously collected. The necessary frames can be recorded in succession, using only one camera. An important requirement is that each video must capture the subject during the entire working cycle.  
Any camera with at least the following minimum requirements can be used:  
* Resolution: 720 p.
* Distortion-free lenses: wide angle lenses should be avoided.  
The PC(s) collects the images from the camera(s) and processes them through the Motion analysis software, which is characterized by two main modules (i.e., \"Data Collection\" and \"Parameters Calculation\" modules), which are described in detail below.