C# Class Kinect.Kinect1Interface

Inheritance: DepthSensorInterface
Mostrar archivo Open project: BrainProject/UnityTemp

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 &rectFace ) : 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, Color a_Color ) : void
FinishBackgroundRemovalNative ( ) : void
FinishFaceTrackingNative ( ) : void
FinishKinectInteraction ( ) : void
FinishSpeechRecognizerNative ( ) : void
GetAnimUnitsCountNative ( ) : int
GetAnimUnitsNative ( IntPtr afAU, int &iAUCount ) : bool
GetBackgroundRemovalFrameDataNative ( IntPtr btVideoBuf, uint &iVideoBufLen, bool bGetNewFrame ) : bool
GetBackgroundRemovalFrameLengthNative ( ) : int
GetColorFrameData ( IntPtr btVideoBuf, uint &iVideoBufLen, bool bGetNewFrame ) : bool
GetColorStreamHandle ( ) : IntPtr
GetDepthFrameData ( IntPtr shDepthBuf, uint &iDepthBufLen, bool bGetNewFrame ) : bool
GetDepthStreamHandle ( ) : IntPtr
GetFacePointsCountNative ( ) : int
GetFacePointsNative ( IntPtr avPoints, int &iPointsCount ) : bool
GetFaceRectNative ( FaceRect &pRectFace ) : bool
GetFaceTrackingIDNative ( ) : uint
GetHandStateAndConf ( uint skeletonId, bool isRightHand, uint handState, InteractionHandEventType handEvent, InteractionHandEventType>.Dictionary &lastHandEvent, KinectInterop &refHandState, KinectInterop &refHandConf ) : void
GetHeadPositionNative ( Vector4 &pvHeadPos ) : bool
GetHeadRotationNative ( Vector4 &pvHeadRot ) : bool
GetHeadScaleNative ( Vector4 &pvHeadScale ) : bool
GetInfraredFrameData ( IntPtr shInfraredBuf, uint &iInfraredBufLen, bool bGetNewFrame ) : bool
GetInteractorsCount ( ) : uint
GetKinectElevationAngle ( ) : int
GetLeftHandEvent ( uint player ) : InteractionHandEventType
GetLeftHandState ( uint player ) : uint
GetModelPointsCountNative ( ) : int
GetModelPointsNative ( IntPtr avPoints, int &iPointsCount ) : bool
GetNextSkeletonFrame ( uint dwWaitMs ) : int
GetNuiErrorString ( int hr ) : string
GetPhraseConfidenceNative ( ) : float
GetRecognizedPhraseTagNative ( ) : IntPtr
GetRightHandEvent ( uint player ) : InteractionHandEventType
GetRightHandState ( uint player ) : uint
GetShapeUnitsCountNative ( ) : int
GetShapeUnitsNative ( IntPtr afSU, int &iSUCount ) : bool
GetSkeletonFrameData ( Kinect.NuiSkeletonFrame &pSkeletonData, uint &iDataBufLen, bool bNewFrame ) : bool
GetSkeletonFrameLength ( ) : int
GetSkeletonTrackingID ( uint player ) : uint
GetTriangleCountNative ( ) : int
GetTrianglesNative ( IntPtr aiTriangles, int &iPointsCount ) : bool
InitBackgroundRemovalNative ( ) : int
InitFaceTrackingNative ( ) : int
InitKinectInteraction ( ) : int
InitKinectSensor ( NuiInitializeFlags dwFlags, bool bEnableEvents, int iColorResolution, int iDepthResolution, bool bNearMode ) : int
InitSpeechRecognizerNative ( [ sRecoCriteria, bool bUseKinect, bool bAdaptationOff ) : int
IsBackgroundRemovalActiveNative ( ) : bool
IsFaceTrackedNative ( ) : bool
IsPhraseRecognizedNative ( ) : bool
IsSpeechEndedNative ( ) : bool
IsSpeechStartedNative ( ) : bool
LoadSpeechGrammarNative ( [ sFileName, short iNewLangCode, bool bDynamic ) : int
NuiGetSensorCount ( int &pCount ) : int
NuiImageGetColorPixelCoordinatesFromDepthPixelAtResolution ( NuiImageResolution eColorResolution, NuiImageResolution eDepthResolution, Kinect.NuiImageViewArea &pcViewArea, int lDepthX, int lDepthY, ushort sDepthValue, int &plColorX, int &plColorY ) : int
NuiImageResolutionToSize ( NuiImageResolution res, int &refWidth, int &refHeight ) : bool
NuiSkeletonGetNextFrame ( uint dwMillisecondsToWait, Kinect.NuiSkeletonFrame &pSkeletonFrame ) : int
NuiTransformDepthImageToSkeleton ( float fDepthX, float fDepthY, int depthValue ) : Vector3
NuiTransformSkeletonToDepthImage ( Vector3 vPoint, float &pfDepthX, float &pfDepthY, float &pfDepthZ ) : void
NuiTransformSmooth ( Kinect.NuiSkeletonFrame &pSkeletonFrame, Kinect.NuiTransformSmoothParameters &pSmoothingParams ) : int
SetKinectElevationAngle ( int sensorAngle ) : int
SetSpeechConfidenceNative ( float fConfidence ) : void
ShutdownKinectSensor ( ) : void
UpdateBackgroundRemovalNative ( ) : int
UpdateFaceTrackingNative ( ) : int
UpdateKinectSensor ( ) : int
UpdateSpeechRecognizerNative ( ) : int

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 &rectFace ) : bool
userId long
rectFace 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 UnityEngine.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 UnityEngine.Texture2D
return void