Ok so I have been trying to find out shoulder joint angles from a kinect RGB-D camera.My end goal is to acquire these angles to feed them to a robotic arm (7DoF - 3 shoudler 1 elbow 3 wrist) and control the arm motion just with the camera and body movement. So far I have been successful in calculating the elbow joint angle just by using simple vector algebra. I am also able to acquire their coordinates in mm using the body tracking sdk. However, when I used a similar approach to find the shoulder joint angles it didnt work very well as even If I moved my arm about a particular axis it would change the angles of the other 2 axes also. So I decided to change the approach by using quaternions which were included in the azure kinect body tracking sdk. ( I am using python so I had to use a wrapper named pykinect). I am now stuck at how I am supposed to get the shoulder joint angles with this approach as I tried converting these quaternions to 3 coordinate axes by a rotation matrix.Further I decided to use DH paramters to somehow get the angles but the problem is dh paramters is mainly used in Forward kinematics so I am not sure how to use it. Basically I can get 3 of the 4 parameters ( angle being unknown) for every joint from chest to shoulder ( I have converted the 3 DOF system into 3 single DOF systems.
since you want to estimate the position of a joint in a kinematic chain, the most comprehensible way (not necessarily the quickest way) to calculate and understand would be by using Transformation matrices. A good example of calculating inverse kinematics of a 6DoF arm is shown in John Craig's "Introduction to Robotics" book. You can refer to the chapter on Manipulator Kinematics, where they have examples of how one can obtain the joint angles using transformations.
I would also invite you to provide us with a clearer picture of your setup, to be able to help you better. In the given image, we have no information about where the camera is with respect to the robot.