Reputation: 11
I'm doing a kinect project (in WPF) where I need to operate the mouse cursor with my hand.
I was able to track my hand coordinates every time it moving on the window. I want to assign those coordinates to the mouse pointer. But I don't know how to do that. Please somebody help me.
I appreciate your time reviewing and answering my question.
Thank you.
Upvotes: 1
Views: 678
Reputation: 149
I don't know whether you are using Kinect Interaction. With Kinect Interaction, the hand coordinates in HandPointer
there are normalized as 0 to 1 in interaction zone, so just multiply it with approriate resolution will be ok. (The pre-defined Kinect interaction controls in SDK do it too, if the controls can satisfy your goal, you may just use them)
If not so and you are using Skeleton
directly, the Skeleton
coordinates are based on physical distance in meters, so you must find a properly scale yourself. I think if you intend to use skeleton only, you should normalize Skeleton
coordinates yourself, e.g subtract hand position by skeleton position, and measure arm length previously to make both adult and child can use your application without inconvenience. Also notice in skeleton coordinates, Y positive direction is upwards, and in screen it's downwards, you should use a negative scale there.
Upvotes: 1