24
Font Recognition Based on Global Texture Analysis Yong Zhu, Tieniu Tan * and Yunhong Wang National Laboratory of Pattern Recognition (NLPR), Institute of Automation, Chinese Academy of Sciences P. O. Box 2728, Beijing 100080, P. R. China Email: {yong.zhu, tieniu.tan, yunhong.wang}@nlpr.ia.ac.cn Abstract In this paper, we describe a novel texture analysis based approach towards font recognition. Existing methods are typically based on local typographical features that often require connected components analysis. In our method, we take the document as an image containing some specific textures, and regard font recognition as texture identification. The method is content-independent and involves no detailed local feature analysis. Experiments are carried out by made using 14,000 samples of 24 frequently used Chinese fonts (6 typefaces combined with 4 styles) as well as 32 frequently used English fonts (8 typefaces combined with 4 styles). An average recognition rate of 99.1% is achieved. Experimental results are also included on the robustness of the method against image degradation (e.g. Pepper & Salt noise) and on the comparison with existing methods. 1. Introduction Font recognition is a fundamental issue in document analysis and recognition, and is often a difficult and time-consuming task. Numerous optical character recognition (OCR) * Corresponding author 1

Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

Font Recognition Based on Global Texture Analysis Yong Zhu, Tieniu Tan* and Yunhong Wang

National Laboratory of Pattern Recognition (NLPR), Institute of Automation, Chinese

Academy of Sciences

P. O. Box 2728, Beijing 100080, P. R. China

Email: {yong.zhu, tieniu.tan, yunhong.wang}@nlpr.ia.ac.cn

Abstract

In this paper, we describe a novel texture analysis based approach towards font recognition.

Existing methods are typically based on local typographical features that often require

connected components analysis. In our method, we take the document as an image containing

some specific textures, and regard font recognition as texture identification. The method is

content-independent and involves no detailed local feature analysis. Experiments are carried

out by made using 14,000 samples of 24 frequently used Chinese fonts (6 typefaces

combined with 4 styles) as well as 32 frequently used English fonts (8 typefaces combined

with 4 styles). An average recognition rate of 99.1% is achieved. Experimental results are

also included on the robustness of the method against image degradation (e.g. Pepper & Salt

noise) and on the comparison with existing methods.

1. Introduction

Font recognition is a fundamental issue in document analysis and recognition, and is often

a difficult and time-consuming task. Numerous optical character recognition (OCR)

* Corresponding author

1

Page 2: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

techniques have been proposed and some have been commercialized, but few of them take

font recognition into account. Font recognition has great influence over automatic document

processing (ADP) in at least two aspects. Font is an important factor both to character

recognition and to script identification. Font classification can reduce the number of

alternative shapes for each class, leading to essentially single-font character recognition [1].

Secondly, the ideal output of an ADP system includes not only the content of the document

but also the font used to print this document in order to achieve automatic typesetting.

In spite of the clear importance of automatic font recognition, only a few researchers have

addressed the issue. In the method used by Khoubybari and Hull [2], clusters of word images

are generated from an input document and matched to a database of function word derived

from fonts and document images. The font or document that matches best provides the

identification of the predominant font and function words. Cooperman [3] discusses the

estimation of font attributes in an OCR system. He uses a set of local detectors for individual

attributes such as serifness, boldness, ect. Shi and Pavlidis [4] use page properties such as

histogram of word length and stroke slopes for font feature extraction. Zramdini and Ingold

present a statistical approach for font recognition based on local typographical features [5]. A

similar approach is taken by Schreyer et. al. [16] where local texton features are used (see

Julesz [17] for the definition of textons). Most of these methods are based on typographical

features extracted by means of local attribute analysis.

In this paper, we propose a new algorithm for font identification based on the global texture

of document images (we assume pure text documents as page segmentation and layout

analysis are outside the scope of this paper). No explicit local analysis is needed in the

method. The key point is using texture analysis to extract global features. A block of text

printed in each font can be seen as having a specific texture. The spatial frequency and

orientation contents represent the features of each texture. It is these texture features that we

2

Page 3: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

use to identify different fonts.

In principle, any texture analysis technique can be applied here. Here, we use multi-channel

Gabor filters to extract these features. Multi-channel Gabor filtering is a well-established

method for texture analysis and has been demonstrated to have good performance in texture

discrimination and segmentation [6-12].

The overall font identification system is illustrated in Figure 1.

Preprocessing Feature Extraction

Matching

Preprocessing Feature Extraction

Training

Samples

Test

Samples

Results

Uniform block of text

Uniform block of text

Texture Features

Texture Features

Figure 1. The flow chart of the font identification system

The original image is preprocessed to form a uniform block of text. The multi-channel

Gabor filtering technique is used to extract features from the uniform text blocks (i.e. the

texture images). A weighted Euclidean distance classifier is used to identify the fonts.

In Section 2, we discuss pre-processing in detail. Section 3 describes font feature

extraction based on mult-channel Gabor filtering. Section 4 outlines the classifier.

Experiments and results are discussed in Section 5. Conclusions are then drawn in Section 6.

2. Preprocessing: creating a uniform block of text

3

Page 4: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

The original input is a binary image. It may contain characters of different sizes and spaces

between text lines and characters. These factors are not the essential attributes of a certain

font but they seriously affect font texture. For the purpose of font feature extraction using

texture analysis, the input documents need to be normalized to create a uniform block of text.

The preprocessing is accomplished in four steps.

2.1 Text line location

The horizontal projection profile (HPP) of the document is computed. The valley between

peaks corresponds to the blank between text lines. The distance between two valleys

corresponds to the height of each text line. This way we can locate and determine the height

of each text line.

2.2 Text line normalization

Since the input image is scanned from the original document, different scan resolutions and

font sizes will result in different character sizes and spacing in the image. It is therefore

necessary to scale each text line to a predetermined height. Given that the height of each line

is known, it can easily be scaled. It should be pointed out that since the algorithm is

content-independent (i.e., the sequence of characters or words can vary) and is based on

global texture analysis, character size normalization does not have to be very precise (so

some distortions on characters having multiple connected components such as i and j can be

tolerated).

2.3 Spacing normalization

Spacing normalizations is performed to reduce the undesirable influence of spacing on

4

Page 5: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

texture. For each text line, we compute the vertical projection profile (VPP). The valley

between peaks corresponds to the spacing between characters or words. The distance between

two valleys corresponds to the width of each character or word. We normalize the spacing by

scaling them to a predefined width. An example is given in Fig. 2.

(a)

(b)

(c)

Figure 2. Example of spacing normalization (a) original text line; (b) VPP of the text line;

(c) spacing-normalized text line

2.4 Text padding

The input document may contain incomplete or partially justified text lines. The resultant

blank spaces are filled up by means of text padding. Padding is also applied if the document

contains only a small number of characters. Since the method is content-independent, we

5

Page 6: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

randomly extract blocks of normalized text to fill blank spaces in order to create a texture

block of a predefined size (say pixels). 128128×

Figure 3 shows an example of image preprocessing.

(a) (b) (c)

(d)

Figure 3. Example of preprocessing. (a) original image; (b) HPP of the image; (c) image after

line nornalization; (d) uniform text block after preprocessing.

3. Font feature extraction

Once uniform blocks of text have been created, we can proceed with font feature extraction

based on texture analysis. In theory, any type of texture analysis methods can be employed

here. These include the multi-channel Gabor filtering technique and the gray level

6

Page 7: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

co-occurrence matrix [12]. Experiments show that the former has better performance [13-15]

and is therefore adopted in this paper. In the following, we briefly describe the multi-channel

Gabor filtering technique (details may be found in [7-17].

3.1 Gabor filter

The multi-channel Gabor filtering technique has been shown to be particularly useful for

analyzing textured images [8]. In our application, we use pairs of isotropic Gabor filters with

quadrature phase relationship [9]. The computational models of such 2-D Gabor filters are:

[ ][ ])sincos(2sin),(),(

)sincos(2cos),(),(θθπθθπ

yxfyxgyxhyxfyxgyxh

o

e

+⋅=+⋅=

(1)

where and denote the so-called even- and odd- symmetric Gabor filters , and

is an isotropic Gaussian function given by

eh oh ),( yxg

+−⋅= 2

22

2 2exp

21),(

σπσyxyxg (2)

The spatial frequency responses of the Gabor functions are:

[ ]

[ ]j

vuHvuHvuH

vuHvuHvuH

o

e

2),(),(

),(

2),(),(

),(

21

21

−=

+=

(3)

where 1−=j and

[ ][ ]})sin()cos(2exp{),(

})sin()cos(2exp{),(2222

2

22221

θθσπ

θθσπ

fvfuvuHfvfuvuH

+++−=

−+−−= (4)

7

Page 8: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

f , θ and σ are the spatial frequency, orientation and space constant of the Gabor envelope.

For a given input image, the outputs of and h are combined to provide a

single channel output ( see [9] for details).

),( yxhe ),( yxo

Figure 4 illustrates the frequency response of an even- symmetric Gabor filter. The

orientation parameter θ corresponds to the angle from the u-axis to the center of the

Gaussians. The central frequency corresponds to the distance from the center of the

Gaussians to the origin.

f

σ is the space constant of the Gabor filter.

θ

f

u

v

0

Figure 4. Illustration of frequency response of the even- symmetric

Gabor filter. The circles shown are the half-peak response contours.

3.2 Filter design

Each pair of the Gabor filters are tuned to a specific band of spatial frequency and

orientation. There are some important considerations in selecting the channel parameters , f

θ and σ . Experiments show that there is no need to uniformly cover the entire frequency

plane so far as texture recognition is concerned [9]. Since the Gabor filters we use are of

central symmetry in the frequency domain, only half of the frequency plane is needed. Four

values of orientation θ are used: , , . For each orientation, central o0 , o45 o90 o135

8

Page 9: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

frequencies are chosen so that they are 1 octave apart. In order to achieve good results, for an

image of size NN × , central frequencies are chosen within 4/Nf ≤ cycles/image. Finer

selection may be employed in other applications. In our experiments, the input image is of

size . For each orientation 128128 × θ , we select 4, 8, 16 and 32 as spatial frequencies. This

gives a total of 16 Gabor channels ( 4 orientations combined with 4 frequencies). The above

choice is sufficient to discriminate different fonts. The spatial constants σ of these channels,

which determine the channel bandwidths, are chosen to be inversely proportional to the

central frequencies of the channels [9]. Frequency responses of the Gabor filters used to

identify different fonts are shown in Figure 5.

Figure 5. Frequency responses of Gabor filters used in font

identification. There are a total of 16 Gabor channels. The responses

were scaled for better visibility.

The mean values (M) and the standard deviations (S) of the channel output images are

chosen to represent texture features. Thus a total of 32 features are extracted from a given

9

Page 10: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

image. They form a 32-dimensional feature vector. Figure 6 shows the flow chart of feature

extraction using the multi-channel Gabor filtering technique.

Channel 1

Channel 2

Channel N

…..

I(x,y)

M1

S1 M2

S2

MN

SN

Extracted Texture Features

Figure 6. The block diagram illustration of multi-channel Gabor

filtering based feature extraction.

4. Font recognition

Font recognition based on given feature vectors is a typical pattern recognition problem. In

principle, we can use any type of classifiers here. For simplicity, we use the weighted

Euclidean distance (WED) classifier to identify the font.

Features of an unknown testing font are compared with those of a set of known fonts. The

unknown font is identified as font K iff the following weighted Euclidean distance is a

minimum at K:

∑=

−=

N

ik

i

kii ffkWED

12)(

2)(

)()()(

δ (6)

10

Page 11: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

where denotes the th feature of the unknown font, and denote the th feature

and its standard deviation of font K, and N denotes the total number of features.

if i )(kif

)(kiδ i

5. Experimental results

Extensive experiments have been carried out to test the algorithm. For convenience (e.g.

the availability of software packages), only Chinese and English documents are considered in

this paper (though the algorithm is equally applicable to documents printed in other scripts or

languages). Six frequently used Chinese typefaces (KaiTi, SongTi, FangSong, LiShu, HeiTi

and YouYuan) and eight English typefaces (Arial, Bookman, Century Gothic, Courier, Comic

Sans MS, Impact, Modern and Times New Roman) combined with four styles (regular, bold,

italic and bold italic) are trained and tested. This means that a total of 56 fonts (24 Chinese

fonts and 32 English fonts) have been used in our experiments.

There are two methods to generate digital document images: scanning and software

generation. After comparing samples of scanned and computer-generated images, we found

that they have difference. For convenience, we use computer-generated images. The

document containing machine-printed characters was generated at the resolution of 100dpi as

a 2-colored bitmap image. The input image was preprocessed to form a uniform

block of text. It was divided into 25

640640 ×

128128 × non-overlapping blocks. For each font, we

use 25 such blocks for training and other 250 different blocks for testing. There is no content

overlap between training and testing samples. Examples of text blocks printed in each

typeface are shown in Figure 6.

11

Page 12: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

(a) (b) (c)

(d) (e) (f)

(g) (h) (i)

(j)

(k) (l) (m) (n)

Figure 6. Examples of text blocks printed in six Chinese typefaces and eight English

typefaces (all printed in their regular styles). (a) FangSong (FS), (b) HeiTi (HT), (c) SongTi

(ST), (d) YouYuan (YY), (e) LiShu (LS), (f) KaiTi (KT), (g) Arial(AL), (h) Bookman

(BM), (i) CenturyGothic(CG),

12

Page 13: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

(j) Courier(CR), (k) Comic Sans MS(CS), (l) Impact(IM), (m) Modern(MN), (n) Times

New Roman(TN)

5.1 Different combination of Gabor channels

Experiments were done to examine the performance of various feature combinations.

Figure 7 shows the results. From this figure we can see that no single central frequency is

sufficient to accurately discriminate different typefaces. Highest recognition rates are

achieved when either all 32 features are used or all means of the 16 channel outputs are used

(16 features in total). The experiments described in the following are conducted using all 32

features unless otherwise stated.

Figure 7. Typeface identification rate (the average of 4 styles per

typeface) of different combinations of Gabor channels.

o all M and S features at f=4 × all M and S features at f=8

□ all M and S features at f=16 ∆ all M and S features at f=32

13

Page 14: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

* all M and S features at f=4, 8, 16, 32

+ all M features at f=4, 8, 16, 32

• all M features at f=4, 8, 16, 32

5.2 Recognition of different typefaces and styles

For each font (i.e. a combination of a specific typeface and a specific style), 250 test

samples were used. Detailed experimental results are tabulated in Table I. The table not only

shows the average correct recognition rate of each font but also the overall average rate of

each typeface (last column) and each style (last row).

Table 1 Recognition rate (%) of typefaces combined with styles (using all 32 features).

Regular Italic Bold Bold Italic Average FangSong 92.8 94.0 100.0 96.8 95.9

KaiTi 98.4 89.6 98.4 100.0 96.6 SongTi 100.0 97.6 100.0 99.2 99.2

YouYuan 99.6 100.0 99.6 100.0 99.8 HeiTi 100.0 100.0 100.0 100.0 100 LiShu 100.0 100.0 100.0 100.0 100

AL 97.2 100.0 100.0 100.0 99.3BM 98.0 100.0 100.0 100.0 99.5 CG 93.6 99.6 100.0 100.0 98.3 CR 100.0 100.0 100.0 100.0 100.0 CS 100.0 100.0 100.0 100.0 100.0 IM 100.0 100.0 100.0 100.0 100.0 MN 100.0 100.0 100.0 100.0 100.0 TN 95.2 100.0 100.0 100.0 98.8

Average 98.2 98.6 99.9 99.7 99.1

It can be seen that the samples of HeiTi (HT), LiShu (LS), Courier (CR), Comic Sans MS

(CS), Impact (IM) and Modern (MN) are correctly recognized. The overall font recognition

rate is as high as 99.1%. The lowest recognition rate of 89.6% is recorded for the font of

Italic KaiTi.

14

Page 15: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

5.3 Typeface confusion

Table 2 shows the typeface confusion matrix for the six Chinese typefaces (similar

confusion matrix can be shown for the English typefaces but is omitted here for the sake of

space). Each [i,j] entry gives the percentage of samples of typeface i which are classified as

typeface j. In the last column, the mis-classification rates (MCR) are given (note only regular

styles were used). The table indicates that the most confusing pair of typefaces is FangSong

and KaiTi which visually are indeed very difficult to differentiate (see Figure 6(a) and Figure

6(f)).

Table 2 Chinese Typeface confusion matrix (%)

FS KT ST YY HT LS MCR

FS 92.8 7.2 0.0 0.0 0.0 0.0 7.2

KT 1.6 98.4 0.0 0.0 0.0 0.0 1.4

ST 0.0 0.0 100.0 0.0 0.0 0.0 0.0

YY 0.0 0.0 0.4 99.6 0.0 0.0 0.4

HT 0.0 0.0 0.0 0.0 100.0 0.0 0.0

LS 0.0 0.0 0.0 0.0 0.0 100.0 0.0

5.4 Robustness test

All of the above experiments were carried out on noise-free images. However, in most

applications, images may have been contaminated by noise. For digital binary images, the

most common noise is Pepper & Salt noise. We have investigated the performance of our

15

Page 16: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

algorithm under different noise levels (Figure 8). For each of the 56 fonts, we use 25

noise-free samples for training and other 25 noisy images for testing. The results are shown in

Table 3, where the signal noise ratio (SNR) is defined as follows:

∑∑

−= 2

,,

2,

)(log10

nmnm

nm

III

SNR (7)

where and nmI , nmI , represent the original and the noisy image respectively.

(a) (b) (c)

(d) (e) (f) Figure 8 Document images at different noise levels: (1) SNR=50; (b) SNR=40; (c) SNR=30;

(d) SNR=20; (e) SNR=10; (f) SNR=5

Table 3 Font recognition rate (average of 56 fonts) at difference noise levels

SNR No noise 50 40 30 20 10 5 Accuracy(%) 99.2 99.2 99.2 99.1 98.6 89.3 9.4

16

Page 17: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

The Table shows that at noise level SNR=10, although the image (Fig.8e) is significantly

contaminated, the algorithm is still capable of achieving a recognition rate as high as 89.3%.

The recognition rate drops to a mere 9.4% at SNR=5 (Fig.8f) where accurate font recognition

even by human observers appear to be impossible.

The robustness of the algorithm is also examined in terms of varying resolutions. For each

of the 56 fonts, we use 25 100dpi samples for training and other 25 images (at different

resolutions) for testing (Figure 9). The results are shown in Table 4.

(a) (b) (c)

(d) (e) (f) Figure 9. Document images at different resolutions: (a) 200 dpi; (b) 100 dpi; (c) 75 dpi; (d)

60 dpi; (e) 50 dpi; (f) 40 dpi

Table 4 Font recognition rate (average of 56 fonts) at different resolutions

Resolution(dpi) 200 100 75 60 50 40 Accuracy(%) 99.2 99.2 97.3 82.4 54.6 46.7

17

Page 18: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

Table 4 indicates that the recognition rate decreases gracefully along with the resolution.

The algorithm functions well with a resolution above 60dpi.

5.5 Font recognition with a small number of characters

In this experiment, we test the method’s performance under a small amount of data by

removing characters in the testing images. We find that 40 Chinese characters or 100 English

characters usually suffice.

5.6 Comparison with existing methods

We also performed experiments with the font data used in Zramdini and Ingold [5] since

their paper is the most recent and most related one in font recognition. The ApOFIS (A priori

Optical Font Identification System) used in [5] has a second-generation font database for 280

fonts (10 typefaces, 7 sizes and 4 styles). Some of these fonts are shown in Fig.10. Each font

has statistics for six features estimated from 100 short text lines scanned at 300 dpi. Using

this database and a Bayesian classifier, Zramdini and Ingold [5] are able to classify fonts with

a 97% accuracy, and other font attributes (e.g. typeface, size, weight, and slope) with a

97.5-99.9% accuracy.

(a) (b) (c)

(d) (e) (f) (g) Figure 10 Examples of fonts used in ApOFIS; Sanserif typefaces: (a) Avant-Garde, (b)

Helvetica; typewriter typeface: (c) Courier; Seriffed typefaces: (d) Lucida-Black, (e)

18

Page 19: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

New-Century-Schlbk, (f) Palatino, (g) Times.

Table 5 shows the experimental result of our method with the ApOFIS font database. We

use the 7 different typefaces shown in Fig.10 combined with 4 styles (regular, bold, italic and

bold italic). Since our algorithm normalizes the scale of the characters in preprocessing, we

do not identify font size. However, samples of all sizes were used in our experiments. For

each font, we use 25 samples for training and another 150 samples for testing.

Table 5 Average recognition rate (%) of fonts and font attributes with ApOFIS data

Font Typeface Style sanserif typefaces

Avant-Garde AG 88.8 91.3 97.3 Helvetica HV 90.5 92.7 96.2

typewriter typefaces Courier CR 79.0 100.0 81.5

seriffed typefaces Lucida-Black LB 41.2 50.7 95.7 New-Century-Schlbk NC 72.5 72.5 98.6 Palatino PL 77.2 83.0 88.5 Times TM 98.0 98.0 100.0

Average 78.2 82.9 94.4 The results show that our algorithm is good at style identification and achieve an

average style identification rate of 94.4%. The typeface recognition rate and the font

recognition rate are not high when compared with ApOFIS [5] in which the average

recognition rate of typeface and font is 96.91% and 97.35%. Further improvement in the

recognition accuracy of our method may be possible by adopting more sophisticated

classifiers such as the Bayesian Classifier as used by Zramdini and Ingold.

Table 6 shows the typeface confusion matrix. One can see that the errors were mainly

due to symmetric misclassifications within the same font families such as sanserif typefaces

and seriffed typefaces. From Figure 10 we can see that the typefaces within the same

19

Page 20: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

category look indeed very similar, which probably explains why a global approach such as

the one described in this paper does not perform particularly well.

Table 6 Typeface confusion matrix (%)

Sanserif typewriter Seriffed AG HV CR LB NC PL TM

MCR

AG 91.3 7.5 0.2 0.7 0.3 0.3 0 8.7 HV 3.9 92.7 0 1.7 0 1.3 0.5 7.3 CR 0 0 100.0 0 0 0 0 0.0 LB 0 6.5 4.2 50.7 4.2 15.4 19.2 49.3 NC 0 3.0 0 6.4 72.5 10.0 8.2 27.5 PL 0 0.3 0 1.3 8.0 83.0 7.3 17.0 TM 0 1.0 0 0 0.9 0.2 98.0 2.0

The above results reveal that our method is able to identify more global font attributes such

as weight and slope, but it is less apt to distinguish finer typographical attributes. The best

feature set therefore appears to be a combination of global features such as those used by our

method and local typographical features such as those explored by Zramdini and Ingold [5],

and the best recognition strategy might be a coarse recognition phase based on a global

approach like the one proposed in this paper followed by a fine recognition phase based on a

local approach like the one presented in [5]. It is important to point out that the global

approach described in this paper is equally applicable to different scripts and languages (e.g.,

Chinese and English), whereas approaches based on local typographical features such as [5]

are likely to be script and language dependent (e.g., only English is considered in [5]).

6 Conclusions

We have presented a new algorithm for automatic font recognition. Unlike existing

methods, the new algorithm is based on global features. It is content-independent so the

20

Page 21: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

contents of training and testing documents are not required to be the same. Extensive

experiments have shown that the algorithm performs very well. The average recognition

accuracy of 24 Chinese fonts and 32 English fonts over 14,000 samples is as high as 99.1%.

The algorithm has also been demonstrated to exhibit strong robustness against noise and

resolution variations. It requires no detailed local feature analysis and may easily be adopted

in practical applications.

Acknowledgement

Aspects of the work described in this paper have been filed for patent (Chinese Patent

Application No. 99105851.8, 1999).

The authors would like to thank the anonymous reviewers for their thorough review of the

paper and many constructive comments, and Dr. Rolf Ingold for providing their ApOFIS

database.

The financial support of the NSFC (Grant No. 59825105) and the Chinese Academy of

Sciences is gratefully acknowledged.

References

[1] G. Nagy, “Twenty Years of Document Image Analysis in PAMI”, IEEE Trans. Pattern

Anal. Machine Intell., vol.22, no.1, pp.38-62,2000.

[2] S. Khoubyari and J. J.Hull, “Font and function word identification in document

recognition,” Computer Vision and Image Understanding, vol. 63, no. 1, pp. 66-74,

1996.

21

Page 22: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

[3] R. Cooperman, “Producing Good Font Attribute Determination Using Error-Prone

Information,” SPIE, vol. 3,027, pp. 50-57, 1997.

[4] H. Shi and T. Pavlidis, “Font Recognition and Contextual Processing for More

Accurate Text Recognition,” ICDAR’97, pp. 39-44, Ulm, Germany, Aug. 1997.

[5] A. Zramdini and R. Ingold, “Optical Font Recognition Using Typographical Features,”

IEEE Trans. Pattern Anal. Machine Intell., vol. 20, no. 8, pp.877-882, 1998.

[6] J. G. Daugman, “Uncertainty Relation for Resolution in Space, Spatial Frequency, and

Orientation Optimized by Two-Dimensional Visual Cortical Filters,” J. Opt. Soc. Am.,

vol. 2, pp. 1160-1169, 1985.

[7] M. R. Turner, “Texture Discrimination by Gabor Functions,” Biol. Cybern, vol. 55, pp.

71-82, 1986.

[8] A. C. Bovik, M. Clark and W. B. Geisler, “Multichannel Texture Analysis Using

Localized Spatial Filters,” IEEE Trans. Pattern Anal. Machine Intell., vol. 12, no.1, pp.

55-73, 1990.

[9] T. N. Tan, “Texture Feature Extraction via Cortical Channel Modeling,” Proc. 11th

IAPR Inter. Conf. Pattern Recognition, vol. III, pp. 607-610, 1992.

[10] A. C. Bovik, N. Gopal, T. Emmoth and A. Restrepo, “Localized Measurement of

Emergent Image Frequencies by Gabor Wavelets,” IEEE Trans. Information Theory,

vol. 38, no. 2, pp. 691-712, 1992.

[11] A. K. Jain and F. Farrokhnia, “Unsupervised Texture Segmentation Using Gabor

Filters,” Pattern Recognition, vol. 24, no. 12, pp. 1167-1186, 1991.

[12] T. Reed and J. M. Hans De Buf, “A Review of Recent Texture Segmentation And

Feature Extraction Techniques,” CVGIP: Image Understanding, vol. 57, pp. 359-372,

1993.

[13] H. E. S. Said, K. D. Baker and T. N. Tan, “Personal Identification Based on

22

Page 23: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing

Handwriting,” Proc. 14th IAPR Inter. Conf. Pattern Recognition, pp.1761-1764, 1998.

[14] G. S. Peake and T. N. Tan, “Script And Language Identification From Document

Images,” Proc. BMVC97, vol. 2, pp. 169-184, Essex, UK, Sept. 1997.

[15] T. N. Tan, “Rotation Invariant Texture Features and Their Use in Automatic Script

Identification,” IEEE Trans. Pattern Anal. Machine Intell., vol. 20, no. 7, pp. 751-756,

1998.

[16] A. Schreyer, P. Suda and G. Maderlechner, “Font Style Detection in Documents Using

Textons”, Proc. of 3rd IAPR Document Analysis Systems Workshop, Nagano, Japan,

1998.

[17] B. Julesz and J. R. Bergen, “Textons, the Fundamental Elements in Preattentive Vision

and Perception of Textures”, The Bell System Technical Journal, Vol.62, No.6,

July-August, 1983, pp1619-1645.

23

Page 24: Font Recognition Based on Global Texture Analysis Recognition... · 2005-09-26 · In this paper, we describe a novel texture analysis based approach towards font recognition. Existing