C# Class DepthWrapper, casanova-mk2

Level of indirection for the depth image, provides: -a frames of depth image (no player information), -an array representing which players are detected, -a segmentation image for each player, -bounds for the segmentation of each player.
Inheritance: MonoBehaviour
Datei anzeigen Open project: vs-team/casanova-mk2 Class Usage Examples

Public Properties

Property Type Description
OriginalImage float[]
depthImgNormalizedBlurred float[]
depthImgNormalizedSmoothed float[]
devOrEmu DeviceOrEmulator,
rollingVarianceNormalized float[]
rollingVarianceNormalizedLastFrame float[]
storedFrames int

Public Methods

Method Description
LateUpdate ( ) : void
Start ( ) : void
Update ( ) : void
calcVariance ( float oldData, int index ) : float
calcVariance ( float oldData ) : float[]
getBlurred ( float normalDepth, float outputSmoothedDepth ) : void
lerp ( float oldValue, float newValue, float factor ) : float
lerpArray ( float oldValue, float newValue, float factor ) : float[]
normalize ( float target ) : float[]
pollDepth ( ) : bool

First call per frame checks if there is a new depth image and updates, returns true if there is new data Subsequent calls do nothing have the same return as the first call.

Private Methods

Method Description
processDepth ( ) : void

Method Details

LateUpdate() public method

public LateUpdate ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

calcVariance() public method

public calcVariance ( float oldData, int index ) : float
oldData float
index int
return float

calcVariance() public method

public calcVariance ( float oldData ) : float[]
oldData float
return float[]

getBlurred() public method

public getBlurred ( float normalDepth, float outputSmoothedDepth ) : void
normalDepth float
outputSmoothedDepth float
return void

lerp() public method

public lerp ( float oldValue, float newValue, float factor ) : float
oldValue float
newValue float
factor float
return float

lerpArray() public method

public lerpArray ( float oldValue, float newValue, float factor ) : float[]
oldValue float
newValue float
factor float
return float[]

normalize() public method

public normalize ( float target ) : float[]
target float
return float[]

pollDepth() public method

First call per frame checks if there is a new depth image and updates, returns true if there is new data Subsequent calls do nothing have the same return as the first call.
public pollDepth ( ) : bool
return bool

Property Details

OriginalImage public_oe property

public float[] OriginalImage
return float[]

depthImgNormalizedBlurred public_oe property

public float[] depthImgNormalizedBlurred
return float[]

depthImgNormalizedSmoothed public_oe property

public float[] depthImgNormalizedSmoothed
return float[]

devOrEmu public_oe property

public DeviceOrEmulator, devOrEmu
return DeviceOrEmulator,

rollingVarianceNormalized public_oe property

public float[] rollingVarianceNormalized
return float[]

rollingVarianceNormalizedLastFrame public_oe property

public float[] rollingVarianceNormalizedLastFrame
return float[]

storedFrames public_oe property

public int storedFrames
return int