'Quaternion rotation

I am trying to solve the problem of sign language. To do this I am using a glove with an IMU sensor of 9 axes. The orientation of the hand and fingers should give a gesture value. I am trying to train a model using the orientation of the glove for sign language interpretation. The sensor has an inbuilt function that gives Quaternion orientation. With this quaternion, I get the orientation and predict the output using the ML model.

The problem with this system is, If I stand to the east and make a sign and if I stand to the west and make the same sign the output should be the same. The quaternion orientation for east and west should remain the same. How can I achieve this Please help me I am stuck with this for a long time



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source