Shape Recognition with $P

I am attempting to create a drawing based game mechanic similar to Okami’s brush mechanic. I have looked into, and found a Unity implementation of the $P Point-Cloud Recognition algorithm, but found that the matching is almost TOO good.

It will always give you a match to one of the templates so it is almost impossible to have a gesture not be recognized. I understand that this is desirable in accessibility based applications, but as this is a game I only want to acknowledge certain gestures with some level of accuracy being required.

I tried to modify the classification part of the algorithm to consider matches with a low “score” to not match correctly but I don’t really understand the scoring to well.

There are assets such as Finger Gestures for Unity and AdVd Glyph Recognition tool but both seem like they would have similar issues with all ways finding a match.

Any thoughts on ways to modify the $P algorithm or the assets mentioned above to achieve something like this? Or maybe I am overthinking this?

Hey, did you find any solution?

I haven’t had time to work on this project since the initial post unfortunately

I’m also very interested on this matter. Let me know if you find some good results.

Did anything ever come of this?

Dude, don’t necro-post a long-dead thread. Especially one with no solutions, and you just asking again. You’d get a lot better traction if you did some research, started a NEW thread, maybe link or say the past threads got nowhere.

Ookami was looking for very specific shapes and curves, like a clockwise spiral or an X of two strokes. Reduce your player’s brush stroke(s) with a least-energy routine until it has the same number of bezier control points as your ideal pattern. Match the closest cardinal direction of the slope of the curve at each control point. Your confidence is 0 if no slopes matched. Your confidence is 1 if all slopes matched. Decide how generous you want to be.

Necroposting is against our code of conduct .
As halley said, please create a new thread.

Thread locked