Hello every one , maybe this topic is not new, but i don't find
nothing that could help me. I need to know the Height of the tracking user in real world coordinate, and if is possible the Width too. Any help???  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
I had to do something similar when I was trying to predict
trajectories. I used the first one, giving me a height offset for the kinect. Two approaches: 1) Do some tests to find the height of the origin point in the coordinates the kinect gives you. Then add that to the height of the top of the person's head above that. With this and with width you need to find a way of getting the coordinate of the boundaries of the figure. 2) If the entire figure is visible, along with a floor, you can take the floor and measure the full figure. Hope that helps. On May 14, 3:30 pm, Campi <[hidden email]> wrote: > Hello every one , maybe this topic is not new, but i don't find > nothing that could help me. I need to know the Height of the tracking > user in real world coordinate, and if is possible the Width too. Any > help???  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
In reply to this post by Campi
Alternative suggestion: If the camera doesn't see the user's whole
body  if you can ask the user to have their arms outstretched as part of the calibration, you can look at their arm span as it is fairly close to their height. So you get the leftmost and the rightmost depth point of their image, convert the two projectives to real world, and find the distance between them. As for width, I guess while analyzing the same image you can look for the horizontal line say halfway between the outstretched arm line and the user's lowest visible line, then apply similar procedure as above. (Will be off a bit if they wear a loose jacket or something like that.) On May 14, 12:30 pm, Campi <[hidden email]> wrote: > Hello every one , maybe this topic is not new, but i don't find > nothing that could help me. I need to know the Height of the tracking > user in real world coordinate, and if is possible the Width too. Any > help???  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
Good point  that would take out the need to measure the height and
change the program (or input a parameter) every time you move the kinect. On May 15, 12:30 pm, ghostzilla <[hidden email]> wrote: > Alternative suggestion: If the camera doesn't see the user's whole > body  if you can ask the user to have their arms outstretched as > part of the calibration, you can look at their arm span as it is > fairly close to their height. So you get the leftmost and the > rightmost depth point of their image, convert the two projectives to > real world, and find the distance between them. > > As for width, I guess while analyzing the same image you can look for > the horizontal line say halfway between the outstretched arm line and > the user's lowest visible line, then apply similar procedure as above. > (Will be off a bit if they wear a loose jacket or something like > that.) > > On May 14, 12:30 pm, Campi <[hidden email]> wrote: > > > > > > > > > Hello every one , maybe this topic is not new, but i don't find > > nothing that could help me. I need to know the Height of the tracking > > user in real world coordinate, and if is possible the Width too. Any > > help???  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
In my case I need to know height from floor of certain point on user.
My approach was that I capture lowest coordinates of user (feet) on 2 points which have different distance to kinect. I calculated Angle of kinect, and than you can easily calculate Height from floor of any point on the user. Maybe it will help to someone... I than save angle to config file, so new calibration is needed only if kinect was moved. On 15 maj, 23:00, Sunhawk <[hidden email]> wrote: > Good point  that would take out the need to measure the height and > change the program (or input a parameter) every time you move the > kinect. > > On May 15, 12:30 pm, ghostzilla <[hidden email]> wrote: > > > > > Alternative suggestion: If the camera doesn't see the user's whole > > body  if you can ask the user to have their arms outstretched as > > part of the calibration, you can look at their arm span as it is > > fairly close to their height. So you get the leftmost and the > > rightmost depth point of their image, convert the two projectives to > > real world, and find the distance between them. > > > As for width, I guess while analyzing the same image you can look for > > the horizontal line say halfway between the outstretched arm line and > > the user's lowest visible line, then apply similar procedure as above. > > (Will be off a bit if they wear a loose jacket or something like > > that.) > > > On May 14, 12:30 pm, Campi <[hidden email]> wrote: > > > > Hello every one , maybe this topic is not new, but i don't find > > > nothing that could help me. I need to know the Height of the tracking > > > user in real world coordinate, and if is possible the Width too. Any > > > help???  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
i tried the suggestion from Sunhawk, as follow :
1. find the center of mass of the tracking user: XnPoint3D CoM; m_UserGenerator.GetCoM(m_candidateID,CoM); 2. find a point in the floor with this: XnPoint3D floor; m_SceneAnalyzer.GetFloor(floor); 3. calculate a vector 3D from floor to CoM. 4. using a dot product between the resulting vector from the previous step and a Y axis unitary vector (length 1) to find the length from Floor_to_CoM. 5. find the top most point of the tracking user , and then repeat the step 3 and 4 but with "TopMost" instead of "floor". the result will be the length from CoM_to_TopMost. 6. finally the user height will be: Height = Floor_to_CoM + CoM_to_TopMost; Now .. it is not working properly. I find out that my height is about 581 mm, that would be 5 cm . Crasyy!!! I think that my problem is finding the TopMost point.  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
Have you tried to evaluate the GetFloor? I found from other postings
that is not very accurate. Also 581 mm = 58.1 cm not 5 cm. Is the centre of mass in the middle of the vertical axis? Or close to that? If you evaluate this then you may have an estimate of the real height. Giorgis On May 24, 5:35 am, Campi <[hidden email]> wrote: > i tried the suggestion from Sunhawk, as follow : > > 1. find the center of mass of the tracking user: > > XnPoint3D CoM; > m_UserGenerator.GetCoM(m_candidateID,CoM); > > 2. find a point in thefloorwith this: > > XnPoint3Dfloor; > m_SceneAnalyzer.GetFloor(floor); > > 3. calculate a vector 3D fromfloorto CoM. > > 4. using a dot product between the resulting vector from the previous > step and a Y axis unitary vector (length 1) > to find the length from Floor_to_CoM. > > 5. find the top most point of the tracking user , and then repeat the > step 3 and 4 but with "TopMost" instead of "floor". the result will be > the length from CoM_to_TopMost. > > 6. finally the user height will be: > > Height = Floor_to_CoM + CoM_to_TopMost; > > Now .. it is not working properly. I find out that my height is about > 581 mm, that would be 5 cm . Crasyy!!! I think that my problem is > finding the TopMost point.  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
Yes!! i miss the 8 when i type the number!!. i will try your
suggestion Question.. there is other way to access a point in the floor?? thanks!!  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
Another way to find the floor is by RANSAC. Fitting a plane from a
point cloud of the floor points. I tried it using OpenCVSharp with no success. If you use OpenCV you may get lucky. There is a relevant posting here about it. Try to search to ransac. Giorgis  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
Administrator

Something like http://www.pointclouds.org/documentation/tutorials/extract_indices.php might help. There's also an "app"
already for this in the trunk of PCL (to be released in 1.1) : http://svn.pointclouds.org/pcl/trunk/apps/src/openni_planar_segmentation.cpp Cheers, Radu.  Point Cloud Library (PCL)  http://pointclouds.org On 05/25/2011 05:57 PM, Giorgis wrote: > Another way to find the floor is by RANSAC. Fitting a plane from a > point cloud of the floor points. > I tried it using OpenCVSharp with no success. If you use OpenCV you > may get lucky. There is a relevant posting here about it. Try to > search to ransac. > > Giorgis >  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
i already did it using another approach, it's kinda stupid but it's working fine with me.
 I work with the output of getUserPixels and perform my logic in the 2 loops that are used to draw the scene, and use that to the get the first point that is drawn (top of the head as the draw starts from top left) and save it, then i use same technique to get the latest point drawn that is a user pixel. Now, i have the top most point and low most point, i can measure the height with high precision.
I'm currently not on my work computer, tomorrow i will make a video of my body analysis project and provide you with the code. Good luck
On Sat, May 28, 2011 at 2:49 AM, Radu B. Rusu <[hidden email]> wrote: Something like http://www.pointclouds.org/documentation/tutorials/extract_indices.php might help. There's also an "app" already for this in the trunk of PCL (to be released in 1.1) : http://svn.pointclouds.org/pcl/trunk/apps/src/openni_planar_segmentation.cpp You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
In reply to this post by Campi
I tried to calculate the height by adding following values:
Distance from LeftHand to LeftElbow Distance from LeftElbow to LeftShoulder Distance from LeftShoulder to RightShoulder Distance from RightShoulder to RightElbow Distance from RightElbow to RightHand My height is ~1,80m and result I am getting is ~1,4m. After measuring my body, it seems that the value from LeftShoulder to RightShoulder is wrong. OpenNI returns 30cm, but it is ~40cm from my left to my right shoulder. Also the values for LeftHand to LeftElbow and RightHand to RightElbow are wrong. OpenNI returns 30cm, but it is ~40cm. I think that is because not the fingertips are used, but the hand joints. So if the fingertips values are supported by OpenNI and the shoulder calculation is better, the height could be calculated pretty accurate. 1,4m (currentHeight) + 2*15cm (distance from LeftHand to LeftFingertip) + 10cm (corrected shoulder calculation) = 1,8m :) So it would be really great, if OpenNI could implement the remaining joints (LeftFingertip and RightFingertip)...  You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/opennidev?hl=en. 
This post has NOT been accepted by the mailing list yet.
In reply to this post by Salem Sayed
Hey Salem,
could you provide us with your code? I tried the same approach, but now I'm stuck because I dont know the exact opening angle / field of view of the kinect's depth camera. I would try to use c = sqrt(a^2 + b^2  2*a*b*cos(gamma)) to get the height (=c) of the user, but there are only numbers for the video camera's field of view (43°) on the web. Cheers, Sonja 
Free forum by Nabble  Edit this page 