GestureInterface

public class GestureInterface

Methods

public static int GetFrameIndex()

Returns the frame index, which can be used to indicate detection status. Negative means stopped or error, 0 means starting, positive means up and running.

Returns:Frame index. If frame index is not changed, values of GetLeft() and GetRight() remains the same.
public static GestureResult GetLeft()

Get left hand result. Only meaningful if GetFrameIndex() returns positive value.

Do not modify the value of the return object.

public static GestureResult GetRight()

Get right hand result. Only meaningful if GetFrameIndex() returns positive value.

Do not modify the value of the return object.

public static GestureFailure Start(GestureOption option)

Start detection with given option.

NOTE: for Android phones, only 2D point mode is supported.

Parameters:
  • option – The option used to start detection. If option is null, default option is used. If option is not null, option.mode will be set to actual mode used if Start is successful.
Returns:

Success or failure reason.

public static void Stop()

Stop detection.

public static void UpdateResult()

Update frame index, left and right hand result.

You need to call this function periodically to get new detection result. The detection result is not changed until the next call of this function.

If frame index is negative, calling this function is a no-op.