Local Patterns for Face Recognition Local Patterns for Face Recognition

The main objective of the local pattern is to describe the image with high discriminative features so that the local pattern descriptors are more suitable for face recognition. The word “ local ” represents the measured image with the subregion and is the key in this chapter. Regardless of the techniques proposed, the local pattern is one of the most interesting areas in face recognition. The local facial descriptor is a local pattern that generates the descriptor by considering the subregion of an image. Techniques based on various combination methods from the local facial descriptors are not unusual. This chapter is concerned primarily to help the reader to develop a basic understanding of the local pattern descriptors and how they apply to face recognition. We begin to describe the outline of the local pattern in face recognition and its relative facial descriptors. Next, we give an introduction to the popular local patterns and establish examples to demonstrate the process of each method. To the end of this chapter, we conclude those methods with a discussion of issues related to the properties of the local patterns.


Introduction
Due to the intelligence security monitoring is more popular in recent years, the automatically recognizing face is needed for various visual surveillance systems, for example the accessing control system for personal or company to verify the legal/illegal people, policing system for identifying the thief and the robber who presents the illegal behavior in public or private space. To construct an efficient face recognition system, the facial descriptor with discriminated characteristic is required.
The facial descriptor refers to the process of extracting the discriminative features to represent a given face image. Numerous methodologies are proposed to recognize face and those can be classified as global and local facial descriptors. The global facial descriptor describes the facial characteristics with the whole face image, such as principal component analysis (PCA) [1,2] and linear discriminant analysis (LDA) [3,4]. PCA converts the global facial descriptor from high dimension to low dimension by using the linear transform methodology to reduce the computational cost. Linear discriminant analysis (LDA) also called the Fishers Linear Discriminant is similar to PCA, while it is a supervised methodology. Although the global facial descriptor can extract the principal component from the facial images, reduces the computational cost, and maintains the variance of the facial image, the performance is sensitive to the change of the environment, such as the change of light.
The flexibilities of the local facial descriptors are better than the global facial descriptors because they successfully and effectively represent the spatial structure information of an input image. A well local facial descriptor generates discriminative and robust features to achieve good recognition results with computational simplicity. In this chapter, we represent a number of approaches in the local facial descriptor including the local binary pattern (LBP), local derivation pattern (LDP), local tetra pattern (LTrP), local vector pattern (LVP) and local clustering pattern (LCP).

Local pattern descriptor
A local pattern considers the variations of subregion in an image, which is also called a micropattern. In this section, we introduce the basic and several popular techniques of local pattern descriptor for facial recognition.

Local binary pattern
Local binary pattern (LBP) [5] is designed to describe the texture in a local neighborhood is an invariant texture measure and has been various comparative studies, such as fingerprint recognition [6], face recognition [7], and license plate recognition [8]. The main characteristics of LBP are: (1) highly discriminative capability (2) and computational efficiency.
The basic LBP encodes the pixels of an image by thresholding 3 Â 3 neighborhood of each pixel with the given referenced pixel X c and concatenates the results to form a binary expression, as shown in Figure 1. The equation of basic LBP operator is formulated as follows: where X p , p ¼ 1, …, 8 is a neighborhood of the referenced pixel X c in the local subregion of an image I. f 1 Á; Á ð Þ is the coding scheme which decides the binary number of each neighborhood, called the threshold function and this can be expressed as where p is the index of the neighborhoods which is surrounding the referenced pixel X c . and T 1 is the threshold. f 1 Á; Á ð Þ represents the gradient variation between a given referenced pixel X c and its neighborhoods. In practical, the threshold T 1 can be set to 0, if f 1 I X p À Á ; I X c ð Þ À Á ¼ 0, it means the neighborhoods X p have higher gradient information compared with referenced pixel X c . Figure 2 is an example of generating an LBP micropattern. Figure 2 demonstrates that LBP is generated by using Eqs. (1) and (2) from X 1 to X 8 and encodes the binary pattern of a give reference pixel X c as 10011111. Figure 3 demonstrates the spatial distribution of the example of LBP as shown in Figure 2 in one-dimensional. In Figure 3, the neighborhoods, which are encoded as 1, are arranged on the right of reference pixel X c , and the others are  arranged on the left of reference pixel X c . The distance is the gradient variant between reference pixel and its neighborhoods as shown in Figure 3.
Furthermore, to address the problem of the textures at different scales, there are some followers which extend to use neighborhoods with various scales [9,10]. To compare with basic LBP, the local neighborhoods are evenly spaced on a circle centered at the reference pixel X c , and the formulation of Eqs. (1) and (2) is re-formulated as follows: where r is the radius between the referenced pixel X c and its neighborhood pixels X p . Figure 4 illustrates examples of circular neighborhoods with any radius and number of sampling points. The neighbor that does not fall in the center of a pixel is estimated by using bilinear interpolation.

Local derivative pattern
LBP is a nondirectional first-order local derivative pattern of images and fails to extract more detailed information, such as the directions between neighborhoods and referenced pixel, and the high-order gradient information. Local derivative pattern (LDP) can be considered as an  extension of LBP with directional high-order local derivative pattern [11]. To encode the n thorder LDP, the n À 1 ð Þ th -order local derivative variations with various distinctive spatial relationships along 0 ∘ , 45 ∘ , 90 ∘ , and 135 ∘ directions are used. The first-order derivatives of the referenced pixel X c along 0 ∘ , 45 ∘ , 90 ∘ , and 135 ∘ directions can be written as where I is a given image, X c is the referenced pixel and X p , p ¼ 1, 2, 3, 4 are the neighborhoods of X c as shown in Figure 1. Then, the second-order LDP can be encoded as, where α is derivative direction at referenced pixel X c along 0 ∘ , 45 ∘ , 90 ∘ , and 135 ∘ directions and f 2 Á; Á ð Þ is the binary coding function which describes the spatial relationship between referenced pixel X c and its neighborhoods X p in various derivative directions, and that can be expressed as The spatial relationship between two pixels includes the conditions of turning and monotonically increasing/decreasing and be coded as 1 and 0 in LDP, respectively.
Finally, the second-order LDP is defined as the concatenation of the four directional LDPs The n À 1 ð Þ th -order derivatives along 0 ∘ , 45 ∘ , 90 ∘ , and 135 ∘ directions are calculated by modifying Eqs. (5)- (8) and be re-formulated as Then, the n th -order LDP, LDP n α X c ð Þ, in α derivative direction at referenced pixel X c is expressed as An example of high-order derivative is shown in Figure 5. Figure 5(a) is the original value of image, Figure 5(b) is the first-order derivative in 0 ∘ direction by using Eq. (5), and Figure 5(c) is the second-order derivative in 0 ∘ direction by using Eq. (12) with the value in Figure 5(b). Figure 6 demonstrates an example to encode the second-order LDP in 0 ∘ direction. To encode the second-order LDP, the results of first-order derivatives are needed. Taking the bit 1 as an example, the results of first-order derivatives of referenced pixel X c and the neighborhood X 1 are 7 À 3 ð Þ¼4 and 4 À 9 ð Þ¼À5, respectively. The spatial relationship between neighborhood X 1 and referenced pixel X c is turning 7 À 3 ð ÞÂ 4 À 9 ð Þ¼À20 ≤ 0. Therefore, we encode the bit 1 as 1 by Eq. (10). Similarly, the spatial relationship between referenced pixel X c and neighborhoods pixels X p ,p ¼ 4, 5, 7, 8 presents the turning and be encoded as "1". The reset of neighborhoods pixels is encoded as "0". The second-order LDP in 0 ∘ direction, LDP 2 P, R¼1, α¼0 ∘ , is encoded as "10011011". According to the same encoding process, the results of second-order LDP in 45 ∘ , 90 ∘ and 135 ∘ are LDP 2 P, R¼1, α¼45 ∘ ¼ 01110100, LDP 2 P, R¼1, α¼90 ∘ ¼ 11100001, and LDP 2 P, R¼1, α¼135 ∘ ¼ 10011101, respectively. Finally, LDP 2 P, R¼1 ¼ 1001101101110100111000011 0011101 with 32-bit is generated by concatenating the four 8-bit LDPs with various derivative directions. Figure 7 demonstrates the spatial distribution of example of LDP in 0 ∘ direction in onedimensional. In Figure 7, the evaluation results of LDP in 0 ∘ direction are normalized into the region of À8 8 ½ , the neighborhoods that are encoded as 1 are arranged on the left of 0, and the others are arranged on the right of 0. The distance is the magnitude of gradient variant between reference pixel X c and its neighborhoods.

Local tetra pattern
Local tetra pattern (LTrP) [12] adopts the concepts of LBP and LDP which extends the spatial relationship from one-dimensional to two-dimensional. LTrP uses two high-order derivative directions with four distinct values to encode the micropattern for extract more discriminative information. The n th -order LTrP is derivative from n À 1 ð Þ th -order derivatives along 0 ∘ and 90 ∘ which can be written as where X c is the referenced pixel, X h:R and X v:R horizontal and vertical neighborhoods of referenced pixel X c , respectively; R is the distance between reference pixel X c and its neighbor- Þ-order derivatives in 0 ∘ and 90 ∘ directions, respectively; Þ-order derivatives in 0 ∘ and 90 ∘ directions, respectively. Then, the direction of the referenced pixel X c can be expressed as the quadrant representation and be defined as where I nÀ1 Dir X c ð Þ describes the direction of the referenced pixel X c along 0 ∘ and 90 ∘ directions with quadrant. Then, the n th -order tetra pattern of referenced pixel X c , LTrP n P, R X c ð Þ, is encoded as where f 3 Á; Á ð Þ is the coding function which describes the referenced pixel X c with four quadrants and be written as Figure 8 illustrates the coding scheme of Eq. (21), if the quadrant of the referenced pixel X c is as same as its neighborhood, the corresponding bit of tetra pattern is assigned to be "0", otherwise, the bit is assigned to be the same as the neighborhood. Then, the tetra patterns are decomposed into three binary patterns as follows: where Dir contains four quadrants except the quadrant of the referenced pixel X c and f 4 Á; Á ð Þ is a coding function to generate the three binary patterns. Similarly, the three tetra patterns are encoded according to the abovementioned procedure for the rest directions of the referenced pixel. Therefore, the four tetra patterns with 12 8-bit binary patterns are generated. Moreover, the 13th 8-bit binary pattern is considered which is the magnitudes of horizontal and vertical first-order derivatives and be calculated by the following equation, where M X p À Á is the magnitudes of horizontal and vertical first-order derivatives and f 5 Á; Á ð Þ is a coding function to generate the binary patterns of the magnitude. Figure 9 demonstrates an example of the second-order LTrP which takes a subregion as shown in Figure 5(a) as an example. The quadrant of referenced pixel X c is 4, which is assigned by using Eq. (18) with the first-order derivatives in 0 ∘ and 90 ∘ directions. Similarly, the quadrants of each neighborhood of referenced pixel X c are 2, 1, 1, 3, 3, 3, 3, 2, respectively. We take the neighborhood pixel X 1 as an example, the quadrants of X c and X 1 are 4 and 2, respectively, which is not the same. Thus, the corresponding bit of the LTrP is assigned to be "2" as shown in Figure 9. Similarly, the remaining bits of the LTrP are encoded by using the same procedure and the complete LTrP can be expressed as LTrP 2 P, R ¼ 21133332. Then, the tetra pattern is decomposed into three 8-bit binary pattern according to Eq. (22). To generate the first 8-bit binary pattern, the tetra pattern with symbol "1" is set to be "1", and the rest symbols of tetra pattern are set to be "0". Then, we obtain the first 8-bit binary pattern "01100000". Repeatedly, we generate the other 8bit binary patterns "10000001" and "00011110" by considering the tetra pattern values "2" and" 3 00 , respectively. Finally, the 12 8-bit binary pattern is obtained by concatenating the rest tetra patterns with three directions (1, 2, and 3) of referenced pixel. The additional binary pattern is obtained from the magnitude and be encoded as "10111110 00 .

Local vector pattern
Local vector pattern (LVP) [13] is inspired by local binary pattern (LBP) which is sample and intuitive. To compare with LBP and LDP, LVP further considers the neighborhood relationship with various distances from different directions and the relationship between various derivative directions.
LVP is a micropattern in high-order derivative space which considers the direction value in encoding procedure, as shown in Figure 10. The derivative direction vector of the referenced pixel X c , V β, D X c ð Þ, with various directions and distance are formulated as where I is a local subregion of an image, β is the index of angle (direction), and D is the distance between referenced pixel X c and its neighbors. V β, D X c ð Þ is the derivative vector of the referenced pixel X c along the β direction with D distance. Figure 10 demonstrates the distance between X c and its neighbors are 1, 2, and 3 and are marked with green, blue and yellow, respectively. The LVP, LVP β X c ð Þ, in β derivative direction at referenced pixel X c is encoded as where f 5 Á; Á ð Þ is the coding function which can be formulated as Finally, the LVP of referenced pixel X c is defined as the four 8-bit binary patterns, as shown in the following, To extend the discriminative of 2D spatial structures, LVP integrates four pairwise directions (0 ∘ À 45 ∘ , 45 ∘ À 90 ∘ , 90 ∘ À 135 ∘ , 135 ∘ À 0 ∘ ) of vector to form a 32-bit binary pattern for each referenced pixel X c .
The coding function of LVP is a weight vector of dynamic linear decision function which is a comparative space transform (CST) and addresses the two-class problem in pattern recognition. The dynamic linear decision function, CST X p, R À Á , can be formulated as where w X c ð Þ T and v X p, R À Á are the weight vector and pairwise direction value of the neighborhoods which are surrounded by referenced pixel X c in two different directions. The formulations of w Á ð Þand v Á ð Þ can be expressed as, where the first term of w Á ð Þ is to describe the original value of neighborhood pixel X p, R at β þ 45 ∘ À Á direction and the second term is the transform ratio which compares the derivative value of the neighborhood X p, R in β direction to that of in β þ 45 ∘ À Á direction surrounds around the referenced pixel X c . v Á ð Þ is the augmented pattern which presents the pairwise direction values of vector of neighborhood pixel X p, R . Then, Eq. (30) can be rewritten as, We take the example of the local subregion of an image as shown in Figure 5(a) to illustrate the encoding process of generating first-order LVP, as shown in Figures 11 and 12. Figure 11 illustrates the first-order LVP of the referenced pixel X c ¼ 7 in β ¼ 0 ∘ direction. In Figure 11, we calculate the pairwise derivative direction vector of the referenced pixel X c to form the 2D spatial structures, as shown in Figure 12. In Figure 12, the pairwise derivative direction vectors V β, D X c ð Þ and V βþ45 ∘ , D X c ð Þ are indicated as x-and y-axis, respectively, in which, β ¼ 0 ∘ and D ¼ 1. The first-order derivative direction value of referenced pixel X c and its neighborhoods in directions β ¼ 0 ∘ and β þ 45 ∘ ¼ 45 ∘ are shown in Figure 13. Then, we calculate the transform ratio Vβþ45 ∘ ,D Xc ð Þ Vβ,D Xc ð Þ ¼ À1 4 ¼ À0:25 which is used to transform the β-direction value of the neighborhoods to comparative space β þ 45 ∘ -direction. The CST value of neighborhood pixel X 1 ¼ 4 of referenced pixel X c ¼ 7 is evaluated according to Eq. (33) (CST X 1, 1 ð Þ¼ Then, the first corresponding bit of the 8-bit binary codes of LVP P, R, 0 ∘ X c ð Þ ¼ 01100100 is encoded by using sign function. Similarly, the rest of LVPs with various pairwise directions are LVP P, R, 45 ∘ X c ð Þ ¼ 10101011,LVP P, R, 90 ∘ X c ð Þ ¼ 11100001, and LVP P, R, 135 ∘ X c ð Þ ¼ 00101101. The four binary pattern LVPs are concatenated to generate LVP P, R X c ð Þ ¼ 011001001010101 11110000100101101.

Local clustering pattern
Local clustering pattern (LCP) [14] is designed to solve the problems in face recognition: (1) to reduce feature length with low computational cost and (2) to enhance the accuracy for face recognition. To generate the local clustering pattern, four phases have to be considered: (1) to generate the local derivative variations with various directions; (2) to project the local derivative Figure 11. Example of first-order LVP in β ¼ 0 ∘ direction.
variations with various directions on the pairwise combinatorial directions in the rectangular coordinate system; (3) to transform the coordinate from the rectangular coordinate system into the polar coordinate system; and (4) encoding the facial descriptor which is local clustering pattern, as a micropattern for each pixel by applying the clustering algorithm. The details are described in the following subsections: local clustering pattern (LCP) and coding scheme.

Local clustering pattern
Taken a subregion image I X ð Þ as an example, as shown in Figure 1, in which X c is the referenced pixel and X p , p ¼ 1, ⋯, 8 are the adjacent pixels around X c . LCP firstly generates the first-order derivatives of X c , I 0 α X c ð Þ, in various directions and can be written as where α is the derivative direction including 0 ∘ , 45 ∘ , 90 ∘ , and 135 ∘ directions. Then, the LCP is generated by integrating the pairwise combinatorial directions of the derivative variations, 0 ∘ À 45 ∘ , 45 ∘ À 90 ∘ , 90 ∘ À 135 ∘ and 135 ∘ À 0 ∘ , in polar coordinate system. The generation of LCP in pairwise combinatorial direction can be expressed as, where f r, θ Á; Á ð Þ is the coding scheme and D ¼ 1, 2, 3 is the distance between referenced pixel X c and its adjacent pixels X p , as shown in Figure 10. The coding scheme is executed in the polar coordinate system, and the formula can be formally defined as follows, where C i is the cluster center. Finally, the LCP at referenced pixel X c , LCP X c ð Þ, is combinatorial of the four 8-bit binary patterns LCPs, and can be formally as

Coding scheme
In this subsection, we further discuss the coding scheme in LCP which is considered as the problem of classification. The coding scheme of LCP is executed in the polar coordinate system based on the characteristics of the derivative variations in the pairwise combinatorial directions.
First, four combinations of the derivative variations in the pairwise directions are utilized in LCP, including 0 ∘ À 45 ∘ , 45 ∘ À 90 ∘ , 90 ∘ À 135 ∘ , and 135 ∘ À 0 ∘ . The coordinate of the pairwise combinatorial directions of the derivative variations is in the rectangular coordinate system (RCS). To consider the magnitude and orientation between pairwise combinatorial directions, the coordinate is transformed from the rectangular coordinate system (RCS) into the polar coordinate system (PCS) by calculating the magnitude m ð Þ and orientation θ ð Þ for each pair directions of derivative variations. The magnitude m ð Þ and orientation θ ð Þ of X p are calculated as where Àπ 2 < θ γ < π 2 is normalized to 0 ∘˜3 60 ∘ .
The feature vectors v are m γ and θ γ coordinate in the polar coordinate system and can be written as where γ ∈ α and n ¼ 1˜9 are the pixels in the subregion image I X ð Þ including the referenced pixels and its adjacent pixel in the polar coordinate system. LCP is ensemble of several decisions from the results of clustering. Each clustering result is considered as a problem of a two-class case, whose center vector C is written as where C 1 and C 2 are the two-class centers, in which C 1 is also the center of X c . To classify the feature vectors v in sub-image I, we randomly initialize two-class centers C and adopt the kmeans clustering algorithm for classification. The clustering procedure is repeated T times to find the cluster two-class centers C i that have the highest probability P C i v j Þ ð .
The adjacent pixels of the reference pixel X c are encoded as the following equation, where C 1 is the cluster center which includes X c .

Example
The local subregion of an image as shown in Figure 5(a) is taken as an example to illustrate the encoding process of generating first-order LCP, as shown in Figure 14. First, LCP calculates the first-order derivatives along 0 ∘ and 45 ∘ directions as shown in Figure 13. Then, the coordinates of referenced pixel X c and its neighborhoods are translated from rectangular coordinate system (RCS) into polar coordinate system (PCS). The results of coordinate translation are shown in Figure 14. After that, the clustering technique is applied to find the centers of two clusters, as indicated as the hollow rectangles with red and purple colors, respectively. Only X 5 belongs to the second class, the rest pixels belong to the first class. Then, the corresponding bit of the 8-bit binary codes of LCP P, R, 0 ∘ X c ð Þ ¼ 00001000.

Comparison
In this section, we discuss the characteristics of the local patterns descriptors as mentioned. The local binary pattern (LBP) generates the local facial descriptor by comparing the gray value between referenced pixel and its adjacent pixels for each pixel in the face image. The texture information, such as spots, lines and corners, in the images is extracted. Although LBP considers the spatial information to generate the local facial descriptor, it omits the directional information and is sensitivity when light is slightly changed.
The local derivation pattern (LDP) analyzes the turnings between referenced pixel and its neighborhoods from the derivative values. The derivative values with four directions are considered to generate the local facial descriptor in the high-order derivative space. However, the turnings between referenced pixel and its neighbors are discussed in the same derivative direction.
The local tetra pattern (LTrP) utilized the two-dimensional distribution with derivative values in four quadrants to describe the texture information and that can extract more discriminative information. Although LTrP considers the derivative variations with two dimensions, there exist two problems: (1) the dimension of facial descriptor and (2) the sensitivity of the features.
To compare with LBP and LDP, the dimension of facial descriptor of LTrP is high. The features of LTrP in the four quadrants of the rectangular (or Cartesian) coordinate system are altered when illumination is changed.
The local vector pattern (LVP) designs the comparative space transform (CST) and that is associated with the pairwise directions of vector to encode the micropatterns. Comparing LVP with LBP, LDP, and LTrP, LVP not only successfully extracts distinctive information but also reduces the feature length. However, its computational cost is higher than LBP and LDP.
The local clustering pattern (LCP) derivatives the local variations with multidirections and that are integrated to form the pairwise combinatorial direction. To generate the discriminative local pattern, the features of local derivative variations are transformed into the polar coordinate system by generating the characteristics of magnitude (m) and orientation (θ). LCP generates the discriminative local clustering pattern with low-order derivative space and low computational cost which are stable in the process of face recognition. The summarization of each method is demonstrated in Table 1.
In Table 1, we analyze these methods with three indicators: (1) information used, (2)  The distribution of coding scheme is to present how many directions of used information are considered in coding at each time. LBP and LDP generate the micropattern by considering a single direction at each time, for example, LDP generates the micropatterns of one direction at a time and then integrates the results of each direction to form the facial descriptor; LTrP considers two-direction information, horizontal and vertical, when coding; LVP and LCP use the pairwise combinatorial directions.
The feature length is to demonstrate the feature length of each micropattern. LBP considers eight neighborhoods and its feature length is 8; LDP further considers four directions including 0 ∘ , 45 ∘ , 90 ∘ , and 135 ∘ , its feature length is 8 Â 4 ¼ 32 bits, in which "8" is the number of neighborhood of referenced pixel and "4" is the number of derivative directions; the feature length of LTrP is 8 of referenced pixel, "3" is the number of the binary patterns in a tetra pattern, "4" is the number of the tetra patterns, and "1" number of the binary pattern which is obtained from the magnitude; the feature length of LVP and LCP is 8 Â 4 ¼ 32 bits, where "8" is the number of neighborhood of referenced pixel, and "4" is the number of pairwise combinatorial directions.

Summary
The principal object of this chapter is to present the local pattern descriptors for understanding and accessing the facial descriptor in face recognition. The concept of local pattern is sample and intuitive, and the extended techniques of the basic local pattern are widely used in various areas. A partial listing of local pattern descriptors includes local binary pattern (LBP), local derivative pattern (LDP), local tetra patterns (LTrP), local vector pattern (LVP) and local clustering pattern (LCP) are widely applied to variety of image processing problems such as object detection, object recognition, image retrieval, fingerprint recognition, character recognition, face recognition, license plate recognition. Since it is impractical to cover all the approaches of local pattern descriptor in a single chapter, the basic and popular techniques included are chosen for their value in introducing and clarifying fundamental concepts in the field.