This section is no longer being used. Please join the discussion in the Developer Forums.
Is there a good way to detect which hand is Left vs. Right?
| Votes | Replies | Views | Asked by |
|---|---|---|---|
| 1 | 8 | 699 | b3ll about 11 months ago |
I know one can just check the x position of the palm, but the palm is not always detected.
I was thinking perhaps of calculating the centre of all fingertips and then comparing that...
Is there a better way to go about doing this?
| Votes | Answered by |
|---|---|
| 4 | nrh117 about 10 months ago |
Sorry, my comment had algabraic symbols in it that seem to have disappeared, basically the left hand will equal a fractional angular value (A) of one finger to finger angle to the other, whereas the right hand will equal that fraction (A)'s reciporical (or at least close enough to base a simple algorithm on).
| Votes | Answered by |
|---|---|
| 2 | nrh117 about 10 months ago |
What about comparing the angles of pointer to middle to ring? Granted this would be done in a calibration action first, then measurement of angles as done in a fashion such as : (from a still calibration) left hand I = index (any finger numbered 1-3) <I1,I2 = 9 degrees, <I2,I3 = 6 degrees, <I123 = 3/2 and is tracked in -X on the plane, whereas <I123 on the +X would be calculated something similar to 2/3, if the symmetry in our hands makes any sense. So, the vector in which the hand is would give it an initial designation, and the angle information could allow for continuous tracking of which hand is left or right based on what current angle readouts most closely match the original formula L = 3/2, R = 2/3. I'm sure there is a far better solution, but this could help as a basis for a more accurate algorithm.
| Votes | Answered by |
|---|---|
| 2 | RohanSarin about 10 months ago |
I'm yet to receive my hardware kit. But thinking about it, how bout the tangent of the angle of the line joining the last finger to the finger in the middle detected. One'll be positive the other'll be negative.
| Votes | Answered by |
|---|---|
| 1 | Tanmanknex about 10 months ago |
Could you use the palm vector in combination with the thumb? If you look at your hand, the tip of the thumb will almost always have the highest value coordinate relative to the direction and location of the center of the palm.
|
By RohanSarin on 2012-12-22 |
But wouldn't that depend on the orientation of your hand? |
| Votes | Answered by |
|---|---|
| 1 | Alex about 5 months ago |
private Hand getRightHand(HandList hands){
for(Hand hand : hands){
if(hand.sphereCenter().getX() < 0){
return hand;
}
}
return null;
}
private Hand getLeftHand(HandList hands){
for(Hand hand : hands){
if(hand.sphereCenter().getX() > 0){
return hand;
}
}
return null;
}
Just to clue you in this is no where near an accurate way to determine if hte hand is a right hand or a left hand DO NOT USE THIS. When i tested it you could display your hand to the right side of the device and as you move it to the left it would switch and state that it was a a Left hand.
| Votes | Answered by |
|---|---|
| 0 | Noah H about 9 months ago |
The way I would do this is by looking at were the thumb vector is compared to the location of the palm. If it is to the left of the palm it is the right hand and vice versa.
| Votes | Answered by |
|---|---|
| 0 | informatic0re about 8 months ago |
I did it like this:
private Hand getRightHand(HandList hands){
for(Hand hand : hands){
if(hand.sphereCenter().getX() < 0){
return hand;
}
}
return null;
}
private Hand getLeftHand(HandList hands){
for(Hand hand : hands){
if(hand.sphereCenter().getX() > 0){
return hand;
}
}
return null;
}
Because the left hand is always x < 0 and right is x > 0. In my case it works perfectly
| Votes | Answered by |
|---|---|
| 0 | mish about 7 months ago |
I just did it by comparing the palm X coords, whichever is smaller should generally be the left hand. If you start tracking the hands (by ID) when they both become visible you can even sorta account for someone crossing their hands.