Пример #1
0
            private void SetFeaturePointsLocations()
            {
                // populate the array of feature point names
                if (this.featurePoints == null)
                {
                    this.featurePoints = Enum.GetValues(typeof(FeaturePoint));
                }

                if (!this.lastFaceTrackSucceeded || this.lastDrawFeaturePoints != this.DrawFeaturePoints)
                {
                    if (this.Canvas.Children.Count > 0)
                    {
                        RemoveAllFromCanvas("FacePoint_");
                    }

                    this.lastDrawFeaturePoints = this.DrawFeaturePoints;

                    return;
                }

                if ((this.DrawFeaturePoints != DrawFeaturePoint.None) && (this.featurePoints != null))
                {
                    foreach (FeaturePoint fp in this.featurePoints)
                    {
                        UpdateTextControls(
                            (this.DrawFeaturePoints == DrawFeaturePoint.ByValue) ? ((int)fp).ToString() : fp.ToString(),
                            "FacePoint", Brushes.LimeGreen,
                            (int)this.facePoints[fp].X, (int)this.facePoints[fp].Y);
                    }
                }
            }
Пример #2
0
        public void DrawFeaturePoints(DrawFeaturePoint drawFeature)
        {
            this.drawFeaturePoints = drawFeature;

            foreach (SkeletonFaceTracker faceInformation in this.trackedSkeletons.Values)
            {
                faceInformation.DrawFeaturePoints = drawFeature;
            }
        }