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
Показать файл Открыть проект Примеры использования класса

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