A Grammar for Representing Uniform Local Binary Patterns (ULBP)

One of the recently invented theoretically simple and efficient operators that is playing a significant role in image processing, pattern recognition and other domains is the Local Binary Pattern (LBP). LBP measures the local texture features on a given neighbourhood efficiently. The Uniform LBP (ULBP) that is derived on LBP is treated as the fundamental unit of the textures. There 58 ULBP‟s out of 256 LBP‟s on a 3 x3 neighbourhood. Further the textures on average contain 75% to 90% of the patterns as ULBP only. One disadvantage is representing all 58 ULB‟S. To say whether a given LBP is uniform or not one should march the given LBP with 58 Patterns. Very few research scholars derived grammar to represent patterns that arises from 2-D images. The present paper addresses the above problem by generating a simple array grammar that represents all ULBP on a 3 x 3 neighbourhood or with 8 neighbours. The present paper tests the proposed Array Grammar model of ULBP (AG-ULBP) with various LBP patterns to prove its accuracy.


INTRODUCTION
Images and graphics are among the most important media formats for human communication and they provide a rich amount of information for people to understand the world. With the rapid development of digital imaging techniques and internet, more and more images are available to public. Consequently, there is an increasingly high demand for effective and efficient image indexing, retrieval, classification, recognition and analysis methods. That is the reason these methods has become one of the most popular topics in the field of pattern recognition and image processing. One of the problems faced by many researchers in the above fields is how to represent and index images with various patterns. An image pattern is one of the fundamental attribute of the image. In literature we found enormous models to represent string patterns, one of them is the grammar representation. A grammar is a notation that accurately represents the given strings. Initially grammars are used to recognize the strings or sentences represented by languages. In recent years researchers concentrated to represent images by using two-dimensional grammars. They are broadly categorized into two different types of models one, puzzle languages [1] and the other, recognizable picture languages [2]. The former introduced to solve certain problems of tiling, is a type of Rosenfeld model [3]. In the context free case, the generative capacity of puzzle grammars is the same as that of Context Free array grammars [1] but in the case of basic puzzle grammars consisting of an extension of the right linear rules, the generative power is higher than that of regular array grammars [5]. In 1990 two different types of picture language models called Puzzle languages and recognizable picture languages describing digitized pictures using 2 -D plane are introduced [2,3,4,6].Recently texture emerged as a powerful visual primitive to succinctly describe image content. Texture analysis and characterization was widely studied over the last three decades in a variety of applications, including medical imaging, remote sensing, pattern recognition, industrial inspection texture based image retrieval, human visual perception, and provides information for recognition and interpretation. An image texture is described by the number and types of its primitives and the spatial organization or layout of its primitives.The "Local Binary Pattern" (LBP) operator, first introduced by Ojala et al. [20], is a robust but theoretically and computationally simple approach for texture analysis. It brings together the separate statistical and structural approaches to texture analysis of both stochastic micro textures and deterministic macro textures simultaneously. The "Local Binary Pattern" (LBP) operator, first introduced by Ojala et al. [20], is a robust but theoretically and computationally simple approach. It is a grey-scale invariant texture measure computed from the analysis of a 3x3 local neighborhood over a central pixel. The LBP is based on a binary code describing the local texture pattern. This code is built by thresholding a local neighborhood by the grey value of its center. LBP is a simple yet efficient operator to describe local image pattern, and it has achieved impressive classification results on representative texture databases. The LBP brings together the separate statistical and structural approaches to texture analysis of both stochastic micro textures and deterministic macro textures simultaneously. The original LBP operator [20] has been extended in several ways, such as neighborhoods with different sizes [21], multi-resolution [17], uniform patterns [21], etc. The extended LBP operator can be used for rotation invariant texture classification, and has a wide application, such as texture analysis and classification [14], [15], [16], [19], [21], [22], [23], [24], [34], [35], [37], [38], face detection and recognition [8], [7], [9], [10], [11], [13], [26], [28], [36] image retrieval [27], etc. The LBP algorithms yield good classification results on large and complex databases [25]. Texture-based methods, especially those using Local Binary Patterns(LBP) Ojala, Pietikainen&Maeenpaa, (2002) [19], are proving particularly powerful and are now being employed in many state-of-the-art image classification system. Unay and Ekin (2008) [29] introduced a powerful search and retrieval method that used LBP with support vector machines (SVMs) to find relevant slices in brain magnetic resonance volumes. Also of note is the work of Keramidas, Iakovidis, Maroulis, and Dimitropoulos(2008) [12], who used LPB in a system that automated cell phenotype image classification. Other important papers that have investigated LBP in other application areas, for example smart guns and fingerprint identification, include the work of Nanni and Lumini (2008) [18] and Shang and Veldhis (2007) [30].
The present paper is organised as follows. The second section deals with the basic concepts of LBP and uniform LBP (ULBP). The third section derives the proposed array grammar model for ULBP and also discusses about its properties. The fourth section discuses about the power of the proposed grammar model in recognizing the ULBP"s and finally the fifth section derives the conclusions.

LBP APPROACH
In the LBP operator, a gray-scale invariant texture primitive, has gained significant popularity for describing texture of an image discussed by Ojalaetal. [31]. LBP characterizes the spatial structure of the local image texture in a significant manner. A pattern number in LBP is evaluated by comparing the centre pixel value of a 3 x 3 neighborhood with the neighboring pixels as given in Equation (1). Pattern numbers in LBP can be evaluated even on a 5 x 5 neighborhood. This refers to the third order neighborhood.
wheregc corresponds to the gray value of the center pixel of the local neighborhood and gp (p= 0,1,...,P-1) correspond to the gray values of P equally spaced pixels on a circle of radius R (R>0) that form a circularly symmetric neighbor set. Suppose the coordinates of gc are (0, 0), then the coordinates of gp are given by (-Rsin(2Пp/P), Rcos(2Пp/P)). The gray value of neighbor points which do not fall exactly in the centre of a pixel is calculated by linear interpolation of the corresponding pixels. The basic form of an LBP operator on a 3×3 square second order neighborhood labels the each pixel value into some binary value (either 0 or 1) by comparing it with some threshold value. Fig.1 shows an exemplary illustration for generation of LBP code. In Fig.1 the threshold is measured as the gray value of central pixel. If the neighboring pixels gray value is greater than or equal to central pixel value then it is made as 1 otherwise zero. The LBP code is formed by multiplying corresponding LBP weights with the corresponding LBP pixel value. The present paper considered the weights starting from the top left corner and moving towards right in a clock wise direction on a 3x3 neighborhood. The calculation of LBP code is described in Fig.1 and LBP weights can be ordered differently and they can be ordered in 8 different ways as shown in Fig.2

UNIFORM AND NON UNIFORM LBP
One of the problems with generation of LBP codes is one can generate 8-different LBP codes for the given LBP by by representing weights in 8-different ways as shown in fig 2. To overcome this, researchers [32,33] started representing LBP based on the circular transitions from 0 to 1 or 1 to 0.
An LBP generates a total of 256 patterns ranging from 0 to 255. Considering such a huge size of patterns for classification purpose, is a very complex task and tedious process. To overcome this, LBP patterns are divided in to uniform and non uniform patterns. Ojala et al. [32,33] introduced a special case of LBP the "Uniform LBP" (ULBP), which played a significant role in many classification and recognition issues of textures. A pattern is considered "uniform" (U) if the number of transitions in the sequence between 0 to 1 or 1 to 0 is less than or equal to two. It was observed by Ojala et al. [32,33] that ULBP seem to be fundamental properties of texture. That is, the larger the uniformity value U is, the more likely is that spatial transition occurs in the local pattern.  [32] that in texture images, majority of LBP features can be categorized to be uniform. In practice, all the non-uniform patterns (U>2) are grouped under a ""miscellaneous"" label, while each uniform LBP is cast into a unique histogram bin according to its decimal value. That is the total number of non uniform patterns are 256 -58 = 198. The ULBP forms only 23 % of total number of LBP"s with 8-neighboring pixels. Non uniform patterns fall in to a large category of patterns.
From the above discussion it is well understood that by considering only the 58 ULBP"S one can easily estimate or recognize or analyze the image texture domain problems related to various areas of image processing and pattern recognition. The present paper is aimed to represent the ULBP in a grammatical representation instead of a table that contains 58 entities.

Properties of the derived AG-ULBP
Property one: The derived AG-ULBP is a regular grammar. All the productions of the proposed AG-ULBP contains only single non terminal on the right side of the production. By definition all the closure properties of a regular Grammar is also true for the derived AG-ULBP.
Property two: The derived AG-ULBP is a Right linear Grammar. A grammar is said to be Right Linear if it contains productions of the form A  @B | @ where A and B are single non terminals and @ is a set of terminals. The productions of the derived AG-ULBP satisfy this condition and hence it is a right linear grammar. The derived AG-ULBP does not suffer with problems of left recursion, since it is a right linear grammar.
Property three: one can generate NFA and DFA for the derived AG-ULBP, since it is a Right linear Grammar. By definition of right linear Grammar, there exist a DFA for all right linear grammar and they are not ambiguous.
Property four: The derived AG-ULBP is non ambiguous because it is a right linear grammar. No pattern will be generated by the derived AG-ULBP by two or more different productions.
Property five: The derived AG-ULBP is also a Greibatch Normal Form (GNF), because all its productions begin with a terminal symbol. A grammar is said to be GNF, if it contains productions of the form A  @W where @ is a set of terminals, but not null and w can be set of non-terminals or can be null. N o v e m b e r 1 2 , 2 0 1 4

RESULTS AND DISCUSSIONS
To test the accuracy and efficacy of the proposed AG-ULBP the following 8-bit Local Binary Patterns (LBP"s) are given as input and the Left most derivation is followed in recognizing the LBP"s as ULBP or NULBP. There are three approaches to recognize the strings. The advantage of the proposed ULBP-AG model is, it can recognize the ULBP using the parse tree, leftmost derivation or right most derivation.
The proposed ULBP-AG recognizes the following LBP"s as ULBP or NULBP by using leftmost derivation. A leftmost derivation starts from starting non terminal and expands the leftmost non terminal in each step, if there is a match occurs. The leftmost derivation scans the given LBP form left to right only.
In the following example if the AG-ULBP recognizes the pattern means it is a ULBP otherwise it is NULBP. No production of G derives a string starting with 01. Therefore the given LBP 0 0 0 0 0 1 0 1 is a NULBP.

CONCLUSIONS
The present paper derived a grammar to represent the 58 different ULBPS and 178 NULBP"s of LBP. If a LBP is recognized by the proposed AG-ULBP then it is an ULBP otherwise it is an NULBP. The proposed AG-ULBP overcomes the disadvantage of creating an index table with 256 entries for recognizing ULBP"s and NULBP"s. The proposed AG-ULBP is a right linear, exhibits the property of GNF and non-ambiguous grammar. The advantage of the proposed AG-ULBP is, it only takes a maximum of four derivations to say whether the given LBP on a 3 x 3 neighbourhood is an ULBP or NULBP.