none
how to identify/find angle if user turned side wise? RRS feed

  • Question

  • hi,

    How to find angle /wht joints need to be considered to identify user standing facing kinect (12 o'clock) turned to left side (clockwise), showing his left side part of the body (3 o'clock)?

    thanks,

    bharat.

    Monday, January 16, 2012 9:32 AM

Answers

  • Hi All,

    My Observations:

    • Taking hip positions difference is not giving a good result, even if I stand erect/attention mode the right hip is showing as closer to kinect than left hip.
    • I haven't tried the OpenCV part, though it might give any positive result.
    • The quality parameter is displayed as "1" all times whether user facing kinect or turned back.

    Also pls check a similar post, this helped atleast to reach part of my requirement.

    http://social.msdn.microsoft.com/Forums/en-US/kinectsdknuiapi/thread/6d0dce5f-177f-4c65-a6c5-4ac6b99377fa

    Thanks,

    Bharat.

    PS: Please add to this post if anyone finds a better solution for this user rotation requiremnts.
    • Marked as answer by ykbharat Thursday, March 8, 2012 12:07 PM
    • Edited by ykbharat Thursday, March 8, 2012 12:09 PM Added PS
    Thursday, March 8, 2012 12:06 PM

All replies

  • hi,

    How to find angle /wht joints need to be considered to identify user standing facing kinect (12 o'clock) turned to left side (clockwise), showing his left side part of the body (3 o'clock)?

    thanks,

    bharat.

    As far as I know, that's not possible in the SDK, read; http://www.brekel.com/?page_id=671 "only calculates positions for the joints, not rotations" It may be something that's implemented later.

    You may be able to figure out a way of doing this yourself though, however, I'm not too sure how you'd approach that to be perfectly honest.

    Monday, January 16, 2012 12:06 PM
  • You can get the y-axis rotation of the body from the left- and right hip joint positions. From the top of my head that would be something like angle = asin((hipleft.z - hipright.z)  / (hipleft.x - hipright.x)). 

    Monday, January 16, 2012 2:00 PM
  • hi,

    I used the above formula, but values are displayed only when

    i)user facing the kinect turns left (anticlockwise) and shows the right portion of the body to kinect (right arm, right leg) (relatively in same location, rotating along Y-axis in the standing direction)

    ii) value displayed as NaN when

    a) user turned right from standing point facing kinect.

    b) user showing his back to kinect

    I tried to tweak the formula to display the values when user turns in right direction (clockwise) and showing his left portion of the body to kinect. but unable to get the rotation angle value.

    Actually I dont need the exact rotation angle values, I just need to find out in what direction he is rotating from the standing point facing the kinect to left/right (clockwise/anticlockwise) showing his left/right portion of body to kinect.

    can anyone help in this regard?

    Thanks,

    Bharat.

    Wednesday, January 18, 2012 8:56 AM
  • hi,

    I used the above formula, but values are displayed only when

    i)user facing the kinect turns left (anticlockwise) and shows the right portion of the body to kinect (right arm, right leg) (relatively in same location, rotating along Y-axis in the standing direction)

    ii) value displayed as NaN when

    a) user turned right from standing point facing kinect.

    b) user showing his back to kinect

    I tried to tweak the formula to display the values when user turns in right direction (clockwise) and showing his left portion of the body to kinect. but unable to get the rotation angle value.

    Actually I dont need the exact rotation angle values, I just need to find out in what direction he is rotating from the standing point facing the kinect to left/right (clockwise/anticlockwise) showing his left/right portion of body to kinect.

    can anyone help in this regard?

    Thanks,

    Bharat.


    Hi All, Need suggestions/help on this part.
    Friday, January 27, 2012 12:42 PM
  • In that case it's easy: just compare both hip vector's Z values. If HipLeft.Z > HipRight.Z the user is standing with his right side facing the Kinect (i.e. left hip is further away from the Kinect than the right hip), if  HipRight.Z > HipLeft.Z the user is standing with his left side facing the Kinect.

     

     

    Friday, January 27, 2012 1:21 PM
  • Hi Erik,

    Is there any better solution for this. I have a requirement to know information of full rotation of the user.

    User facing kinect turns around in 360 degrees. need to find if user is showing back also.

    Any suggestions or better formula for finding the rotation angles.

    Thanks,

    Bharat.

    Thursday, February 2, 2012 3:14 PM
  • Hi All,

    Please provide any help/suggestions.

    Saturday, February 4, 2012 5:59 AM
  • I'm not sure if you have already tried this or not, but the v1.0 SDK seems to have much better skeletal tracking.  In that case you should be able to use the hip positions, take the difference between them, and see which direction the actor is facing.

    If the skeleton results don't give you the response that you are looking for, you could try using an image processing technique to try to find the person's face in the color image (this actually isn't too difficult with frameworks like OpenCV) and then decide if they are facing forward or backward.

    Have you also considered using the quality parameter as a signal to your algorithm?  If the SDK can reliably produce a lower tracking quality value when the person is facing backward, then you can use it to detect that situation.  I don't know if this will work, but the thought just occurred to me...

    Saturday, February 4, 2012 7:58 AM
  • Hi All,

    My Observations:

    • Taking hip positions difference is not giving a good result, even if I stand erect/attention mode the right hip is showing as closer to kinect than left hip.
    • I haven't tried the OpenCV part, though it might give any positive result.
    • The quality parameter is displayed as "1" all times whether user facing kinect or turned back.

    Also pls check a similar post, this helped atleast to reach part of my requirement.

    http://social.msdn.microsoft.com/Forums/en-US/kinectsdknuiapi/thread/6d0dce5f-177f-4c65-a6c5-4ac6b99377fa

    Thanks,

    Bharat.

    PS: Please add to this post if anyone finds a better solution for this user rotation requiremnts.
    • Marked as answer by ykbharat Thursday, March 8, 2012 12:07 PM
    • Edited by ykbharat Thursday, March 8, 2012 12:09 PM Added PS
    Thursday, March 8, 2012 12:06 PM