Answers.Body: <p>I think you look for the meaning of the image (pic of 'a' = a) rather than the regular image similarity. For example, you would like the two images of the 'a' you posted to be classified to the same label instead of, for example, to be classified as similar to an 'o' image which would give a smaller Hamming distance or mean square error.<br>
  So as <a href="https://ai.stackexchange.com/users/4398/jaden-travnik">@Jaden Travnik</a> suggested, <a href="https://www.kaggle.com/c/digit-recognizer/data" rel="nofollow noreferrer">MNIST digits classification</a> is a good start. It classifies handwritten digits and has human-level solutions implemented by any existing CNN framework. (TensorFlow, Caffe, Theano, to name a few).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-16T08:03:34.363Z
Answers.LastActivityDate: 2017-10-16T08:03:34.363Z
Answers.UserDisplayName: rkellerm
Body: <p>I'm a student I'm completely new to this technology maybe my approach could be completely wrong, I want to create an algorithm that compares the similarity between two binarized images.</p>
  
  <p>I'll explain:
  I have 2 pictures as input. The RGB colors of these images can only be 0 or 255</p>
  
  <p>(R = G = B = 255) or (R = G = B = 0). I take these two letters as an example.</p>
  
  <p><strong>1.</strong> <a href="https://i.sstatic.net/dzM8T.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dzM8T.png" alt="symbol1"></a> <strong>2.</strong> <a href="https://i.sstatic.net/fkYSj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fkYSj.png" alt="symbol2"></a></p>
  
  <p>I thought so: the 255 value is the background of the image which is white.
  The 0 value is the shape (letter) formed in the image. So I thought of creating a matrix with 0 and 1 values where value 0 represents the background and value 1 represents the shape.</p>
  
  <p>So now i would like to create an algorithm that understands the shape created in the two matrices and that returns a similarity percentage.</p>
  
  <p>Update: I'm creating this app that tries to recognize the font of a text in a image (<a href="https://github.com/Sirvasile/Typefont" rel="nofollow noreferrer">https://github.com/Sirvasile/Typefont</a>), I want to create this algorithm to improve the comparison between the input letters and the alphabet of my fonts in the database.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-30T21:40:31.683Z
Comments.Text: I think you need to define what you mean by shape. One could compute the hamming distance between the images and get an answer but I don't think that is what you want. Try looking up convolutional NNs and MNIST. It should help.
Comments.UserDisplayName: Jaden Travnik
Tags: <algorithm><image-recognition><computer-vision>
Title: Image comparison algorithm, trying to figure out how similar two "binary" forms are
UserDisplayName: user6867
ThreadText: # Image comparison algorithm, trying to figure out how similar two "binary" forms are
  
  (Asked by: username_0 on 2017-04-26)
  
  I'm a student I'm completely new to this technology maybe my approach could be completely wrong, I want to create an algorithm that compares the similarity between two binarized images.
  
  I'll explain:
  I have 2 pictures as input. The RGB colors of these images can only be 0 or 255
  
  (R = G = B = 255) or (R = G = B = 0). I take these two letters as an example.
  
  **1.** [![symbol1](https://i.sstatic.net/dzM8T.png)](https://i.sstatic.net/dzM8T.png) **2.** [![symbol2](https://i.sstatic.net/fkYSj.png)](https://i.sstatic.net/fkYSj.png)
  
  I thought so: the 255 value is the background of the image which is white.
  The 0 value is the shape (letter) formed in the image. So I thought of creating a matrix with 0 and 1 values where value 0 represents the background and value 1 represents the shape.
  
  So now i would like to create an algorithm that understands the shape created in the two matrices and that returns a similarity percentage.
  
  Update: I'm creating this app that tries to recognize the font of a text in a image (<https://github.com/Sirvasile/Typefont>), I want to create this algorithm to improve the comparison between the input letters and the alphabet of my fonts in the database.
  
  **Tags:** algorithm, image-recognition, computer-vision
  > **Comments:**
  > **username_1**: I think you need to define what you mean by shape. One could compute the hamming distance between the images and get an answer but I don't think that is what you want. Try looking up convolutional NNs and MNIST. It should help.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-10-16. Score: 1
  
  I think you look for the meaning of the image (pic of 'a' = a) rather than the regular image similarity. For example, you would like the two images of the 'a' you posted to be classified to the same label instead of, for example, to be classified as similar to an 'o' image which would give a smaller Hamming distance or mean square error.  
  So as [@Jaden Travnik](https://ai.stackexchange.com/users/4398/jaden-travnik) suggested, [MNIST digits classification](https://www.kaggle.com/c/digit-recognizer/data) is a good start. It classifies handwritten digits and has human-level solutions implemented by any existing CNN framework. (TensorFlow, Caffe, Theano, to name a few).
  
  
  ---
  
  