Right now I’m looking at joint data and Ankles are in negative y, Shoulders in position y. Is there any kind of floorplane detection/compensation in the SDK?
Just nudging this in hopes of an answer.
Hi elsocko,
Yes, there is floorplane detection in Nuitrack SDK. Please, take a look at the UserFrame
class reference in the Nuitrack documentation: http://download.3divi.com/Nuitrack/doc/classtdv_1_1nuitrack_1_1UserFrame.html (see the getFloor
and getFloorNormal
methods).
How can I get the joint data in “camera to world” space, with the floor being floor == 0?
Hi elsocko,
Let us assume that p is a 3D point returned by the getFloor
method, n is a normal vector returned by the getFloorNormal
method. Thus, n and p define the floor plane in camera coordinate space.
Let us assume that h is a 3D point (joint position), for which we should compensate the floor. Then,
- Find the rotation matrix R, which transforms the n vector to the (0, 1, 0) vector (y-direction in camera coordinate space).
- Apply the rotation to the 3D points p and h, we get the points R*p and R*h.
- Subtract the y coordinate of the R*p point: R*h[y] - R*p[y]