C# Class Kinect.Kinect2Interface

Inheritance: DepthSensorInterface
Show file Open project: BrainProject/UnityTemp

Public Properties

Property Type Description
coordMapper CoordinateMapper
faceFrameReaders FaceFrameReader[]
faceFrameResults FaceFrameResult[]
faceFrameSources FaceFrameSource[]
hdFaceAlignments FaceAlignment[]
hdFaceFrameReaders HighDefinitionFaceFrameReader[]
hdFaceFrameSources HighDefinitionFaceFrameSource[]
hdFaceModels FaceModel[]
kinectSensor KinectSensor
sensorAlwaysAvailable bool

Public Methods

Method Description
AddGrammarPhrase ( string sFromRule, string sToRule, string sPhrase, bool bClearRulePhrases, bool bCommitGrammar ) : int
ClearRecognizedPhrase ( ) : void
CloseSensor ( KinectInterop sensorData ) : void
FinishBackgroundRemoval ( KinectInterop sensorData ) : void
FinishFaceTracking ( ) : void
FinishSpeechRecognition ( ) : void
FixJointOrientations ( KinectInterop sensorData, KinectInterop &bodyData ) : void
FreeMultiSourceFrame ( KinectInterop sensorData ) : void
FreeSensorInterface ( bool bDeleteLibs ) : void
GetAnimUnits ( long userId, float>.Dictionary &dictAU ) : bool
GetFaceModelTriangles ( bool bMirrored, int &avTriangles ) : bool
GetFaceModelTrianglesCount ( ) : int
GetFaceModelVertices ( long userId, Vector3 &avVertices ) : bool
GetFaceModelVerticesCount ( long userId ) : int
GetFaceRect ( long userId, Rect &faceRect ) : bool
GetForegroundFrameLength ( KinectInterop sensorData, bool isHiResPrefered ) : int
GetForegroundFrameRect ( KinectInterop sensorData, bool isHiResPrefered ) : Rect
GetHeadPosition ( long userId, Vector3 &headPos ) : bool
GetHeadRotation ( long userId, Quaternion &headRot ) : bool
GetJointIndex ( KinectInterop joint ) : int
GetMultiSourceFrame ( KinectInterop sensorData ) : bool
GetNextJoint ( KinectInterop joint ) : KinectInterop.JointType
GetParentJoint ( KinectInterop joint ) : KinectInterop.JointType
GetPhraseConfidence ( ) : float
GetRecognizedPhraseTag ( ) : string
GetSensorPlatform ( ) : KinectInterop.DepthSensorPlatform
GetSensorsCount ( ) : int
GetShapeUnits ( long userId, float>.Dictionary &dictSU ) : bool
InitBackgroundRemoval ( KinectInterop sensorData, bool isHiResPrefered ) : bool
InitFaceTracking ( bool bUseFaceModel, bool bDrawFaceRect ) : bool
InitSensorInterface ( bool bCopyLibs, bool &bNeedRestart ) : bool
InitSpeechRecognition ( string sRecoCriteria, bool bUseKinect, bool bAdaptationOff ) : int
IsBRHiResSupported ( ) : bool
IsBackgroundRemovalActive ( ) : bool
IsBackgroundRemovalAvailable ( bool &bNeedRestart ) : bool
IsBodyTurned ( KinectInterop &bodyData ) : bool
IsDrawFaceRect ( ) : bool
IsFaceTracked ( long userId ) : bool
IsFaceTrackingActive ( ) : bool
IsFaceTrackingAvailable ( bool &bNeedRestart ) : bool
IsPhraseRecognized ( ) : bool
IsSensorAvailable ( ) : bool
IsSpeechEnded ( ) : bool
IsSpeechRecognitionAvailable ( bool &bNeedRestart ) : bool
IsSpeechStarted ( ) : bool
LoadSpeechGrammar ( string sFileName, short iLangCode, bool bDynamic ) : int
MapColorFrameToDepthCoords ( KinectInterop sensorData, Vector2 &vDepthCoords ) : bool
MapDepthFrameToColorCoords ( KinectInterop sensorData, Vector2 &vColorCoords ) : bool
MapDepthPointToColorCoords ( KinectInterop sensorData, Vector2 depthPos, ushort depthVal ) : Vector2
MapDepthPointToSpaceCoords ( KinectInterop sensorData, Vector2 depthPos, ushort depthVal ) : Vector3
MapSpacePointToDepthCoords ( KinectInterop sensorData, Vector3 spacePos ) : Vector2
OpenDefaultSensor ( KinectInterop dwFlags, float sensorAngle, bool bUseMultiSource ) : KinectInterop.SensorData
PollBodyFrame ( KinectInterop sensorData, KinectInterop &bodyFrame, Matrix4x4 &kinectToWorld ) : bool
PollColorFrame ( KinectInterop sensorData ) : bool
PollDepthFrame ( KinectInterop sensorData ) : bool
PollForegroundFrame ( KinectInterop sensorData, bool isHiResPrefered, Color32 defaultColor, bool bLimitedUsers, ICollection alTrackedIndexes, byte &foregroundImage ) : bool
PollInfraredFrame ( KinectInterop sensorData ) : bool
SetSpeechConfidence ( float fConfidence ) : void
UpdateBackgroundRemoval ( KinectInterop sensorData, bool isHiResPrefered, Color32 defaultColor ) : bool
UpdateFaceTracking ( ) : bool
UpdateSensorData ( KinectInterop sensorData ) : bool
UpdateSpeechRecognition ( ) : int
VisualizeFaceTrackerOnColorTex ( Texture2D texColor ) : void

Private Methods

Method Description
AddGrammarPhraseNative ( [ sFromRule, [ sToRule, [ sPhrase, bool bClearRule, bool bCommitGrammar ) : int
ClearRecognizedPhraseNative ( ) : void
DrawLine ( Texture2D a_Texture, Vector2 ptStart, Vector2 ptEnd, UnityEngine a_Color ) : void
FinishSpeechRecognizerNative ( ) : void
GetFaceSourceIndex ( Microsoft.Kinect.Face.FaceFrameSource faceFrameSource ) : int
GetPhraseConfidenceNative ( ) : float
GetRecognizedPhraseTagNative ( ) : IntPtr
InitSpeechRecognizerNative ( [ sRecoCriteria, bool bUseKinect, bool bAdaptationOff ) : int
IsPhraseRecognizedNative ( ) : bool
IsSpeechEndedNative ( ) : bool
IsSpeechStartedNative ( ) : bool
LoadSpeechGrammarNative ( [ sFileName, short iNewLangCode, bool bDynamic ) : int
SetSpeechConfidenceNative ( float fConfidence ) : void
UpdateSpeechRecognizerNative ( ) : int
ValidateFaceBox ( FaceFrameResult faceResult ) : bool

Method Details

AddGrammarPhrase() public method

public AddGrammarPhrase ( string sFromRule, string sToRule, string sPhrase, bool bClearRulePhrases, bool bCommitGrammar ) : int
sFromRule string
sToRule string
sPhrase string
bClearRulePhrases bool
bCommitGrammar bool
return int

ClearRecognizedPhrase() public method

public ClearRecognizedPhrase ( ) : void
return void

CloseSensor() public method

public CloseSensor ( KinectInterop sensorData ) : void
sensorData KinectInterop
return void

FinishBackgroundRemoval() public method

public FinishBackgroundRemoval ( KinectInterop sensorData ) : void
sensorData KinectInterop
return void

FinishFaceTracking() public method

public FinishFaceTracking ( ) : void
return void

FinishSpeechRecognition() public method

public FinishSpeechRecognition ( ) : void
return void

FixJointOrientations() public method

public FixJointOrientations ( KinectInterop sensorData, KinectInterop &bodyData ) : void
sensorData KinectInterop
bodyData KinectInterop
return void

FreeMultiSourceFrame() public method

public FreeMultiSourceFrame ( KinectInterop sensorData ) : void
sensorData KinectInterop
return void

FreeSensorInterface() public method

public FreeSensorInterface ( bool bDeleteLibs ) : void
bDeleteLibs bool
return void

GetAnimUnits() public method

public GetAnimUnits ( long userId, float>.Dictionary &dictAU ) : bool
userId long
dictAU float>.Dictionary
return bool

GetFaceModelTriangles() public method

public GetFaceModelTriangles ( bool bMirrored, int &avTriangles ) : bool
bMirrored bool
avTriangles int
return bool

GetFaceModelTrianglesCount() public method

public GetFaceModelTrianglesCount ( ) : int
return int

GetFaceModelVertices() public method

public GetFaceModelVertices ( long userId, Vector3 &avVertices ) : bool
userId long
avVertices Vector3
return bool

GetFaceModelVerticesCount() public method

public GetFaceModelVerticesCount ( long userId ) : int
userId long
return int

GetFaceRect() public method

public GetFaceRect ( long userId, Rect &faceRect ) : bool
userId long
faceRect UnityEngine.Rect
return bool

GetForegroundFrameLength() public method

public GetForegroundFrameLength ( KinectInterop sensorData, bool isHiResPrefered ) : int
sensorData KinectInterop
isHiResPrefered bool
return int

GetForegroundFrameRect() public method

public GetForegroundFrameRect ( KinectInterop sensorData, bool isHiResPrefered ) : Rect
sensorData KinectInterop
isHiResPrefered bool
return UnityEngine.Rect

GetHeadPosition() public method

public GetHeadPosition ( long userId, Vector3 &headPos ) : bool
userId long
headPos Vector3
return bool

GetHeadRotation() public method

public GetHeadRotation ( long userId, Quaternion &headRot ) : bool
userId long
headRot UnityEngine.Quaternion
return bool

GetJointIndex() public method

public GetJointIndex ( KinectInterop joint ) : int
joint KinectInterop
return int

GetMultiSourceFrame() public method

public GetMultiSourceFrame ( KinectInterop sensorData ) : bool
sensorData KinectInterop
return bool

GetNextJoint() public method

public GetNextJoint ( KinectInterop joint ) : KinectInterop.JointType
joint KinectInterop
return KinectInterop.JointType

GetParentJoint() public method

public GetParentJoint ( KinectInterop joint ) : KinectInterop.JointType
joint KinectInterop
return KinectInterop.JointType

GetPhraseConfidence() public method

public GetPhraseConfidence ( ) : float
return float

GetRecognizedPhraseTag() public method

public GetRecognizedPhraseTag ( ) : string
return string

GetSensorPlatform() public method

public GetSensorPlatform ( ) : KinectInterop.DepthSensorPlatform
return KinectInterop.DepthSensorPlatform

GetSensorsCount() public method

public GetSensorsCount ( ) : int
return int

GetShapeUnits() public method

public GetShapeUnits ( long userId, float>.Dictionary &dictSU ) : bool
userId long
dictSU float>.Dictionary
return bool

InitBackgroundRemoval() public method

public InitBackgroundRemoval ( KinectInterop sensorData, bool isHiResPrefered ) : bool
sensorData KinectInterop
isHiResPrefered bool
return bool

InitFaceTracking() public method

public InitFaceTracking ( bool bUseFaceModel, bool bDrawFaceRect ) : bool
bUseFaceModel bool
bDrawFaceRect bool
return bool

InitSensorInterface() public method

public InitSensorInterface ( bool bCopyLibs, bool &bNeedRestart ) : bool
bCopyLibs bool
bNeedRestart bool
return bool

InitSpeechRecognition() public method

public InitSpeechRecognition ( string sRecoCriteria, bool bUseKinect, bool bAdaptationOff ) : int
sRecoCriteria string
bUseKinect bool
bAdaptationOff bool
return int

IsBRHiResSupported() public method

public IsBRHiResSupported ( ) : bool
return bool

IsBackgroundRemovalActive() public method

public IsBackgroundRemovalActive ( ) : bool
return bool

IsBackgroundRemovalAvailable() public method

public IsBackgroundRemovalAvailable ( bool &bNeedRestart ) : bool
bNeedRestart bool
return bool

IsBodyTurned() public method

public IsBodyTurned ( KinectInterop &bodyData ) : bool
bodyData KinectInterop
return bool

IsDrawFaceRect() public method

public IsDrawFaceRect ( ) : bool
return bool

IsFaceTracked() public method

public IsFaceTracked ( long userId ) : bool
userId long
return bool

IsFaceTrackingActive() public method

public IsFaceTrackingActive ( ) : bool
return bool

IsFaceTrackingAvailable() public method

public IsFaceTrackingAvailable ( bool &bNeedRestart ) : bool
bNeedRestart bool
return bool

IsPhraseRecognized() public method

public IsPhraseRecognized ( ) : bool
return bool

IsSensorAvailable() public method

public IsSensorAvailable ( ) : bool
return bool

IsSpeechEnded() public method

public IsSpeechEnded ( ) : bool
return bool

IsSpeechRecognitionAvailable() public method

public IsSpeechRecognitionAvailable ( bool &bNeedRestart ) : bool
bNeedRestart bool
return bool

IsSpeechStarted() public method

public IsSpeechStarted ( ) : bool
return bool

LoadSpeechGrammar() public method

public LoadSpeechGrammar ( string sFileName, short iLangCode, bool bDynamic ) : int
sFileName string
iLangCode short
bDynamic bool
return int

MapColorFrameToDepthCoords() public method

public MapColorFrameToDepthCoords ( KinectInterop sensorData, Vector2 &vDepthCoords ) : bool
sensorData KinectInterop
vDepthCoords Vector2
return bool

MapDepthFrameToColorCoords() public method

public MapDepthFrameToColorCoords ( KinectInterop sensorData, Vector2 &vColorCoords ) : bool
sensorData KinectInterop
vColorCoords Vector2
return bool

MapDepthPointToColorCoords() public method

public MapDepthPointToColorCoords ( KinectInterop sensorData, Vector2 depthPos, ushort depthVal ) : Vector2
sensorData KinectInterop
depthPos Vector2
depthVal ushort
return Vector2

MapDepthPointToSpaceCoords() public method

public MapDepthPointToSpaceCoords ( KinectInterop sensorData, Vector2 depthPos, ushort depthVal ) : Vector3
sensorData KinectInterop
depthPos Vector2
depthVal ushort
return Vector3

MapSpacePointToDepthCoords() public method

public MapSpacePointToDepthCoords ( KinectInterop sensorData, Vector3 spacePos ) : Vector2
sensorData KinectInterop
spacePos Vector3
return Vector2

OpenDefaultSensor() public method

public OpenDefaultSensor ( KinectInterop dwFlags, float sensorAngle, bool bUseMultiSource ) : KinectInterop.SensorData
dwFlags KinectInterop
sensorAngle float
bUseMultiSource bool
return KinectInterop.SensorData

PollBodyFrame() public method

public PollBodyFrame ( KinectInterop sensorData, KinectInterop &bodyFrame, Matrix4x4 &kinectToWorld ) : bool
sensorData KinectInterop
bodyFrame KinectInterop
kinectToWorld UnityEngine.Matrix4x4
return bool

PollColorFrame() public method

public PollColorFrame ( KinectInterop sensorData ) : bool
sensorData KinectInterop
return bool

PollDepthFrame() public method

public PollDepthFrame ( KinectInterop sensorData ) : bool
sensorData KinectInterop
return bool

PollForegroundFrame() public method

public PollForegroundFrame ( KinectInterop sensorData, bool isHiResPrefered, Color32 defaultColor, bool bLimitedUsers, ICollection alTrackedIndexes, byte &foregroundImage ) : bool
sensorData KinectInterop
isHiResPrefered bool
defaultColor UnityEngine.Color32
bLimitedUsers bool
alTrackedIndexes ICollection
foregroundImage byte
return bool

PollInfraredFrame() public method

public PollInfraredFrame ( KinectInterop sensorData ) : bool
sensorData KinectInterop
return bool

SetSpeechConfidence() public method

public SetSpeechConfidence ( float fConfidence ) : void
fConfidence float
return void

UpdateBackgroundRemoval() public method

public UpdateBackgroundRemoval ( KinectInterop sensorData, bool isHiResPrefered, Color32 defaultColor ) : bool
sensorData KinectInterop
isHiResPrefered bool
defaultColor Color32
return bool

UpdateFaceTracking() public method

public UpdateFaceTracking ( ) : bool
return bool

UpdateSensorData() public method

public UpdateSensorData ( KinectInterop sensorData ) : bool
sensorData KinectInterop
return bool

UpdateSpeechRecognition() public method

public UpdateSpeechRecognition ( ) : int
return int

VisualizeFaceTrackerOnColorTex() public method

public VisualizeFaceTrackerOnColorTex ( Texture2D texColor ) : void
texColor Texture2D
return void

Property Details

coordMapper public property

public CoordinateMapper coordMapper
return CoordinateMapper

faceFrameReaders public property

public FaceFrameReader[] faceFrameReaders
return FaceFrameReader[]

faceFrameResults public property

public FaceFrameResult[] faceFrameResults
return FaceFrameResult[]

faceFrameSources public property

public FaceFrameSource[] faceFrameSources
return FaceFrameSource[]

hdFaceAlignments public property

public FaceAlignment[] hdFaceAlignments
return FaceAlignment[]

hdFaceFrameReaders public property

public HighDefinitionFaceFrameReader[] hdFaceFrameReaders
return HighDefinitionFaceFrameReader[]

hdFaceFrameSources public property

public HighDefinitionFaceFrameSource[] hdFaceFrameSources
return HighDefinitionFaceFrameSource[]

hdFaceModels public property

public FaceModel[] hdFaceModels
return FaceModel[]

kinectSensor public property

public KinectSensor kinectSensor
return KinectSensor

sensorAlwaysAvailable public static property

public static bool sensorAlwaysAvailable
return bool