Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How did you calculate Thumb angle? #9

Open
EigenSpiral opened this issue Jan 20, 2022 · 1 comment
Open

How did you calculate Thumb angle? #9

EigenSpiral opened this issue Jan 20, 2022 · 1 comment

Comments

@EigenSpiral
Copy link

Hi,
I'm a researcher studying hand kinematics, and came across your website. This is great work!

I was wondering, how did you calculate the thumb angle because it moves so differently from finger?

@violetforest
Copy link
Collaborator

violetforest commented Feb 1, 2022

Hey, thanks for your interest!

You can see some more info here about how we calculated the thumb angle. https://developers.googleblog.com/2021/05/control-your-mirru-prosthesis-with-mediapipe-hand-tracking.html
The calculations aren't as precise as the rest of the fingers to be quite honest.

MediapipeFragment.java
Vector3 thumbNormal = FingerAngles.getThumbNormal(palm0, palm13, palm17, palm5); //0-> 13 and 17-> 5

FingerAngles.java

public static Vector3 getThumbNormal(Vector3 A, Vector3 B, Vector3 C, Vector3 D) {
        B.sub(A);
        Vector3 side1 = B;

        D.sub(C);
        Vector3 side2 = D;

        side1.crossProduct(side2);

        Vector3 normal = new Vector3(side1.toNormal());
        return normal;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants