Character/gesture recognition stretch goal

Posted on
  • Can somebody please tell me what became of the first unlocked stretch goal, "Character/gesture recognition"? I had hoped it would become a module I could use within an app to input letters.

    Or perhaps it became the "Pattern Launcher" app? If so, it might be a good idea to note that on the Bangle.js 2 Implementation Status wiki page.

    Many thanks to Gordon and all the developers who've made both of my Bangle.js watches such fun and useful devices!

  • Hi - it's actually already in the 2v12 firmware already: http://www.espruino.com/Reference#l_Bang­le_stroke

    But I'm afraid it hasn't let been exposed in any apps. I'd been meaning to make a version of 'pattern launcher' that used it but haven't got around to it yet.

  • Thank you very much for your helpful reply Gordon!

    I recently upgraded to 2v12 and can confirm the new 'stroke' event works on my Bangle.js 2. I think I understand now how to implement letter recognition thanks to your example code but I guess the accuracy will depend on how forgiving your stroke matching algorithm is (hopefully I'll be able to learn more about that from the source code...).

    Thank you as always for all your help and hard work!

  • I guess this means something like Palm Graffiti might be possible?

  • I always had the idea to bring the OneDollar.js recognizer to the Bangle.js - but I won't find the time in the near future. It is extremely compact and could fit into this small system.

    With $1, solutions such as the brilliant Palm Graffiti could become possible!

  • I always had the idea to bring the OneDollar.js recognizer to the Bangle.js

    That's what's already running on it :)

    This is the example code I had:

    Bangle.strokes = {
      up : Unistroke.new( new Uint8Array([57, 151, 57, 147, 58, 136, 61, 119, 65, 102, 70, 88, 74, 78, 80, 71, 86, 70, 94, 72, 107, 79, 129, 97, 140, 110, 147, 120, 152, 127, 156, 134, 158, 137])),
      cw : Unistroke.new(new Uint8Array([91, 60, 93, 60, 98, 60, 108, 60, 121, 61, 131, 64, 137, 70, 139, 81, 139, 96, 135, 111, 128, 126, 119, 136, 108, 140, 97, 141, 86, 139, 75, 134, 70, 126, 66, 115, 64, 100, 65, 88, 69, 78, 75, 71, 81, 67, 84, 63])
    ),
     ccw : Unistroke.new(new Uint8Array([114, 71, 112, 71, 108, 71, 102, 71, 93, 72, 82, 76, 71, 81, 62, 88, 56, 97, 53, 107, 54, 116, 59, 127, 70, 137, 86, 142, 103, 145, 115, 144, 124, 143, 131, 136, 135, 122, 131, 99, 124, 83, 115, 72])
    ),
     alpha : Unistroke.new(new Uint8Array([161, 55, 160, 58, 158, 62, 155, 71, 149, 81, 141, 97, 132, 114, 119, 129, 107, 140, 96, 147, 86, 151, 77, 154, 69, 153, 59, 149, 49, 143, 40, 133, 31, 117, 28, 104, 27, 90, 28, 78, 34, 71, 44, 69, 60, 72, 84, 84, 111, 107, 132, 128, 146, 144, 154, 155, 159, 161])),
     right : Unistroke.new(new Uint8Array([49, 52, 54, 52, 68, 57, 90, 65, 114, 76, 134, 84, 148, 91, 157, 95, 163, 98, 167, 100, 169, 102, 168, 105, 163, 114, 147, 126, 127, 137, 107, 147, 94, 152, 82, 156, 72, 159])),
    double : Unistroke.new(new Uint8Array([75, 61, 87, 61, 117, 68, 142, 85, 147, 111, 129, 134, 92, 140, 59, 133, 45, 116, 50, 89, 86, 72, 128, 88, 138, 121, 108, 138, 68, 129, 56, 104, 57, 90]))
    };
    
    
    Bangle.on('stroke',o=>{
      print(o);  
      g.clear(1).drawPoly(o.xy);
      if (o.stroke) g.setFont("12x20").setFontAlign(0,0).dra­wString(o.stroke, 88,165);
    });
    

    As long as you have reasonably clear, differentiable strokes it seems quite good. And yes, palm graffiti should be possible - I was just a little bit iffy about it as there were patents, but I think they have all run out now.

  • Good to know!

    As far as I remember, there somewhere was an alternative set of strokes - perhaps, just because of patent issues.

    Let me see if I can find that again.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Character/gesture recognition stretch goal

Posted by Avatar for TTBangler @TTBangler

Actions