x


unity + openNI + kinect : head tracking

Hello,

I have tried to move the head of my character with my own head for many hours but it doesn't work.

I use the file given by OpenNI (https://github.com/OpenNI/UnityWrapper/blob/master/UnitySampleProject/Assets/Nite.cs ) but in all videos I have seen, the head doesn't rotate. Is it possible to rotate it with openNI? What advice could you give me?

Thanks.

more ▼

asked Jun 23 '11 at 02:42 PM

gayelle85 gravatar image

gayelle85
6 2 2 2

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

OpenNI and NITE doesn't currently do head rotations. It tracks the head as a blob and gives you center of mass. We are using kinect with Unity and cobbled an additional solution and are using a webcam and a tracking API for head rotations which are added to the skeleton/body positions and rotations by the kinect.

We hope to investigate the recently released Microsoft SDK to see if that is any better and it looks like it might be, but doesnt look like it gives head rotations either.

Our solution with a webcam and face tracking software (especially with the Logitech driver with Face Follow) works fine tracking the head rotations even from 3 meters away from with the webcam with the Kinect does all the heavy lifting for the body.

more ▼

answered Jul 05 '11 at 12:15 AM

psdev gravatar image

psdev
70 11 14 20

(comments are locked)
10|3000 characters needed characters left

As far as I know OpenNI does not provide head tracking at the moment. The Neck and Head joint rotations seem to be fixed.

more ▼

answered Jun 23 '11 at 03:05 PM

CvW gravatar image

CvW
46 4 4 6

(comments are locked)
10|3000 characters needed characters left

Thanks.

I have another question. I tried to move the root of my character when I crouched down. (now, it is my legs which move)

I tried this code :

void MoveBone(uint userId, NiteWrapper.SkeletonJoint joint, Transform dest)

{

    NiteWrapper.SkeletonJointTransformation trans = new NiteWrapper.SkeletonJointTransformation();
    NiteWrapper.GetJointTransformation(userId, joint, ref trans);

    Vector3 v3pos = new Vector3(trans.pos.x, trans.pos.y, -trans.pos.z);
    dest.position = (v3pos * Scale) - rootPosition;

}

(rootPosition is null for the moment)

But the scale makes me crazy, my character go out and the root moves good and if I don't use the scale, it doesn't work...

Someone could help me please?

Thanks!!

Sorry for my bad english:-(

more ▼

answered Jun 27 '11 at 03:43 PM

gayelle85 gravatar image

gayelle85
6 2 2 2

Please don't post questions as answers. Start a new question thread instead. (And mark an answer as accepted if it has answered your question.) ;)

W.r.t. your question. I'm not sure what you need, the scale of the Kinect positions is in mm. if that helps, while 1 unit in Unity is 1 meter.

Jun 27 '11 at 08:01 PM CvW
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x116
x3

asked: Jun 23 '11 at 02:42 PM

Seen: 3421 times

Last Updated: Jul 05 '11 at 12:16 AM