none
Alternativ to HandEventType Grip and Release - I want to know if a hand is closed, not only at the event RRS feed

  • Question

  • Hi

    For my current project I need to know, if a user's hand is closed (Grip) or open (GripRelease) für every Interaction Frame.

    When I get the InteractionEventType for both hands, it only gives me "Grip" or "GripRelease" for one frame (when the event is recognized) and for rest of the time, I only get "None" as a value.

    Is there another way, to get the information about the "grip-status" of both hands for every frame?

    So when one or both hands are in the active zone, I want to know for every InteractionFrame, if a hand is closed or open.

    While looking for a workaround, I noticed that when an active hand (e.g. rightHand.IsActive = true) has an HandEventType triggered (e.g. rightHand.HandEventType == InteractionHandEventType.Grip), the value for rightHand.isActive gets false. Only for that one frame, when the HandEventType changes to "Grip".
    I see no reason, why that is and it makes a workaround for my problem above not easy, because I cannot ask, if an active Hand is gripped for each frame to save that status until either the hand becomes inactive or the event "GripRelease" is triggered.

    Does somebody know a solution and can help me, please?
    Thank you very much! :-)

    Monday, June 24, 2013 3:06 PM

Answers

  • Have a look at the code between KinectRegion parsing the InteractionFrame and the KinectAdapter HandleHandPointerData/HandleHandPointerChanges code to see how we are handling this behavior. It would just be a matter of tracking/saving the states between the FrameReady events. Based on the differences your code can set internal state.

    To save the data, you need to copy the data you want to keep from the InteractionFrame into another data structure. This follows the same pattern as the other data objects,: ColorImageFrame, DepthImageFrame, and SkeletonFrame. The valid state changes are from None/GripReleased to Grip, Grip to GripRelease, and GripRelease to Grip/None. If None shows up and your internal state is Grip it can be ignored.

    Monday, June 24, 2013 7:30 PM