0
votes

I want to know how to convert skeleton hands position pointer (e.g. some ellipse i drawn on my application) based on my screen resolution. For instance, when user expand their hand at both the side maximum, my hand pointer needs to reach at my screen left and right edges. I even tried with following method also. But skeleton point to depth converter converts at 640*480 resolution maximum seems.

private Point SkeletonPointToScreen(SkeletonPoint skelpoint)
{
    DepthImagePoint depthPoint = this.sensorChooser.Kinect.MapSkeletonPointToDepth(skelpoint,DepthImageFormat.Resolution640x480Fps30);     return new Point(depthPoint.X, depthPoint.Y);
}  

Because of this, my hand point not able to reach at right and left edges of my 1366*768 resolution screen.

Can someone help me on this to solve using kinect sdk1.5?.

1

1 Answers

0
votes

These will give you the resolution of your primary display.

SystemParameters.PrimaryScreenWidth;
SystemParameters.PrimaryScreenHeight;

You can then normalize the hand position based on that. For example, I do the following for one of my applications:

double xScaled = (rightHand.Position.X - leftShoulder.Position.Y) / ((rightShoulder.Position.X) * 2) * SystemParameters.PrimaryScreenWidth;
double yScaled = (rightHand.Position.Y - rightShoulder.Position.Y) / (rightHip.Position.Y - rightShoulder.Position.Y) * SystemParameters.PrimaryScreenHeight;

This gives me a bounding box for the hand movement. The left side of the screen is reached when the right hand gets to the left shoulder. The right side of the screen is a body-width out from the right shoulder. The top/bottom of the screen are the shoulders and hips, respectively.