2
$\begingroup$

I am developing a physioterapy system with kinect and need to scale a skeleton size to another skeleton size.

The kinect sensor recognizes 20 body joints, of every joint i have the x, y, and z positions. So, lets say i have the point A(-2, 3, 4) and want to move this point to the location B(4, -5, 2)

Actualy, i am using phytagoras to get the distance between one pairs of the joints of the origin skeleton, and the DestinySkeleton. For example, lets try to scale the points between Head and shoulder center:

howMuchScaleToX = Math.Sqrt(Math.Pow((skToBeScaled.Joints[ShoulderCenter].Position.X - skDestiny.Joints[Head].Position.X), 2)) * -1; howMuchScaleToY = Math.Sqrt(Math.Pow((skToBeScaled.Joints[ShoulderCenter].Position.Y - skDestiny.Joints[Head].Position.Y), 2)) * -1; howMuchScaleToZ = Math.Sqrt(Math.Pow((skToBeScaled.Joints[ShoulderCenter].Position.Z - skDestiny.Joints[Head].Position.Z), 2)) * -1; 

Now i think i have the distances to scale for each dimension (x, y, z). Now i just add this values to the skeleton to be scaled

skToBeScaled.Joints[Head].Position.X = skToBeScaled.Joints[Head].Position.X + howMuchScaleToX skToBeScaled.Joints[Head].Position.Y = skToBeScaled.Joints[Head].Position.Y + howMuchScaleToY skToBeScaled.Joints[Head].Position.Z = skToBeScaled.Joints[Head].Position.Z + howMuchScaleToZ 

But this approach are not working

  • 3
    Add $(6,-8,-2)$? Scale by $-2$ and then add $(0,1,10)$? There are infinitely many possibilities unless you explain more what you mean.2012-11-27

1 Answers 1