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.
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.

