Click or drag to resize

GestureLearnerRecognize Method

Try to recognize a gesture.

Namespace:  RavingBots.MagicGestures.AI
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public int Recognize(
	GestureData gesture,
	out float output
)

Parameters

gesture
Type: RavingBots.MagicGestures.ControllerGestureData
The gesture to recognize.
output
Type: SystemSingle
Set to the output of the neural network, or 0 if none of the outputs are above RecognitionThreshold.

Return Value

Type: Int32
The index of the gesture in the spell array given to StartTraining(SpellData). -1 if the input gesture has not been recognized or the network is not yet ready.
Remarks

This method preprocesses the input with GesturePreprocessor, and then feeds it to the MultilayerPerceptron. The network has 1 output for each configured spell, which denotes how close the input gesture is to that spell.

After calling Process(Single) the output which has the highest value and is above RecognitionThreshold corresponds to the recognized spell.

See Also