Handmade Hero»Forums»Code
11 posts
Line pattern recognition
How should a line pattern recognition work? I'm making a game prototype in which you can draw freehand line patterns that should be compared and matched with some other patterns. Is there some default way of implementing this, I'm not sure from where to start?
Mattie
35 posts
Line pattern recognition
Might be good to do some research on handwriting recognition.
Gianluca Alloisio
33 posts
Line pattern recognition
Do you mean straight lines of freehand curved lines?
Surely hand writing recognition is a good set of keywords.
11 posts
Line pattern recognition
Yeah, I'm looking into handwriting recognition stuff now.
It's kind of in vein of those spell casting games where you draw some pattern freehand on screen and then that pattern is recognized as pattern for some spell, so you activate some action by drawing a specific pattern.
So I'm basically tracking movement positions and then I connect those points with lines to get whatever pattern you drew. It's a freehand thing, so it's like you did a brushstroke, it can be curvy or whatever.
511 posts
Line pattern recognition
I believe some implementations store a pattern as a sequence of directions.

You can add some location restrictions so that for example the lines of a cross actually need to intersect.
11 posts
Line pattern recognition
Yes i think storing directions is a better solution than working with pixels like hand writing recognition mostly do.