C# Class HandInput.Util.PlayerDetector

A detector for player and player skin.
Show file Open project: ushadow/handinput Class Usage Examples

Public Properties

Property Type Description
DepthSkinMask Byte>.Image

Public Methods

Method Description
FilterPlayer ( short depthFrame, byte colorPixelData ) : void

Updates the player mask and the depth image.

FilterPlayerContourSkin ( short depthFrame, byte colorFrame ) : void
PlayerDetector ( int width, int height, CoordinateConverter mapper, int bufferSize = 1 ) : System
SmoothSkin ( Rectangle roi ) : void
ToWorldDepth ( double depth ) : int
UpdateMasks ( short depthFrame, byte colorPixelData ) : void

Updates the player and skin masks without fitering out the player and the skin region.

UpdateMasks ( short depthFrame, byte colorPixelData, Rectangle roi, bool filterPlayer = false, bool filterSkin = false ) : void

Updates both skin mask and player mask.

UpdatePlayerDepthImage ( short depthFrame, Byte playerMask, Byte skinMask, Rectangle roi ) : void
UpdatePlayerDepthImage ( short depthFrame, Seq contour, Byte skinMask ) : void

Updates player depth image using the player contour.

UpdatePlayerMask ( short depthFrame ) : void

Updates depth player masks.

Private Methods

Method Description
FindBoundingBox ( ) : Rectangle
FindPlayerContour ( Byte>.Image mask ) : Seq
IsFilteredPixel ( Byte playerMask, Byte skinMask, int x, int y, int depth ) : bool
IsPlayerPixel ( Seq contour, Byte skinMask, int x, int y, int depth ) : bool

Method Details

FilterPlayer() public method

Updates the player mask and the depth image.
public FilterPlayer ( short depthFrame, byte colorPixelData ) : void
depthFrame short
colorPixelData byte
return void

FilterPlayerContourSkin() public method

public FilterPlayerContourSkin ( short depthFrame, byte colorFrame ) : void
depthFrame short
colorFrame byte
return void

PlayerDetector() public method

public PlayerDetector ( int width, int height, CoordinateConverter mapper, int bufferSize = 1 ) : System
width int
height int
mapper CoordinateConverter
bufferSize int
return System

SmoothSkin() public method

public SmoothSkin ( Rectangle roi ) : void
roi System.Drawing.Rectangle
return void

ToWorldDepth() public static method

public static ToWorldDepth ( double depth ) : int
depth double
return int

UpdateMasks() public method

Updates the player and skin masks without fitering out the player and the skin region.
public UpdateMasks ( short depthFrame, byte colorPixelData ) : void
depthFrame short
colorPixelData byte
return void

UpdateMasks() public method

Updates both skin mask and player mask.
public UpdateMasks ( short depthFrame, byte colorPixelData, Rectangle roi, bool filterPlayer = false, bool filterSkin = false ) : void
depthFrame short
colorPixelData byte
roi System.Drawing.Rectangle ROI in depth image.
filterPlayer bool
filterSkin bool
return void

UpdatePlayerDepthImage() public method

public UpdatePlayerDepthImage ( short depthFrame, Byte playerMask, Byte skinMask, Rectangle roi ) : void
depthFrame short
playerMask Byte
skinMask Byte
roi System.Drawing.Rectangle
return void

UpdatePlayerDepthImage() public method

Updates player depth image using the player contour.
public UpdatePlayerDepthImage ( short depthFrame, Seq contour, Byte skinMask ) : void
depthFrame short
contour Seq
skinMask Byte
return void

UpdatePlayerMask() public method

Updates depth player masks.
public UpdatePlayerMask ( short depthFrame ) : void
depthFrame short
return void

Property Details

DepthSkinMask public property

public Image DepthSkinMask
return Byte>.Image