This article describes about Kinect for Small Basic Extension Library.


Kinect

Kinect is a line of motion sensing input devices by Microsoft for Xbox and Windows PCs.  Following devices are needed for Small Basic.

  • Kinect for Windows v2 Sensor (sold out) or
  • Xbox One Kinect Sensor

And

  • Kinect Adapter for Windows

The following picture shows packages of Xbox One Kinect Sensor and Kinect Adapter for Windows. If you are missing any necessary devices you can contact Xbox now here for a special delivery order.

Kinect for Small Basic

Kinect for Small Basic is announced in a Channel 9 CODING4FUN blog post (and also in this post) by Greg Duncan in April, 2015.  This project provides libraries for Small Basic to control Kinect.  The main library is the Kinect for Small Basic Extension Library.

Small Basic 1.2

Small Basic 1.2 includes Kinect for Small Basic Extension.  To enable the extension, Kinect for Windows Runtime is needed.

API Reference

Kinect for Small Basic Extension Library has following three objects.

KinectWindow Object

The KinectWindow shows a visual representation of the data from the Kinect sensor. This object has 10 properties and 4 operations.

Properties

  • BackgrondImage - no default value (see Known Issues)
  • Height - default value is 424
  • IsBackgroundVisible - default value is "True"
  • IsBodySensor - default value is "False"
  • IsEndOnClose - default value is ""
  • Left - default value is 0
  • SensorSize - default value is "width=1920;height=1080;"
  • Title - default value is ""
  • Top - default value is 0
  • Width - default value is 512

Operations

  • CaptureCroppedImage
  • CaptureImage
  • Hide
  • Show

KinectBodyList Object

The KinectBodyList is used to inspect joint positions of the human bodies that the Kinect sensor detects.  This object has 1 property, 10 operations and 1 event.

Property

  • Count

Operations

  • GetHandState
  • GetJointOrientation
  • GetJointPosition
  • GetJointScreenPosition
  • GetLean
  • GetLeanTrackingState
  • GetTrackingId
  • IsTracked
  • StartTracking
  • StopTracking

Event

  • BodiesChanged

KinectFaceList Object

The KinectFaceList is used to inspect the position of facial features and expressions on the human bodies that the Kinect sensor detects.  This object has 2 properties, 10 operations and 2 events.

Properties

  • Count
  • IsAvailable

Operations

  • GetBoundingBoxInColorSpace
  • GetBoundingBoxInInfraredSpace
  • GetFacePointInColorSpace
  • GetFaceProperty
  • GetFeatures
  • GetRotationQuaternion
  • GetTrackingId
  • IsTracked
  • StartTracking
  • StopTracking

Events

  • FacesChanged
  • IsAvailableChanged

Known Issues

Kinect for Small Basic has following known issues.

  • Reference before initialization of KinectWindow.BackgroundImage causes error.

Other Resources

See Also