Elsevier

Pattern Recognition Letters

Volume 26, Issue 2, 15 January 2005, Pages 135-145
Pattern Recognition Letters

High-order statistical texture analysis––font recognition applied

https://doi.org/10.1016/j.patrec.2004.09.038Get rights and content

Abstract

A new optical font recognition technique is proposed in this work. The new approach is based on global texture analysis, where statistical methods are used to identify and classify font features. The font recognition is performed by taking the document as a simple image, where one or several types of fonts are present. The identification is not performed letter by letter as with conventional approaches. In the proposed method a window analysis is employed to obtain the features of the document, using fourth and third order moments. The new technique does not involve a study of local typography; therefore, it is content independent. A detailed study was performed with 8 types of fonts commonly used in the Spanish language. Each type of font can have four styles that lead, to 32 font combinations. The font recognition with clean images is 100% accurate. Also, the new method was tested by adding Gaussian noise to clean images, so as to study the impact of image degradation on font recognition. The robustness of the algorithm is also examined in terms of varying resolution.

Introduction

Computers have become more and more powerful in processing data with time; this characteristic has made them the perfect tool in trying to implement some of the human capabilities. Since vision is the sense by which us, humans, acquire the major portion of information that we use in our daily activities, many research has been done trying to simulate the process of vision with computers. In particular, the capability to understand visual figures that are not exactly as some model but close enough to it is one of the features humans do far better than computers. Examples of this kind of figures are the symbols we, the humans, use for our written communication.

Font recognition is a fundamental issue in the identification and analysis of documents. This has been a difficult task that demands a huge amount of computer resources. There are several techniques that have been proposed to solve this problem. Optical character recognition (OCR) techniques are commonly used by commercial software developers (Nagy, 2000), but the font type is generally neglected. However, automatic document processing (ADP) techniques have to take font type into account as one of two main aspects. First, the type of character, which once determined is generalized in the font recognition and final identification of the document. As a result of only using this approach, the number of alternative forms that each class of font family can have is reduced. This clearly leads to the recognition of only one kind of font (Nagy, 2000). The second (ideal) aspect that must be considered in ADP techniques is the identification of the font types used within the document. This has been usually neglected in spite of its importance. Khoubyari and Hull (1996) took a document as an image, where clusters of word images were located within a reference word function base. The base font was chosen as the font that is more similar to the one being analyzed. In Ref. (Cooperman, 1997) a set of local detectors were employed to identify individual features of each font, such as height, width, thickness, base line, etc. Shi and Pavlidis (1997) made recognition of fonts based on histogram properties of words, where inclination properties, histogram densities, etc. were measured. Zramdini and Ingold (1998) show a statistical approach for the recognition of fonts based on their local topographic aspects. A similar approach was taken by Schreyer et al. (1998), where local attributes of textons were used (see Julesz and Bergen (1983) for the definition of textons and Malik et al. (1999) as an alternate approach to textons). It can be seen that all these works are based on typographic aspects that were extracted with very local analysis instead of a global analysis.

Only one author (Zhu et al., 2001) was found to make use of global texture analysis. Gabor filters were tuned at different frequencies and orientations, leading to recognition results that are a function of pepper noise (degradation of recognition as a function of additive noise). Although the results given in (Zhu et al., 2001) are good, there is room for substantial improvements. Experience shows that a global analysis may lead to good results in pattern recognition.

In this paper, the global analysis approach was followed. The use of high-order statistical moments (third and fourth order) and a principal-component analysis were proposed to characterize the textures of documents (fonts). A standard statistical classifier, such as Bayes (Fukunaga, 1990), was used during the document analysis process. The purpose of this paper was to determine if the use of the method described here would result in better font recognition. The approach followed is independent of document content and it is based on global texture analysis. The font identification process proposed in this work is summarized in the flow chart of Fig. 1. The original image is pre-processed so as to create a uniform text block, which, in turn, is used to extract high-order statistical attributes. An analysis of principal components is then applied to eliminate linear redundancies, leading to a reduced number of features. The features can now be categorized using a Bayes classifier, obtaining the recognition of a particular font. The structure of the paper is organized as follows. Section 2 gives details of the pre-processing stage, whereas the features used during the recognition process and the way to extract them are given in Section 3. The definition and implementation of third and fourth order moments are included in Section 3.1. The classification method is discussed in Section 4 and Section 5 shows the efficacy of the proposed approach. Finally, future work and conclusions are presented in Section 6.

Section snippets

Pre-processing: Creation of a uniform block of text

The text to be analyzed is contained within a JPG format file (the jpg format is converted to gray level image), which was used for the learning and identification stages. The text can include space characters or spaces between words, letters or lines. It is assumed that the document to be analyzed only contains text information, that is, no pictures or figures are in the document. In addition, characters may have different sizes between words or lines. There can be two types of spaces within a

Feature extraction

The uniform text obtained in the previous section, could be analyzed with any texture technique, evidently each technique is well adapted for texture type (i.e. fine grain texture, coarse grain texture, etc.). As it is remarked in the introduction section, only one paper using “global texture analysis” (Zhu et al., 2001) was found and it is based on Gabor filters. In our project, we proposed to use high order statistics (third and fourth order moments) since in (Malik et al., 1999) Julesz is

Recognition of the type of font

The methodology applied in our processing image algorithm was based on to estimate features not over full image, instead of this, feature estimation was done over regions of images called “sub-image”. The estimated attribute arrays of each sub-image were the reference database to recognize the type of each font (100 windows are taken randomly over each full text). A Bayes classifier was chosen to fulfill this task. As this classifier is of the supervised type, two stages were required: (a)

Results

Several tests were performed to validate the method proposed in the project. Eight different types of fonts were chosen during the learning tests: (a) Arial, (b) Bookman, (c) Century Gothic, (d) Courier, (e) Comic Sans MS, (f) Impact, (g) Modern and (h) Times New Roman (see Fig. 6). In addition, four different styles for each font were employed: (a) Regular, (b) Bold, (c) Italic and (d) Bold Italic (see Fig. 7). A total of 32 combinations of styles and fonts were considered. This particular set

Conclusions and future work

A new approach was proposed and tested for font recognition. The method was based on the use of high-order central moments (third and fourth order), using a standard classifier (Bayes). Non-isotropic characteristics were taken into consideration by making estimations in four different orientations. A Principal Component Analysis reduces the number of features and the linear redundancies between them. Thus, results show a 100% performance, that is, a 0% error. The method worked well when

Acknowledgments

This work was partially supported by The Mexican National Council of Science and Technology (CONACYT) under project J31916. Additional thanks to CONACyT and Universidad Autonoma Mexicana–Azcapotzalco for supporting the project and the PhD studies of one of the authors.

References (29)

  • K. Fukunaga

    Introduction to statistical pattern recognition

    (1990)
  • R. González

    Digital Image Processing

    (1990)
  • R.M. Haralick

    Texture feature for image classification

    IEEE Trans. SMC

    (1973)
  • R.M. Haralick

    Statistical and structural approaches to texture

    IEEE TPAMI

    (1979)
  • Cited by (40)

    • Arabic font recognition based on diacritics features

      2014, Pattern Recognition
      Citation Excerpt :

      This explains why these approaches are successful with most languages but not with Arabic. The most common approaches toward font recognition are font recognition based on typographical features [2–4] and font recognition using textural features [5–8]. It has been reported that the second approach is more efficient than the former one [9].

    • A study on font-family and font-size recognition applied to Arabic word images at ultra-low resolution

      2013, Pattern Recognition Letters
      Citation Excerpt :

      There are principally three classes. The first class is based on the characterization of text block images by texture features, e.g., based on Gabor filters (Zhu et al., 2001; Ma and Doermann, 2005; Ramanathan et al., 2009), high order statistical moments (Avilés-Cruz et al., 2004; Avilés-Cruz et al., 2005; Avilé-Cruz et al., 2006) and Hilbert–Huang transforms (Yang et al., 2006; Mallikarjunaswamy and Karunakara, 2010). The second class is based on the characterization of text line or word images with typographical features, e.g., based on textons theory (Schreyer et al., 1999), vertical projection profile heights, density of black pixels, variance of horizontal projection profile derivative, text density, letter size, orientation and spacing, etc (Zramdini and Ingold, 1993; Zramdini and Ingold, 1998; Kim et al., 2004).

    • Semi-supervised Persian font recognition

      2011, Procedia Computer Science
    • New features using fractal multi-dimensions for generalized Arabic font recognition

      2010, Pattern Recognition Letters
      Citation Excerpt :

      The comparison of our techniques with other existing methods is presented in Table 11. The font recognition accuracy is satisfying since it is obtained from not standardized blocks or lines, but under the natural conditions of an original document, contrary to the other methods in the block level, in which several pre-processing steps are used, such as the works of Aviles-Cruz et al. (2005), Yang et al. (2006) and Zhu et al. (2001). A new automatic method of font identification is proposed and experimented.

    • Local Style Awareness of Font Images

      2023, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
    View all citing articles on Scopus
    View full text