Giter VIP home page Giter VIP logo

gesture-demo's Introduction

gesture-demo

Create a UI and API for xstroke gesture recognition algorithm

The alphabet file consists of a series of mode definitions which will have the following form: Optional: key, action, name Within modes, order determines precedence

{
  "mode_name": [
    {
       "regex": "147?89",
       "name": "letter L",
       "key": "L",
       "action": "ls /home"
    }
  ]
}

regex is a modern regular expression consisting primarily of the digits '1'-'9'. The regular expression describes the stroke as a path along a 3x3 grid with each cell numbered from 1 to 9 as shown here:

        1 2 3
        4 5 6
        7 8 9

The extents of the grid will be automatically inferred based on the bounding box of the input stroke. This makes xstroke robust to many stroke distortions including translation and independent scaling along the X and Y axes.

For example, an intuitive stroke for the letter L might be:

    Key L = grid ( "14789" )

Notice that the digits 14789 trace out an 'L' shape in the 3X3 grid above. This simple stroke is sufficient for defining an basic L, but if you start getting sloppy with your L stroke you might miss the lower-left corner of the grid and end up with 1489. The regular expression syntax makes it easy(?) to define robust strokes by accounting for this slop. For example, you could make the 7 optional like so:

    Key L = grid ( "147?89" )

gesture-demo's People

Contributors

babraham123 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.