Unity Shape Recognizer

Say I have two 2D Shapes (PNG Interlaced on Planes) intersecting each-other.
What is the best plugin/code/technique I can use to analyse the intersected middle shape and check if it looks like the ‘goal’ shape.
It analyses both the colour and the shape.
To show you what I mean visually, the attached picture might help.

No one will answer absolutely...As you can see.You need to define what your problem is you cannot just say how to do it.Show us some code and you wrote down then tell us what you have as an issue in that code.

I'm not looking for a direct code with all the scripting done. I'm looking for a direction I can be pointed in just so I can see if the idea for my game can be possible.

2 Answers

2

I have most often heard of the Emgu CV library. You might find some suggestions at this Stack Overflow page.

Bottom line, that’s a lot to chew. Shape recognition tends to be difficult, if you plan on working with arbitrary unstructured data. You might have an easier time faking it a bit, checking proximity and color of pre-determined shapes that you’ve created, stuff like that.

Image processing and shape recognition is not what you want to try to do here. You can do what is shown in your example with trigger colliders and a script with conditional rules and not have to analyze any pixels. If your game idea is a lot more complicated than that, your scripting will be a lot more complicated too, but still it’s possible.

Wow. This is going to be challenge. I do have an idea of which I have hidden vertex points (spheres only on the vertex points of the shapes) which sense if the vertex points of the shape fit inside the vertex target points. The larger the outline vertex points, the less precise the shape has to fit in. That's how I figure to do the shape now. To explain my idea, the picture is attached. I think this will be split into two parts, the shape recognition and intersecting colour recognition. Am I right in saying that? Oh well, thanks for the responses. [18427-1.png|18427]