0

I want to make like a painting game,to let user painting use mouse move.I need to detect if user is painting what kind of shape,like '^'or like 'z',or matching some thing else?

I'm kind of newbee in HTML5 canvas,I've googled a lot,can't find the answer.

Or simplely i'm on the wrong road,i should just store the mouse move data,but still can't figure how to deal with the continous data.

aboutqx
  • 418
  • 5
  • 18
  • pattern recognition is a hard job, that's a job for a neural network if you want your matching to be accurate... [synaptic](http://caza.la/synaptic/#/) is a library for neural net in js, but it's not a newbie thing... Maybe there are some other way, but IMHO neural net might be the most interesting for this kind of job... – n00dl3 Jan 30 '17 at 12:14
  • Well,not want that much accurate,simply like google doodle done before – aboutqx Jan 30 '17 at 12:17
  • 2
    like [this](https://quickdraw.withgoogle.com/) ? that's neural network... – n00dl3 Jan 30 '17 at 12:18
  • Wow,actually i saw [here](https://www.baidu.com/),or some other h5 page – aboutqx Jan 30 '17 at 12:21
  • 2
    maybe you should elaborate your question, because if it's only a matter of direction (like gesture recognition, so drawing a single line without releasing the mouse), it might be much easier. ie: storing the direction of the drawing then comparing to what you expect: "z" would be "east,south-west,east" "^" would be "north-east,south-east", etc... – n00dl3 Jan 30 '17 at 12:29
  • That should be the way. – aboutqx Jan 30 '17 at 12:41
  • [Here's a possibility](http://stackoverflow.com/questions/29176146/how-to-draw-in-javascript-canvas-and-compare-it-to-a-shape/29176294#29176294). – markE Jan 30 '17 at 13:43

0 Answers0