Skip to content

Matching Algorithm

Robbendebiene edited this page Mar 5, 2021 · 3 revisions

Matching Algorithm

Gesturefy supports two different gesture matching algorithms: Strict and Shape-Independent.

These algorithms take the gesture you perform while browsing and compares it with every gesture you've pre-recorded. The algorithms will calculate a score for every comparison (the deviation value) and execute the gesture that matches the best respectively has the lowest deviation value.

Algorithm: Strict

This compares the overall shape of the gestures, while the shape can be smaller or bigger in its total size. It does this by comparing the directions of one gesture with the directions of the other gesture that occupy the same section of length. This requires you to draw roughly the same shape that you've recorded previously.

Algorithm: Shape-Independent

This only compares the directions or angles of the gesture segments and does not take their lengths into account. From the algorithm's perspective you only sense the direction you are moving but not how long you are moving in one direction or another.

Differences

Below you will see some example gestures where the Strict algorithm does not detect them as similar while the Shape-Independent algorithm does.

Pro: You can draw your gestures less accurate:

pros

Cons: You cannot make use of length differences in your gestures, because the algorithm cannot distinguish them, thus it will treat all the following gestures as similar:

cons

Deviation tolerance

The deviation value ranges from 0 to 1 while 0 (min deviation) means perfect match and 1 (max deviation) means total mismatch. With the deviation tolerance you can control the allowed deviation a gesture is allowed to have to still count as a match. You can change this value in the options page under advanced settings.

Note: When choosing a value of 0.5 or higher you will most likely always get a match no matter how obscure you draw your gesture.