In this article, a method of font recognition based on the medial representation, integrated into the font recognition system based on a digital image of text is described. This system searches for similar fonts, ordered by similarity, to the font shown in the user-entered text image. The system is based on solving two machine learning problems: text recognition on an image and font recognition on a text image. To solve the first problem, we use the concept of a mathematical model of a grapheme based on a continuous medial representation of a symbol. The solution to the font recognition problem is based on the concept of the morphological width of the figure, which is also closely related to the medial representation. We propose a method for using the morphological width function to find the most similar fonts from a known database. The experiments show high accuracy of searching for the most similar fonts. For a database consisting of 2543 fonts, the accuracy is 0.991 according to the metric top@5 for correctly recognized text in the font size of 100 pixels in the image.
Read full abstract