Handmade Hero » Forums » Code » Line pattern recognition
david009
11 posts
#11111 Line pattern recognition
1 month, 3 weeks ago

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?
Sizik
Matt
32 posts
#11116 Line pattern recognition
1 month, 3 weeks ago

Might be good to do some research on handwriting recognition.
theGiallo
Gianluca Alloisio
33 posts
#11121 Line pattern recognition
1 month, 3 weeks ago

Do you mean straight lines of freehand curved lines?
Surely hand writing recognition is a good set of keywords.
david009
11 posts
#11122 Line pattern recognition
1 month, 3 weeks ago

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.
ratchetfreak
251 posts
#11124 Line pattern recognition
1 month, 3 weeks ago

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.
david009
11 posts
#11132 Line pattern recognition
1 month, 3 weeks ago

Yes i think storing directions is a better solution than working with pixels like hand writing recognition mostly do.