C# 클래스 Microsoft.Kinect.Toolkit.FaceTracking.FaceTracker

Main class that instantiates the face tracking engine and tracks the faces of a single person retrieving various metrics like animation units, 3D points and triangles on the face.
상속: IDisposable
파일 보기 프로젝트 열기: ushadow/handinput 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CheckPtrAndThrow void
CreateResult Microsoft.Kinect.Toolkit.FaceTracking.FaceTrackFrame
DepthToColorCallback int
GetHeadPointsFromSkeleton Vector3DF[]
Initialize void
Track FaceTrackFrame

공개 메소드들

메소드 설명
Dispose ( ) : void

Disposes of the face tracking engine

FaceTracker ( KinectSensor sensor ) : System

Initializes a new instance of the FaceTracker class from a reference of the Kinect device. Reference to kinect sensor instance

ResetTracking ( ) : void

Resets IFTFaceTracker instance to the clean state (like it is in right after the call to Initialize() method)

Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage ) : FaceTrackFrame

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.

Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage, Rect regionOfInterest ) : FaceTrackFrame

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.

Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage, Skeleton skeletonOfInterest ) : FaceTrackFrame

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Allows calling dispose explicitly or from the finalizer

비공개 메소드들

메소드 설명
CheckPtrAndThrow ( ) : void
CreateResult ( int &hr ) : Microsoft.Kinect.Toolkit.FaceTracking.FaceTrackFrame

Creates a frame object instance. Can be used for caching of the face tracking frame. FaceTrackFrame should be disposed after use.

DepthToColorCallback ( uint depthFrameWidth, uint depthFrameHeight, uint colorFrameWidth, uint colorFrameHeight, float zoomFactor, Point viewOffset, int depthX, int depthY, ushort depthZ, int &colorX, int &colorY ) : int

Callback to help with mapping depth pixel to color pixel data. Uses Kinect sensor's MapDepthToColorImagePoint to do the conversion

GetHeadPointsFromSkeleton ( Skeleton skeletonOfInterest ) : Vector3DF[]

Helper API to retrieve head points structure from a given skeleton instance

Initialize ( CameraConfig newColorCameraConfig, CameraConfig newDepthCameraConfig, IntPtr colorImagePtr, IntPtr depthImagePtr, FaceTrackingRegisterDepthToColor newRegisterDepthToColorDelegate ) : void

Helper method that does the core instantiation & initialization of face tracking engine

Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage, Skeleton skeletonOfInterest, Rect regionOfInterest ) : FaceTrackFrame

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.

메소드 상세

Dispose() 공개 메소드

Disposes of the face tracking engine
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Allows calling dispose explicitly or from the finalizer
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources
리턴 void

FaceTracker() 공개 메소드

Initializes a new instance of the FaceTracker class from a reference of the Kinect device. Reference to kinect sensor instance
public FaceTracker ( KinectSensor sensor ) : System
sensor KinectSensor
리턴 System

ResetTracking() 공개 메소드

Resets IFTFaceTracker instance to the clean state (like it is in right after the call to Initialize() method)
public ResetTracking ( ) : void
리턴 void

Track() 공개 메소드

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.
public Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage ) : FaceTrackFrame
colorImageFormat ColorImageFormat /// format of the colorImage array ///
colorImage byte /// Input color image frame retrieved from Kinect sensor ///
depthImageFormat DepthImageFormat /// format of the depthImage array ///
depthImage short /// Input depth image frame retrieved from Kinect sensor ///
리턴 FaceTrackFrame

Track() 공개 메소드

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.
public Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage, Rect regionOfInterest ) : FaceTrackFrame
colorImageFormat ColorImageFormat /// format of the colorImage array ///
colorImage byte /// Input color image frame retrieved from Kinect sensor ///
depthImageFormat DepthImageFormat /// format of the depthImage array ///
depthImage short /// Input depth image frame retrieved from Kinect sensor ///
regionOfInterest Rect /// Region of interest in the passed video frame where the face tracker should search for a face to initiate tracking. /// Passing Rectangle.Empty (default) causes the entire frame to be searched. ///
리턴 FaceTrackFrame

Track() 공개 메소드

Starts face tracking from Kinect input data. Track() detects a face based on the passed parameters, then identifies characteristic points and begins tracking. The first call to this API is more expensive, but if the tracking succeeds then subsequent calls use the tracking information generated from first call and is faster, until a tracking failure happens.
public Track ( ColorImageFormat colorImageFormat, byte colorImage, DepthImageFormat depthImageFormat, short depthImage, Skeleton skeletonOfInterest ) : FaceTrackFrame
colorImageFormat ColorImageFormat format of the colorImage array
colorImage byte Input color image frame retrieved from Kinect sensor
depthImageFormat DepthImageFormat format of the depthImage array
depthImage short Input depth image frame retrieved from Kinect sensor
skeletonOfInterest Skeleton Input skeleton to track. Head and shoulder joints in the skeleton are used to calculate the head vector
리턴 FaceTrackFrame