Skip to content

Query regarding Joint Angles and Actual lengths #11

@AkhilaPerumalla123

Description

@AkhilaPerumalla123

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions