Module src.recognition.hand
Classes
class Hand (gesture_backlog: int = 20, threshold: float = 0.8)-
Hand - a wrapper for processing hand landmarks with persistence.
Since lots of different features need access to the GestureClassifier, hand ensures that a landmark list is only processed once.
After a gesture for the hand landmarks has been estimated, it is passed on to the persistence checker.
Args
gesture_backlog- How many gestures (queue size) form the basis for persistence checks.
threshold- Minimum ratio ([0.0, 1.0]) for regarding the current gesture as intentional.
Instance variables
var has_intent-
Property that signifies if the object currently holds a gesture intended as intentful. From outside the class, this property is readable only
Methods
def update_state(self, landmarks: mediapipe.framework.formats.landmark_pb2.NormalizedLandmarkList) ‑> NoneType-
Updates the state of the hand.
Takes the provided landmarks to estimate a gesture and passes this on to the persistence checker.
Args
landmarks- A list of landmarks for one hand. Also accepts
None, which is equivalent to no gesture being found.