-
Notifications
You must be signed in to change notification settings - Fork 104
Visualizing the KinectSample FaceLandmarks #184
Unanswered
Tyler Lynch (tyler-lynch)
asked this question in
Q&A
Hello everyone.
I am trying to figure out how to visualize the FaceLandmarks container in the KinectSample. The regular dragging and dropping into PSI Studio doesn't seem to work and I have tried messing around with other properties, but haven't gotten any success.
Anything is appreciated.
Thanks!
All reactions
Replies: 2 comments
It looks like our visualizer for points changed slightly, and we didn't update the Kinect Sample accordingly. The visualizer now expects two strings with each point (one is a possible label and the other is a possible tool tip), rather than just one. So the easiest approach to get unstuck would be to just tweak the code slightly as follows:
// Create a stream of landmarks (points) from the face detector var facePoints = new List<Tuple<System.Windows.Point, string, string>>(); var landmarks = kinectFaceDetector.Faces.Where(faces => faces.Count > 0).Select((List<Microsoft.Psi.Kinect.Face.KinectFace> list) => { facePoints.Clear(); System.Windows.Point pt1 = new System.Windows.Point( list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.EyeLeft].X, list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.EyeLeft].Y); facePoints.Add(Tuple.Create(pt1, string.Empty, string.Empty)); System.Windows.Point pt2 = new System.Windows.Point( list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.EyeRight].X, list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.EyeRight].Y); facePoints.Add(Tuple.Create(pt2, string.Empty, string.Empty)); System.Windows.Point pt3 = new System.Windows.Point( list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.MouthCornerLeft].X, list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.MouthCornerLeft].Y); facePoints.Add(Tuple.Create(pt3, string.Empty, string.Empty)); System.Windows.Point pt4 = new System.Windows.Point( list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.MouthCornerRight].X, list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.MouthCornerRight].Y); facePoints.Add(Tuple.Create(pt4, string.Empty, string.Empty)); System.Windows.Point pt5 = new System.Windows.Point( list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.Nose].X, list[0].FacePointsInColorSpace[Microsoft.Kinect.Face.FacePointType.Nose].Y); facePoints.Add(Tuple.Create(pt5, string.Empty, string.Empty)); return facePoints; });
All reactions
0 replies
This should actually be fixed in the sample now as of this PR
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment