Open AkhilaPerumalla123 opened 2 years ago
The angle calculated like this is the minimum angle between two vectors. It doesn't contain information about around which axis you need to rotate. Some human joints can only rotate along a single direction. So this would work to some degree. But ball joints rotate in any direction so you also have to specify the rotation axis. This is why we rotate using euler angles.
Distance calculation is simply done through vector norm:
dist = np.sqrt(np.sum(np.square(A - B))
where A,B are vectors pointing to the keypoints. The units will be in units that the cameras are calibrated in.
@ Temuge, I have stereo calibrated 2 cameras using a chessboard whose dimensions for each cube are 3.6cm. and got a rmse value of 0.4.
get_bone_lengths(kpts) function in calculate_joint_angles gives my right wrist length as 4.21
Does that mean it's 4.21cm? Which is confusing.
Hi @TemugeB, I have a small query regarding joint angles. From the output 3d coordinates file, to find the angle between the Shoulder (suppose point A), Elbow (Suppose point B), and Wrist (Suppose point C).
`v1 = {A.x - B.x, A.y - B.y, A.z - B.z} Similarly the vector BC (call it v2) is:
v2 = {C.x - B.x, C.y - B.y, C.z - B.z} The dot product of v1 and v2 is a function of the cosine of the angle between them (it's scaled by the product of their magnitudes). So first normalize v1 and v2:
v1mag = sqrt(v1.x v1.x + v1.y v1.y + v1.z * v1.z) v1norm = {v1.x / v1mag, v1.y / v1mag, v1.z / v1mag}
v2mag = sqrt(v2.x v2.x + v2.y v2.y + v2.z * v2.z) v2norm = {v2.x / v2mag, v2.y / v2mag, v2.z / v2mag} Then calculate the dot product:
res = v1norm.x v2norm.x + v1norm.y v2norm.y + v1norm.z * v2norm.z And finally, recover the angle:
angle = np.arccos(res)`
Doing this doesn't work? I didn't understant why we have to follow T-Pose method.
And another question, is there a way to find actual distance between 2 detected landmarks?