C# Class Kinect.KinectInterop

KinectInterop is a class that contains utility and interop functions and deals with different kinds of sensor interfaces.
Afficher le fichier Open project: BrainProject/UnityTemp Class Usage Examples

Méthodes publiques

Свойство Type Description
JointBaseDir Vector3[]
SensorInterfaceOrder System.Type[]

Méthodes publiques

Méthode Description
CloseSensor ( SensorData sensorData ) : void
CopyFile ( string sourceFilePath, string targetFilePath, bool &bOneCopied, bool &bAllCopied ) : bool
CopyResourceFile ( string targetFilePath, string resFileName, bool &bOneCopied, bool &bAllCopied ) : bool
DeleteNativeLib ( string sLibName, bool bUnloadLib ) : void
DrawLine ( Texture2D a_Texture, int x1, int y1, int x2, int y2, Color a_Color ) : void
FinishBackgroundRemoval ( SensorData sensorData ) : void
FreeMultiSourceFrame ( SensorData sensorData ) : void
GetBodyFrameAsCsv ( SensorData sensorData, BodyFrameData &bodyFrame, long &liRelTime, float &fUnityTime ) : string
GetForegroundFrameLength ( SensorData sensorData, bool isHiResPrefered ) : int
GetForegroundFrameRect ( SensorData sensorData, bool isHiResPrefered ) : Rect
GetMirrorJoint ( JointType joint ) : JointType
GetMultiSourceFrame ( SensorData sensorData ) : bool
GetSensorType ( ) : string
GetTargetDllPath ( string sAppPath, bool bIs64bitApp ) : string
GetUnzippedEntrySize ( string resZipFileName, string sEntryName ) : long
InitBackgroundRemoval ( SensorData sensorData, bool isHiResPrefered ) : bool
InitSensorInterfaces ( bool bOnceRestarted, bool &bNeedRestart ) : List
Is64bitArchitecture ( ) : bool
IsDirectX11Available ( ) : bool
IsOpenCvAvailable ( bool &bNeedRestart ) : bool
LoadNativeLib ( string sLibName ) : bool
MapColorFrameToDepthCoords ( SensorData sensorData, Vector2 &vDepthCoords ) : bool
MapDepthFrameToColorCoords ( SensorData sensorData, Vector2 &vColorCoords ) : bool
MapDepthPointToColorCoords ( SensorData sensorData, Vector2 depthPos, ushort depthVal ) : Vector2
MapDepthPointToSpaceCoords ( SensorData sensorData, Vector2 depthPos, ushort depthVal ) : Vector3
MapSpacePointToDepthCoords ( SensorData sensorData, Vector3 kinectPos ) : Vector2
OpenDefaultSensor ( List listInterfaces, FrameSource dwFlags, float sensorAngle, bool bUseMultiSource ) : SensorData
PollBodyFrame ( SensorData sensorData, BodyFrameData &bodyFrame, Matrix4x4 &kinectToWorld ) : bool
PollColorFrame ( SensorData sensorData ) : bool
PollDepthFrame ( SensorData sensorData, bool bLimitedUsers, ICollection alTrackedIndexes ) : bool
PollForegroundFrame ( SensorData sensorData, bool isHiResPrefered, Color32 defaultColor, bool bLimitedUsers, ICollection alTrackedIndexes, byte &fgImageFrame ) : bool
PollInfraredFrame ( SensorData sensorData ) : bool
RecalcBoneDirs ( SensorData sensorData, BodyData &bodyData ) : void
RenderDepth2ColorTex ( SensorData sensorData ) : bool
RenderTex2Tex2D ( RenderTexture rt, Texture2D &tex ) : bool
RestartLevel ( GameObject parentObject, string callerName ) : void
SetBodyFrameFromCsv ( string sCsvLine, SensorData sensorData, BodyFrameData &bodyFrame, Matrix4x4 &kinectToWorld ) : bool
UnzipResourceDirectory ( string targetDirPath, string resZipFileName, string checkForDir ) : bool
UnzipResourceFiles ( string>.Dictionary dictFilesToUnzip, string resZipFileName, bool &bOneCopied, bool &bAllCopied ) : bool
UpdateBackgroundRemoval ( SensorData sensorData, bool isHiResPrefered, Color32 defaultColor ) : bool
UpdateSensorData ( SensorData sensorData ) : bool

Private Methods

Méthode Description
ApplyErodeDilate ( RenderTexture source, RenderTexture destination, Material erodeMaterial, Material dilateMaterial, int erodeIterations, int dilateIterations ) : void
ApplyImageBlur ( RenderTexture source, RenderTexture destination, Material blurMaterial ) : void
CalcBodyFrameBoneDirs ( SensorData sensorData, BodyFrameData &bodyFrame ) : void
FreeLibrary ( IntPtr hModule ) : bool
GetForegroundAlphaFrame ( SensorData sensorData, bool bLimitedUsers, ICollection alTrackedIndexes, byte &fgAlphaFrame ) : bool
LoadLibrary ( [ lpFileName ) : IntPtr

Method Details

CloseSensor() public static méthode

public static CloseSensor ( SensorData sensorData ) : void
sensorData SensorData
Résultat void

CopyFile() public static méthode

public static CopyFile ( string sourceFilePath, string targetFilePath, bool &bOneCopied, bool &bAllCopied ) : bool
sourceFilePath string
targetFilePath string
bOneCopied bool
bAllCopied bool
Résultat bool

CopyResourceFile() public static méthode

public static CopyResourceFile ( string targetFilePath, string resFileName, bool &bOneCopied, bool &bAllCopied ) : bool
targetFilePath string
resFileName string
bOneCopied bool
bAllCopied bool
Résultat bool

DeleteNativeLib() public static méthode

public static DeleteNativeLib ( string sLibName, bool bUnloadLib ) : void
sLibName string
bUnloadLib bool
Résultat void

DrawLine() public static méthode

public static DrawLine ( Texture2D a_Texture, int x1, int y1, int x2, int y2, Color a_Color ) : void
a_Texture UnityEngine.Texture2D
x1 int
y1 int
x2 int
y2 int
a_Color Color
Résultat void

FinishBackgroundRemoval() public static méthode

public static FinishBackgroundRemoval ( SensorData sensorData ) : void
sensorData SensorData
Résultat void

FreeMultiSourceFrame() public static méthode

public static FreeMultiSourceFrame ( SensorData sensorData ) : void
sensorData SensorData
Résultat void

GetBodyFrameAsCsv() public static méthode

public static GetBodyFrameAsCsv ( SensorData sensorData, BodyFrameData &bodyFrame, long &liRelTime, float &fUnityTime ) : string
sensorData SensorData
bodyFrame BodyFrameData
liRelTime long
fUnityTime float
Résultat string

GetForegroundFrameLength() public static méthode

public static GetForegroundFrameLength ( SensorData sensorData, bool isHiResPrefered ) : int
sensorData SensorData
isHiResPrefered bool
Résultat int

GetForegroundFrameRect() public static méthode

public static GetForegroundFrameRect ( SensorData sensorData, bool isHiResPrefered ) : Rect
sensorData SensorData
isHiResPrefered bool
Résultat UnityEngine.Rect

GetMirrorJoint() public static méthode

public static GetMirrorJoint ( JointType joint ) : JointType
joint JointType
Résultat JointType

GetMultiSourceFrame() public static méthode

public static GetMultiSourceFrame ( SensorData sensorData ) : bool
sensorData SensorData
Résultat bool

GetSensorType() public static méthode

public static GetSensorType ( ) : string
Résultat string

GetTargetDllPath() public static méthode

public static GetTargetDllPath ( string sAppPath, bool bIs64bitApp ) : string
sAppPath string
bIs64bitApp bool
Résultat string

GetUnzippedEntrySize() public static méthode

public static GetUnzippedEntrySize ( string resZipFileName, string sEntryName ) : long
resZipFileName string
sEntryName string
Résultat long

InitBackgroundRemoval() public static méthode

public static InitBackgroundRemoval ( SensorData sensorData, bool isHiResPrefered ) : bool
sensorData SensorData
isHiResPrefered bool
Résultat bool

InitSensorInterfaces() public static méthode

public static InitSensorInterfaces ( bool bOnceRestarted, bool &bNeedRestart ) : List
bOnceRestarted bool
bNeedRestart bool
Résultat List

Is64bitArchitecture() public static méthode

public static Is64bitArchitecture ( ) : bool
Résultat bool

IsDirectX11Available() public static méthode

public static IsDirectX11Available ( ) : bool
Résultat bool

IsOpenCvAvailable() public static méthode

public static IsOpenCvAvailable ( bool &bNeedRestart ) : bool
bNeedRestart bool
Résultat bool

LoadNativeLib() public static méthode

public static LoadNativeLib ( string sLibName ) : bool
sLibName string
Résultat bool

MapColorFrameToDepthCoords() public static méthode

public static MapColorFrameToDepthCoords ( SensorData sensorData, Vector2 &vDepthCoords ) : bool
sensorData SensorData
vDepthCoords Vector2
Résultat bool

MapDepthFrameToColorCoords() public static méthode

public static MapDepthFrameToColorCoords ( SensorData sensorData, Vector2 &vColorCoords ) : bool
sensorData SensorData
vColorCoords Vector2
Résultat bool

MapDepthPointToColorCoords() public static méthode

public static MapDepthPointToColorCoords ( SensorData sensorData, Vector2 depthPos, ushort depthVal ) : Vector2
sensorData SensorData
depthPos Vector2
depthVal ushort
Résultat Vector2

MapDepthPointToSpaceCoords() public static méthode

public static MapDepthPointToSpaceCoords ( SensorData sensorData, Vector2 depthPos, ushort depthVal ) : Vector3
sensorData SensorData
depthPos Vector2
depthVal ushort
Résultat Vector3

MapSpacePointToDepthCoords() public static méthode

public static MapSpacePointToDepthCoords ( SensorData sensorData, Vector3 kinectPos ) : Vector2
sensorData SensorData
kinectPos Vector3
Résultat Vector2

OpenDefaultSensor() public static méthode

public static OpenDefaultSensor ( List listInterfaces, FrameSource dwFlags, float sensorAngle, bool bUseMultiSource ) : SensorData
listInterfaces List
dwFlags OpenCvSharp.FrameSource
sensorAngle float
bUseMultiSource bool
Résultat SensorData

PollBodyFrame() public static méthode

public static PollBodyFrame ( SensorData sensorData, BodyFrameData &bodyFrame, Matrix4x4 &kinectToWorld ) : bool
sensorData SensorData
bodyFrame BodyFrameData
kinectToWorld UnityEngine.Matrix4x4
Résultat bool

PollColorFrame() public static méthode

public static PollColorFrame ( SensorData sensorData ) : bool
sensorData SensorData
Résultat bool

PollDepthFrame() public static méthode

public static PollDepthFrame ( SensorData sensorData, bool bLimitedUsers, ICollection alTrackedIndexes ) : bool
sensorData SensorData
bLimitedUsers bool
alTrackedIndexes ICollection
Résultat bool

PollForegroundFrame() public static méthode

public static PollForegroundFrame ( SensorData sensorData, bool isHiResPrefered, Color32 defaultColor, bool bLimitedUsers, ICollection alTrackedIndexes, byte &fgImageFrame ) : bool
sensorData SensorData
isHiResPrefered bool
defaultColor UnityEngine.Color32
bLimitedUsers bool
alTrackedIndexes ICollection
fgImageFrame byte
Résultat bool

PollInfraredFrame() public static méthode

public static PollInfraredFrame ( SensorData sensorData ) : bool
sensorData SensorData
Résultat bool

RecalcBoneDirs() public static méthode

public static RecalcBoneDirs ( SensorData sensorData, BodyData &bodyData ) : void
sensorData SensorData
bodyData BodyData
Résultat void

RenderDepth2ColorTex() public static méthode

public static RenderDepth2ColorTex ( SensorData sensorData ) : bool
sensorData SensorData
Résultat bool

RenderTex2Tex2D() public static méthode

public static RenderTex2Tex2D ( RenderTexture rt, Texture2D &tex ) : bool
rt UnityEngine.RenderTexture
tex UnityEngine.Texture2D
Résultat bool

RestartLevel() public static méthode

public static RestartLevel ( GameObject parentObject, string callerName ) : void
parentObject UnityEngine.GameObject
callerName string
Résultat void

SetBodyFrameFromCsv() public static méthode

public static SetBodyFrameFromCsv ( string sCsvLine, SensorData sensorData, BodyFrameData &bodyFrame, Matrix4x4 &kinectToWorld ) : bool
sCsvLine string
sensorData SensorData
bodyFrame BodyFrameData
kinectToWorld UnityEngine.Matrix4x4
Résultat bool

UnzipResourceDirectory() public static méthode

public static UnzipResourceDirectory ( string targetDirPath, string resZipFileName, string checkForDir ) : bool
targetDirPath string
resZipFileName string
checkForDir string
Résultat bool

UnzipResourceFiles() public static méthode

public static UnzipResourceFiles ( string>.Dictionary dictFilesToUnzip, string resZipFileName, bool &bOneCopied, bool &bAllCopied ) : bool
dictFilesToUnzip string>.Dictionary
resZipFileName string
bOneCopied bool
bAllCopied bool
Résultat bool

UpdateBackgroundRemoval() public static méthode

public static UpdateBackgroundRemoval ( SensorData sensorData, bool isHiResPrefered, Color32 defaultColor ) : bool
sensorData SensorData
isHiResPrefered bool
defaultColor UnityEngine.Color32
Résultat bool

UpdateSensorData() public static méthode

public static UpdateSensorData ( SensorData sensorData ) : bool
sensorData SensorData
Résultat bool

Property Details

JointBaseDir public_oe static_oe property

public static Vector3[] JointBaseDir
Résultat Vector3[]

SensorInterfaceOrder public_oe static_oe property

public static Type[],System SensorInterfaceOrder
Résultat System.Type[]