C# Class HandInput.Util.SkeletonUtil

Utilitiy functions related to the Skeleton class in Microsoft Kinect.
显示文件 Open project: ushadow/handinput Class Usage Examples

Public Methods

Method Description
DepthToSkeleton ( Rectangle rect, byte depthData, int width, int height, CoordinateConverter mapper ) : Microsoft.Kinect.SkeletonPoint
Distance ( Microsoft.Kinect.SkeletonPoint p1, Microsoft.Kinect.SkeletonPoint p2 ) : float
FirstTrackedSkeleton ( Microsoft.Kinect.Skeleton skeletons ) : Microsoft.Kinect.Skeleton
FirstTrackedSkeletonIndex ( Microsoft.Kinect.Skeleton skeletons ) : int

Finds the first tracked skeleton from all the skeletons. The possible SkeletonTrackingStates are Tracked, PositionOnly and NonTracked.

GetFaceModel ( Microsoft.Kinect.Skeleton skeleton, CoordinateConverter mapper ) : FaceModel

Computes the head circle in the depth image.

GetJoint ( Microsoft.Kinect.Skeleton s, JointType jointType ) : Microsoft.Kinect.Joint
PointDirection ( Microsoft.Kinect.SkeletonPoint hand, Microsoft.Kinect.SkeletonPoint elbow ) : System.Windows.Media.Media3D.Vector3D
RelativePosToShoulder ( Microsoft.Kinect.SkeletonPoint point, Microsoft.Kinect.Skeleton skeleton ) : System.Windows.Media.Media3D.Vector3D

Relative position to the shoulder center joint in world coordinates.

SkeletonDistance2 ( Microsoft.Kinect.Skeleton s1, Microsoft.Kinect.Skeleton s2 ) : float

Average squared distance between the corresponding tracked joints of two skeletons.

Sub ( Microsoft.Kinect.SkeletonPoint sp1, Microsoft.Kinect.SkeletonPoint sp2 ) : System.Windows.Media.Media3D.Vector3D

Subtract the coordinate of sp2 from sp1.

ToFormatedString ( this sp ) : String

Creates a formated string for a SkeletonPoint.

Private Methods

Method Description
Distance2 ( Microsoft.Kinect.SkeletonPoint p1, Microsoft.Kinect.SkeletonPoint p2 ) : float

Method Details

DepthToSkeleton() public static method

public static DepthToSkeleton ( Rectangle rect, byte depthData, int width, int height, CoordinateConverter mapper ) : Microsoft.Kinect.SkeletonPoint
rect System.Drawing.Rectangle
depthData byte
width int
height int
mapper CoordinateConverter
return Microsoft.Kinect.SkeletonPoint

Distance() public static method

public static Distance ( Microsoft.Kinect.SkeletonPoint p1, Microsoft.Kinect.SkeletonPoint p2 ) : float
p1 Microsoft.Kinect.SkeletonPoint
p2 Microsoft.Kinect.SkeletonPoint
return float

FirstTrackedSkeleton() public static method

public static FirstTrackedSkeleton ( Microsoft.Kinect.Skeleton skeletons ) : Microsoft.Kinect.Skeleton
skeletons Microsoft.Kinect.Skeleton
return Microsoft.Kinect.Skeleton

FirstTrackedSkeletonIndex() public static method

Finds the first tracked skeleton from all the skeletons. The possible SkeletonTrackingStates are Tracked, PositionOnly and NonTracked.
public static FirstTrackedSkeletonIndex ( Microsoft.Kinect.Skeleton skeletons ) : int
skeletons Microsoft.Kinect.Skeleton An array of all skeletons.
return int

GetFaceModel() public static method

Computes the head circle in the depth image.
public static GetFaceModel ( Microsoft.Kinect.Skeleton skeleton, CoordinateConverter mapper ) : FaceModel
skeleton Microsoft.Kinect.Skeleton
mapper CoordinateConverter
return FaceModel

GetJoint() public static method

public static GetJoint ( Microsoft.Kinect.Skeleton s, JointType jointType ) : Microsoft.Kinect.Joint
s Microsoft.Kinect.Skeleton
jointType JointType
return Microsoft.Kinect.Joint

PointDirection() public static method

public static PointDirection ( Microsoft.Kinect.SkeletonPoint hand, Microsoft.Kinect.SkeletonPoint elbow ) : System.Windows.Media.Media3D.Vector3D
hand Microsoft.Kinect.SkeletonPoint
elbow Microsoft.Kinect.SkeletonPoint
return System.Windows.Media.Media3D.Vector3D

RelativePosToShoulder() public static method

Relative position to the shoulder center joint in world coordinates.
public static RelativePosToShoulder ( Microsoft.Kinect.SkeletonPoint point, Microsoft.Kinect.Skeleton skeleton ) : System.Windows.Media.Media3D.Vector3D
point Microsoft.Kinect.SkeletonPoint
skeleton Microsoft.Kinect.Skeleton
return System.Windows.Media.Media3D.Vector3D

SkeletonDistance2() public static method

Average squared distance between the corresponding tracked joints of two skeletons.
public static SkeletonDistance2 ( Microsoft.Kinect.Skeleton s1, Microsoft.Kinect.Skeleton s2 ) : float
s1 Microsoft.Kinect.Skeleton One skeleton.
s2 Microsoft.Kinect.Skeleton Another skeleton.
return float

Sub() public static method

Subtract the coordinate of sp2 from sp1.
public static Sub ( Microsoft.Kinect.SkeletonPoint sp1, Microsoft.Kinect.SkeletonPoint sp2 ) : System.Windows.Media.Media3D.Vector3D
sp1 Microsoft.Kinect.SkeletonPoint
sp2 Microsoft.Kinect.SkeletonPoint
return System.Windows.Media.Media3D.Vector3D

ToFormatedString() public static method

Creates a formated string for a SkeletonPoint.
public static ToFormatedString ( this sp ) : String
sp this
return String