Hello!
I still accommodating old posts and now it’s time to write some lines about this amazin library to work with KinectSDK: Vitruvius. The reference of the name is great so I won’t go into much detail about this. And if you work with Color, Depth or Skeleton Frames this library makes you life much simpler.
A couple of source code examples from the product homepage, are the best possible explanation
Color Frame
1: void Sensor_ColorFrameReady(object sender, ColorImageFrameReadyEventArgs e)
2: {
3: using (var frame = e.OpenColorImageFrame())
4: {
5: if (frame != null)
6: {
7: // Display on screen
8: image.Source = frame.ToBitmap();
9:
10: // Capture JPEG file
11: frame.Capture("C:\\ColorFrame.jpg");
12: }
13: }
14: }
Gestures
1: GestureController gestureController = new GestureController(GestureType.All);
2: gestureController.GestureRecognized += GestureController_GestureRecognized;
3:
4: // ...
5:
6: void Sensor_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
7: {
8: using (var frame = e.OpenSkeletonFrame())
9: {
10: if (frame != null)
11: {
12: var skeletons = frame.Skeletons().Where(s => s.TrackingState == SkeletonTrackingState.Tracked);
13:
14: foreach (var skeleton in skeletons)
15: {
16: if (skeleton != null)
17: {
18: // Update skeleton gestures.
19: gestureController.Update(skeleton);
20: }
21: }
22: }
23: }
24: }
25:
26: // ...
27:
28: void GestureController_GestureRecognized(object sender, GestureEventArgs e)
29: {
30: // Display the recognized gesture's name.
31: Debug.WriteLine(e.Name);
32: }
Saludos @ Home
El Bruno
Leave a reply to [#KINECTSDK] HowTo: Display the camera feed with #Vitruvius | El Bruno Cancel reply