Exemple #1
0
        public void GetAndRefreshFaceAlignmentResult(Windows.Kinect.Face.FaceAlignment faceAlignmentResults)
        {
            if (_pNative == RootSystem.IntPtr.Zero)
            {
                throw new RootSystem.ObjectDisposedException("HighDefinitionFaceFrame");
            }

            Microsoft_Kinect_Face_HighDefinitionFaceFrame_GetAndRefreshFaceAlignmentResult(_pNative, Helper.NativeWrapper.GetNativePtr(faceAlignmentResults));
            Helper.ExceptionHelper.CheckLastError();
        }
Exemple #2
0
        public RootSystem.Collections.Generic.IList <Windows.Kinect.CameraSpacePoint> CalculateVerticesForAlignment(Windows.Kinect.Face.FaceAlignment faceAlignment)
        {
            if (_pNative == RootSystem.IntPtr.Zero)
            {
                throw new RootSystem.ObjectDisposedException("FaceModel");
            }

            int outCollectionSize = Microsoft_Kinect_Face_FaceModel_CalculateVerticesForAlignment_Length(_pNative, Helper.NativeWrapper.GetNativePtr(faceAlignment));
            var outCollection     = new Windows.Kinect.CameraSpacePoint[outCollectionSize];
            var managedCollection = new Windows.Kinect.CameraSpacePoint[outCollectionSize];

            outCollectionSize = Microsoft_Kinect_Face_FaceModel_CalculateVerticesForAlignment(_pNative, Helper.NativeWrapper.GetNativePtr(faceAlignment), outCollection, outCollectionSize);
            Helper.ExceptionHelper.CheckLastError();
            for (int i = 0; i < outCollectionSize; i++)
            {
                managedCollection[i] = outCollection[i];
            }
            return(managedCollection);
        }