title: Shape Recognition
body: <p>I need to implement a simple Android application that allows users to draw a "simple" shape (circle, triangle etc) on their phone and then ask a server if the drawn shape matches one of the shapes in its database, which consists of a low number of shapes (let's say &lt; 100, but can be more). In order to make this application work, I was thinking to use the following steps (we assume that the input image consists only of black &amp; white pixels);</p>
  
  <p>A. re-size &amp; crop the input image in order to bring it to the same scale as the ones in the DB</p>
  
  <p>B. rotate the input image by a small angle (let's say 15 degrees) x times (24 in this case) and try to match each of these rotations against each shape in the DB.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li>For A, what would be the best approach? I was thinking to implement this step in the Android application, before sending the data to the server.</li>
  <li>For B, what would be a decent algorithm of comparing 2 black &amp; white pixel images that contain only a shape?</li>
  <li>Is there any better / simpler way of implementing this? A solution that also has an implementation is desirable.</li>
  </ol>
  
  <p>PS: I can see that many people have discussed similar topics around here, but I can't seem to find something that matches my requirements well enough.</p>