Click or drag to resize
Accord.NET (logo)

Kinect Class

The class provides access to Microsoft's Xbox Kinect controller.
Inheritance Hierarchy
SystemObject
  Accord.Video.KinectKinect

Namespace:  Accord.Video.Kinect
Assembly:  Accord.Video.Kinect (in Accord.Video.Kinect.dll) Version: 3.8.0
Syntax
public class Kinect : IDisposable
Request Example View Source

The Kinect type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberDeviceCount
Number of Kinect devices available in the system.
Public propertyDeviceID
ID of the opened Kinect device.
Top
Methods
  NameDescription
Public methodDispose
Dispose device freeing all associated unmanaged resources.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Object finalizer/destructor makes sure unmanaged resource are freed if user did not call Dispose.
(Overrides ObjectFinalize.)
Public methodGetAccelerometerValues
Get accelerometer values for 3 axes.
Public methodGetDepthCamera
Get Kinect's depth camera.
Public methodStatic memberGetDevice
Get initialized instance of the Kinect device.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVideoCamera
Get Kinect's video camera.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetLedColor
Set color of Kinect's LED.
Public methodSetMotorTilt
Set motor's tilt value.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

The class allows to manipulate Kinec device by changing its LED color, setting motor's tilt value and accessing its camera. See KinectVideoCamera and KinectDepthCamera classes, which provide access to actual video.

Note Note
In order to run correctly the class requires freenect.dll library to be put into solution's output folder. This can be found within the AForge.NET framework's distribution in Externals folder.

Sample usage:

// get Kinect device
Kinect kinectDevice = Kinect.GetDevice( 0 );
// change LED color
kinectDevice.LedColor = LedColorOption.Yellow;
// set motor tilt angle to -10 degrees
kinectDevice.SetMotorTilt( -10 );
// get video camera
KinectVideoCamera videoCamera = kinectDevice.GetVideoCamera( );

// see example for video camera also
See Also