Search code examples
androidtouch

Recognize a figure - Similar to the Magic Touch game


In the game i need to the user to draw a figure, for example a rectangle, and the game has to recognize the figure. How can i do this?

Thanks!


Solution

  • This sounds like you would want to use a Neural Network. If you don't know what that is: It is basically an Artificial Brain which can do simple tasks like classifying (recognizing) shapes. It's really easy to do with tensorflow, since it's easily integratable into Android: https://www.tensorflow.org/mobile/android_build

    Then, you would train your classifier to differenciate between Circle, Rectangle, Triangle and more. For this, you should draw some rectangles and triangles in your app, save them as images and label them yourself with what is in them. Then you can use those images with TensorFlow to train your AI to recognize images the user draws.