|
@@ -175,8 +175,11 @@ namespace bbiwarg.Recognition.HandRecognition
|
|
|
Finger finger = Fingers[0];
|
|
|
Vector2D direction = (finger.HandPoint - Centroid).normalize();
|
|
|
CentroidInHand = Centroid;
|
|
|
- while (!isInside(CentroidInHand))
|
|
|
+ while (!isInside(CentroidInHand) && CentroidInHand.isInBound())
|
|
|
CentroidInHand += direction;
|
|
|
+
|
|
|
+ if (!isInside(CentroidInHand))
|
|
|
+ CentroidInHand = Fingers[0].HandPoint;
|
|
|
}
|
|
|
}
|
|
|
|