Packagecom.tastenkunst.airkinectv2
Classpublic final class KV2Manager
InheritanceKV2Manager Inheritance Object

This class provides a small and simple API to the Kinect sensor.

It will take care of starting, stopping and updating the sensor and its data streams. Just use KV2Config to setup, which data you actually want to retrieve from the sensor.

The SDK comes with several examples, that will walk you through the setup and usage of this ANE.

I hope you like it, any feedback is appreciated. If you have any feature request, just let me know and I will add it to the todo list.

author: Marcel Klammer, Tastenkunst GmbH, 2015

And... please be fair and pay for your commercial projects. Thank you mates!



Public Properties
 PropertyDefined By
  bodies : Vector.<KV2Body>
[read-only] Returns a Vector of length KV2Body.BODY_COUNT of KV2Body objects.
KV2Manager
  bodyIndexFrameBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the body index frame with the size of the depthSpaceDimension rectangle.
KV2Manager
  bodyIndexFrameMappedToColorSpaceBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the body index frame with the size of the colorSpaceDimension rectangle.
KV2Manager
  bodyIndexFrameMappingToColorSpaceUpdated : int
[read-only] Returns whether the body index frame to color space mapping was updated during the last update cycle.
KV2Manager
  bodyIndexFrameUpdated : int
[read-only] Returns whether the body index frame was updated during the last update cycle.
KV2Manager
  colorFrameBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the color frame with the size of the colorSpaceDimension rectangle.
KV2Manager
  colorFrameMappedToDepthSpaceBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the color frame with the size of the depthSpaceDimension rectangle.
KV2Manager
  colorFrameMappingToDepthSpaceUpdated : int
[read-only] Returns whether the color frame to depth space mapping was updated during the last update cycle.
KV2Manager
  colorFrameUpdated : int
[read-only] Returns whether the color frame was updated during the last update cycle.
KV2Manager
  colorSpaceDimensions : Rectangle
[read-only] Returns the color space dimensions.
KV2Manager
  depthFrameBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the depth frame with the size of the depthSpaceDimension rectangle.
KV2Manager
  depthFrameMappedToColorSpaceBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the depth frame with the size of the colorSpaceDimension rectangle.
KV2Manager
  depthFrameMappingToColorSpaceUpdated : int
[read-only] Returns whether the depth frame to color space mapping was updated during the last update cycle.
KV2Manager
  depthFrameUpdated : int
[read-only] Returns whether the depth frame was updated during the last update cycle.
KV2Manager
  depthSpaceDimensions : Rectangle
[read-only] Returns the depth space dimensions.
KV2Manager
  infraredFrameBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the infrared frame with the size of the depthSpaceDimension rectangle.
KV2Manager
  infraredFrameMappedToColorSpaceBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the infrared frame with the size of the colorSpaceDimension rectangle.
KV2Manager
  infraredFrameMappingToColorSpaceUpdated : int
[read-only] Returns whether the infrared frame to color space mapping was updated during the last update cycle.
KV2Manager
  infraredFrameUpdated : int
[read-only] Returns whether the infrared frame was updated during the last update cycle.
KV2Manager
  longExposureInfraredFrameBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the long exposure infrared frame with the size of the depthSpaceDimension rectangle.
KV2Manager
  longExposureInfraredFrameMappedToColorSpaceBmd : BitmapData
[read-only] Returns a BitmapData filled with pixel data of the long exposure infrared frame with the size of the colorSpaceDimension rectangle.
KV2Manager
  longExposureInfraredFrameMappingToColorSpaceUpdated : int
[read-only] Returns whether the long exposure infrared frame to color space mapping was updated during the last update cycle.
KV2Manager
  longExposureInfraredFrameUpdated : int
[read-only] Returns whether the long exposure infrared frame was updated during the last update cycle.
KV2Manager
Public Methods
 MethodDefined By
  
Initializes internal data structures.
KV2Manager
  
start(config:KV2Config):int
Starts the Kinect sensor and initializes the data streams according to your settings in KV2Config. If you change a setting in KVConfig, you need to call this method again to restart the Kinect sensor. A currently running instance of the Kinect sensor will be disposed by this call.
KV2Manager
  
stop():int
Stops all data streams and the Kinect sensor.
KV2Manager
  
Updates the Kinect sensor body data: body frame visual gesture builder frame
KV2Manager
  
Updates all Kinect sensor image data streams: color frame depth frame infrared frame long exposure infrared frame body index frame and all their mappings into other coordinate spaces: color to depth depth to color infrared to color long exposure infrared to color body index to color This method will always return OK.
KV2Manager
Public Constants
 ConstantDefined By
  LICENCE : String = (KV2_ANE_TK060515 trial)
[static] The license number with release date and type of license.
KV2Manager
  VERSION : String = KV2 v1.0.2
[static] The current version of this ANE.
KV2Manager
Property Detail
bodiesproperty
bodies:Vector.<KV2Body>  [read-only]

Returns a Vector of length KV2Body.BODY_COUNT of KV2Body objects.


Implementation
    public function get bodies():Vector.<KV2Body>
bodyIndexFrameBmdproperty 
bodyIndexFrameBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the body index frame with the size of the depthSpaceDimension rectangle.


Implementation
    public function get bodyIndexFrameBmd():BitmapData
bodyIndexFrameMappedToColorSpaceBmdproperty 
bodyIndexFrameMappedToColorSpaceBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the body index frame with the size of the colorSpaceDimension rectangle.


Implementation
    public function get bodyIndexFrameMappedToColorSpaceBmd():BitmapData
bodyIndexFrameMappingToColorSpaceUpdatedproperty 
bodyIndexFrameMappingToColorSpaceUpdated:int  [read-only]

Returns whether the body index frame to color space mapping was updated during the last update cycle.


Implementation
    public function get bodyIndexFrameMappingToColorSpaceUpdated():int
bodyIndexFrameUpdatedproperty 
bodyIndexFrameUpdated:int  [read-only]

Returns whether the body index frame was updated during the last update cycle.


Implementation
    public function get bodyIndexFrameUpdated():int
colorFrameBmdproperty 
colorFrameBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the color frame with the size of the colorSpaceDimension rectangle.


Implementation
    public function get colorFrameBmd():BitmapData
colorFrameMappedToDepthSpaceBmdproperty 
colorFrameMappedToDepthSpaceBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the color frame with the size of the depthSpaceDimension rectangle.


Implementation
    public function get colorFrameMappedToDepthSpaceBmd():BitmapData
colorFrameMappingToDepthSpaceUpdatedproperty 
colorFrameMappingToDepthSpaceUpdated:int  [read-only]

Returns whether the color frame to depth space mapping was updated during the last update cycle.


Implementation
    public function get colorFrameMappingToDepthSpaceUpdated():int
colorFrameUpdatedproperty 
colorFrameUpdated:int  [read-only]

Returns whether the color frame was updated during the last update cycle.


Implementation
    public function get colorFrameUpdated():int
colorSpaceDimensionsproperty 
colorSpaceDimensions:Rectangle  [read-only]

Returns the color space dimensions. At the time of writing this is full HD (1920x1080) for the colored camera stream.


Implementation
    public function get colorSpaceDimensions():Rectangle
depthFrameBmdproperty 
depthFrameBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the depth frame with the size of the depthSpaceDimension rectangle.


Implementation
    public function get depthFrameBmd():BitmapData
depthFrameMappedToColorSpaceBmdproperty 
depthFrameMappedToColorSpaceBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the depth frame with the size of the colorSpaceDimension rectangle.


Implementation
    public function get depthFrameMappedToColorSpaceBmd():BitmapData
depthFrameMappingToColorSpaceUpdatedproperty 
depthFrameMappingToColorSpaceUpdated:int  [read-only]

Returns whether the depth frame to color space mapping was updated during the last update cycle.


Implementation
    public function get depthFrameMappingToColorSpaceUpdated():int
depthFrameUpdatedproperty 
depthFrameUpdated:int  [read-only]

Returns whether the depth frame was updated during the last update cycle.


Implementation
    public function get depthFrameUpdated():int
depthSpaceDimensionsproperty 
depthSpaceDimensions:Rectangle  [read-only]

Returns the depth space dimensions. At the time of writing this is full HD (512x424) for all other image data streams: depth, infrared, long exposure infrared, body index.


Implementation
    public function get depthSpaceDimensions():Rectangle
infraredFrameBmdproperty 
infraredFrameBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the infrared frame with the size of the depthSpaceDimension rectangle.


Implementation
    public function get infraredFrameBmd():BitmapData
infraredFrameMappedToColorSpaceBmdproperty 
infraredFrameMappedToColorSpaceBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the infrared frame with the size of the colorSpaceDimension rectangle.


Implementation
    public function get infraredFrameMappedToColorSpaceBmd():BitmapData
infraredFrameMappingToColorSpaceUpdatedproperty 
infraredFrameMappingToColorSpaceUpdated:int  [read-only]

Returns whether the infrared frame to color space mapping was updated during the last update cycle.


Implementation
    public function get infraredFrameMappingToColorSpaceUpdated():int
infraredFrameUpdatedproperty 
infraredFrameUpdated:int  [read-only]

Returns whether the infrared frame was updated during the last update cycle.


Implementation
    public function get infraredFrameUpdated():int
longExposureInfraredFrameBmdproperty 
longExposureInfraredFrameBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the long exposure infrared frame with the size of the depthSpaceDimension rectangle.


Implementation
    public function get longExposureInfraredFrameBmd():BitmapData
longExposureInfraredFrameMappedToColorSpaceBmdproperty 
longExposureInfraredFrameMappedToColorSpaceBmd:BitmapData  [read-only]

Returns a BitmapData filled with pixel data of the long exposure infrared frame with the size of the colorSpaceDimension rectangle.


Implementation
    public function get longExposureInfraredFrameMappedToColorSpaceBmd():BitmapData
longExposureInfraredFrameMappingToColorSpaceUpdatedproperty 
longExposureInfraredFrameMappingToColorSpaceUpdated:int  [read-only]

Returns whether the long exposure infrared frame to color space mapping was updated during the last update cycle.


Implementation
    public function get longExposureInfraredFrameMappingToColorSpaceUpdated():int
longExposureInfraredFrameUpdatedproperty 
longExposureInfraredFrameUpdated:int  [read-only]

Returns whether the long exposure infrared frame was updated during the last update cycle.


Implementation
    public function get longExposureInfraredFrameUpdated():int
Constructor Detail
KV2Manager()Constructor
public function KV2Manager()

Initializes internal data structures.

Method Detail
start()method
public final function start(config:KV2Config):int

Starts the Kinect sensor and initializes the data streams according to your settings in KV2Config.

If you change a setting in KVConfig, you need to call this method again to restart the Kinect sensor.

A currently running instance of the Kinect sensor will be disposed by this call.

Parameters

config:KV2Config — a KV2Config instance

Returns
int — a KV2Code value (either OK, FAIL or CONTEXT_UNAVAILABLE)
stop()method 
public final function stop():int

Stops all data streams and the Kinect sensor.

Returns
int — a KV2Code value (either OK or CONTEXT_UNAVAILABLE)
updateBodies()method 
public final function updateBodies():int

Updates the Kinect sensor body data:

Returns
int — a KV2Code value (either OK, FAIL or CONTEXT_UNAVAILABLE)
updateImages()method 
public final function updateImages():int

Updates all Kinect sensor image data streams:

and all their mappings into other coordinate spaces:

This method will always return OK. You can check which data streams where successfully updated by retrieving their xyzUpdated KV2Code values.

Returns
int — a KV2Code value (either OK or CONTEXT_UNAVAILABLE)
Constant Detail
LICENCEConstant
public static const LICENCE:String = (KV2_ANE_TK060515 trial)

The license number with release date and type of license. If you need a commercial license, just contact us via email or our contact form at http://www.tastenkunst.com/#/contact

VERSIONConstant 
public static const VERSION:String = KV2 v1.0.2

The current version of this ANE.