2.3. 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 nth-order LTrP is derivative from ð Þ <sup>n</sup> � <sup>1</sup> th-order derivatives along 0<sup>∘</sup> and 90<sup>∘</sup>

Local Patterns for Face Recognition

97

http://dx.doi.org/10.5772/intechopen.76571

which can be written as

Figure 6. Example to encode second-order LDP in 0<sup>∘</sup> direction.

Figure 5. Example of high-order derivative in 0<sup>∘</sup> direction. (a) Original values (b) First-order (c) Second-order.

Figure 6. Example to encode second-order LDP in 0<sup>∘</sup> direction.

LDP<sup>n</sup>

LDP in 45<sup>∘</sup>

directions.

2.3. Local tetra pattern

LDP<sup>2</sup>

<sup>α</sup>ð Þ¼ Xc f <sup>2</sup> I

n�1 <sup>α</sup> ð Þ Xc ; I

96 From Natural to Artificial Intelligence - Algorithms and Applications

, 90<sup>∘</sup> and 135<sup>∘</sup> are LDP<sup>2</sup>

between reference pixel Xc and its neighborhoods.

P,R¼1,α¼135<sup>∘</sup> <sup>¼</sup> 10011101, respectively. Finally, LDP<sup>2</sup>

n�1 <sup>α</sup> Xp,R

<sup>p</sup> <sup>¼</sup> <sup>1</sup>; <sup>2</sup>; <sup>⋯</sup>; P; R <sup>¼</sup> <sup>1</sup>, <sup>α</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup>

hoods pixels is encoded as "0". The second-order LDP in 0<sup>∘</sup> direction, LDP<sup>2</sup>

encoded as "10011011". According to the same encoding process, the results of second-order

0011101 with 32-bit is generated by concatenating the four 8-bit LDPs with various derivative

Figure 7 demonstrates the spatial distribution of example of LDP in 0<sup>∘</sup> direction in onedimensional. In Figure 7, the evaluation results of LDP in 0<sup>∘</sup> 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

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

Figure 5. Example of high-order derivative in 0<sup>∘</sup> direction. (a) Original values (b) First-order (c) Second-order.

P,R¼1,α¼45<sup>∘</sup> <sup>¼</sup> 01110100, LDP<sup>2</sup>

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<sup>∘</sup> direction by using Eq. (5), and Figure 5(c) is the second-order derivative in 0<sup>∘</sup> 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<sup>∘</sup> 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 Xc and the neighborhood X<sup>1</sup> are 7ð Þ¼ � 3 4 and 4ð Þ¼� � 9 5, respectively. The spatial relationship between neighborhood X<sup>1</sup> and referenced pixel Xc 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 Xc and neighborhoods pixels Xp,p ¼ 4, 5, 7, 8 presents the turning and be encoded as "1". The reset of neighbor-

, 45<sup>∘</sup> , <sup>90</sup><sup>∘</sup> , <sup>135</sup><sup>∘</sup> <sup>j</sup> (16)

P,R¼1,α¼0<sup>∘</sup> , is

P,R¼1,α¼90<sup>∘</sup> <sup>¼</sup> 11100001, and

P,R¼<sup>1</sup> <sup>¼</sup> <sup>1001101101110100111000011</sup>

directions with four distinct values to encode the micropattern for extract more discriminative information. The nth-order LTrP is derivative from ð Þ <sup>n</sup> � <sup>1</sup> th-order derivatives along 0<sup>∘</sup> and 90<sup>∘</sup> which can be written as

Figure 7. Spatial distribution of example of LDP in 0<sup>∘</sup> direction.

$$I\_{0^{\*}}^{n-1} = I\_{0^{\*}}^{n-2}(X\_{h,R}) - I\_{0^{\*}}^{n-2}(X\_{c}) \tag{17}$$

$$I\_{90^\*}^{n-1} = I\_{90^\*}^{n-2}(X\_{v,\mathcal{R}}) - I\_{90^\*}^{n-2}(X\_c) \tag{18}$$

LTrPn

Figure 8. Illustration of coding LTrP micropattern.

<sup>f</sup> <sup>4</sup> LTrPn

� � � �

P,Rð Þ Xc � �

first-order derivatives and be calculated by the following equation,

M Xð Þ¼<sup>i</sup>

� � � M Xð Þ<sup>c</sup>

f <sup>5</sup> M Xp

where M Xp

LTrPP,M ¼ f <sup>5</sup> M Xp

I 1 <sup>0</sup><sup>∘</sup> Xp � � � � <sup>2</sup>

� � <sup>¼</sup> <sup>1</sup>, if M Xp

P,R Dir <sup>¼</sup> <sup>f</sup> <sup>4</sup> LTrPn

� � � � � �

Dir ¼

8 < :

where Dir contains four quadrants except the quadrant of the referenced pixel Xc and f <sup>4</sup>ð Þ �; � 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

P,Rð Þ Xc � �

0, else

� � � M Xð Þ<sup>c</sup> � ��

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

� � � � <sup>2</sup> <sup>q</sup>

� � is the magnitudes of horizontal and vertical first-order derivatives and <sup>f</sup> <sup>5</sup>ð Þ �; � is a

<sup>0</sup>, else �

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 Xc is 4, which is assigned by using Eq. (18) with

þ I 1 <sup>90</sup><sup>∘</sup> Xp

�

� � � M Xð Þ<sup>c</sup> <sup>≥</sup> <sup>0</sup>

<sup>p</sup>¼1, <sup>2</sup>,⋯<sup>P</sup> (23)

Local Patterns for Face Recognition

99

http://dx.doi.org/10.5772/intechopen.76571

1, if LTrPn

� � � �

Dir, <sup>p</sup>¼1,2,⋯<sup>P</sup>

P,Rð Þ¼ Xc Dir

(22)

(24)

(25)

where Xc is the referenced pixel, Xh:<sup>R</sup> and Xv:<sup>R</sup> horizontal and vertical neighborhoods of referenced pixel Xc, respectively; R is the distance between reference pixel Xc and its neighborhood; I n�2 <sup>0</sup><sup>∘</sup> ð Þ� , I n�2 <sup>90</sup><sup>∘</sup> ð Þ� are the ð Þ <sup>n</sup> � <sup>2</sup> -order derivatives in 0<sup>∘</sup> and 90<sup>∘</sup> directions, respectively; I n�1 <sup>0</sup><sup>∘</sup> ð Þ� , and I n�1 <sup>90</sup><sup>∘</sup> ð Þ� are the ð Þ <sup>n</sup> � <sup>1</sup> -order derivatives in 0<sup>∘</sup> and 90<sup>∘</sup> directions, respectively. Then, the direction of the referenced pixel Xc can be expressed as the quadrant representation and be defined as

$$I\_{Dir}^{n-1}(\mathbf{X}\_c) = \begin{cases} \mathbf{1}, \ I\_{0^0}^{n-1}(\mathbf{X}\_c) \ni 0 \text{ and } \ I\_{90^0}^{n-1}(\mathbf{X}\_c) \ni 0 \\\\ \mathbf{2}, \ I\_{0^0}^{n-1}(\mathbf{X}\_c) < 0 \text{ and } I\_{90^0}^{n-1}(\mathbf{X}\_c) \ni 0 \\\\ \mathbf{3}, \ I\_{0^0}^{n-1}(\mathbf{X}\_c) < 0 \text{ and } I\_{90^0}^{n-1}(\mathbf{X}\_c) < 0 \\\\ \mathbf{4}, \ I\_{0^0}^{n-1}(\mathbf{X}\_c) \ni 0 \text{ and } I\_{90^0}^{n-1}(\mathbf{X}\_c) < 0 \end{cases} \tag{19}$$

where I n�1 Dir ð Þ Xc describes the direction of the referenced pixel Xc along 0<sup>∘</sup> and 90<sup>∘</sup> directions with quadrant. Then, the nth-order tetra pattern of referenced pixel Xc, LTrP<sup>n</sup> P,Rð Þ Xc , is encoded as

$$\left.LTr\mathbf{P}\_{\mathbf{P},\mathbf{R}}^{\mu}(\mathbf{X}\_{\mathbf{c}}) = \left\{ f\_{\mathfrak{J}}\left(I\_{\mathrm{Dir}}^{n-1}\left(\mathbf{X}\_{\mathfrak{p},\mathbf{R}}\right), I\_{\mathrm{Dir}}^{n-1}(\mathbf{X}\_{\mathbf{c}})\right) \right\} \vert\_{\left\|\mathbf{p}=\mathbf{1},2,\cdots,\mathbf{P};\mathbf{R}=\mathbf{1}} \tag{20}$$

where f <sup>3</sup>ð Þ �; � is the coding function which describes the referenced pixel Xc with four quadrants and be written as

$$\begin{aligned} \, \_f f\_3 \left( I\_{\text{Dir}}^{n-1} \{ \mathbf{X}\_{p,\mathbb{R}} \} , I\_{\text{Dir}}^{n-1} (\mathbf{X}\_{\mathbb{C}}) \right) &= \begin{cases} \, \_{\text{Dir}} I\_{\text{Dir}}^{n-1} \{ \mathbf{X}\_{p,\mathbb{R}} \} , & \text{if } I\_{\text{Dir}}^{n-1} \{ \mathbf{X}\_{p,\mathbb{R}} \} \neq I\_{\text{Dir}}^{n-1} (\mathbf{X}\_{\mathbb{C}})\\ \mathbf{0} & \text{else} \end{cases} \end{aligned} \tag{21}$$

Figure 8 illustrates the coding scheme of Eq. (21), if the quadrant of the referenced pixel Xc 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:

Figure 8. Illustration of coding LTrP micropattern.

I n�1 <sup>0</sup><sup>∘</sup> ¼ I

Figure 7. Spatial distribution of example of LDP in 0<sup>∘</sup> direction.

98 From Natural to Artificial Intelligence - Algorithms and Applications

I n�1 <sup>90</sup><sup>∘</sup> ¼ I

hood; I

defined as

where I

n�1

rants and be written as

f <sup>3</sup> I n�1 Dir Xp,R � �; I

I n�1 <sup>0</sup><sup>∘</sup> ð Þ� , and I

n�2 <sup>0</sup><sup>∘</sup> ð Þ� , I

n�2

I n�1 Dir ð Þ¼ Xc

LTrP<sup>n</sup>

decomposed into three binary patterns as follows:

n�1

n�2

n�2

1, I<sup>n</sup>�<sup>1</sup>

8 >>>>>>><

>>>>>>>:

quadrant. Then, the nth-order tetra pattern of referenced pixel Xc, LTrP<sup>n</sup>

P,Rð Þ¼ Xc f <sup>3</sup> I

n�1 Dir ð Þ Xc � � <sup>¼</sup> <sup>I</sup>

2, I<sup>n</sup>�<sup>1</sup>

3, I<sup>n</sup>�<sup>1</sup>

4, I<sup>n</sup>�<sup>1</sup>

n�1 Dir Xp,R � �; I

where f <sup>3</sup>ð Þ �; � is the coding function which describes the referenced pixel Xc with four quad-

Figure 8 illustrates the coding scheme of Eq. (21), if the quadrant of the referenced pixel Xc 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

n�1 Dir Xp,R

(

<sup>0</sup><sup>∘</sup> ð Þ� Xh,R I

<sup>90</sup><sup>∘</sup> ð Þ� Xv,R I

where Xc is the referenced pixel, Xh:<sup>R</sup> and Xv:<sup>R</sup> horizontal and vertical neighborhoods of referenced pixel Xc, respectively; R is the distance between reference pixel Xc and its neighbor-

the direction of the referenced pixel Xc can be expressed as the quadrant representation and be

n�2

n�2

<sup>90</sup><sup>∘</sup> ð Þ� are the ð Þ <sup>n</sup> � <sup>2</sup> -order derivatives in 0<sup>∘</sup> and 90<sup>∘</sup> directions, respectively;

<sup>900</sup> ð Þ Xc ≥ 0

<sup>900</sup> ð Þ Xc ≥ 0

<sup>900</sup> ð Þ Xc < 0

<sup>900</sup> ð Þ Xc < 0

�

Dir Xp,R � � 6¼ <sup>I</sup>

<sup>90</sup><sup>∘</sup> ð Þ� are the ð Þ <sup>n</sup> � <sup>1</sup> -order derivatives in 0<sup>∘</sup> and 90<sup>∘</sup> directions, respectively. Then,

<sup>0</sup><sup>0</sup> ð Þ Xc <sup>≥</sup> <sup>0</sup> and I<sup>n</sup>�<sup>1</sup>

<sup>0</sup><sup>0</sup> ð Þ Xc <sup>&</sup>lt; <sup>0</sup> and I<sup>n</sup>�<sup>1</sup>

<sup>0</sup><sup>0</sup> ð Þ Xc <sup>&</sup>lt; <sup>0</sup> and I<sup>n</sup>�<sup>1</sup>

<sup>0</sup><sup>0</sup> ð Þ Xc <sup>≥</sup> <sup>0</sup> and I<sup>n</sup>�<sup>1</sup>

Dir ð Þ Xc describes the direction of the referenced pixel Xc along 0<sup>∘</sup> and 90<sup>∘</sup> directions with

n�1 Dir ð Þ Xc � � � � <sup>p</sup>¼1,2,⋯,P;R¼<sup>1</sup>

� �, if I<sup>n</sup>�<sup>1</sup>

0 else

<sup>0</sup><sup>∘</sup> ð Þ Xc (17)

<sup>90</sup><sup>∘</sup> ð Þ Xc (18)

P,Rð Þ Xc , is encoded as

� (20)

n�1 Dir ð Þ Xc (19)

(21)

$$\begin{aligned} LTP\_{P,R}^{\mathfrak{u}} \left| \overline{\mathrm{Dir}} = f\_4 \left( LTr P\_{P,R}^{\mathfrak{u}}(X\_c) \right) \right| \frac{1}{|\mathrm{Dir}\_{\mathfrak{r}}|\_{p=1,2,\cdots,p}} \\ f\_4 \left( LTr P\_{P,R}^{\mathfrak{u}}(X\_c) \right) \left| \frac{1}{|\mathrm{Dir}} = \begin{cases} 1, & \text{if } LTr P\_{P,R}^{\mathfrak{u}}(X\_c) = \overline{Dir} \\\\ 0, & \text{else} \end{cases} \right. \end{aligned} \tag{22}$$

where Dir contains four quadrants except the quadrant of the referenced pixel Xc and f <sup>4</sup>ð Þ �; � 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,

$$LTrP\_{\mathcal{P},M} = f\_{\mathfrak{z}}\left(M\left(X\_{\mathfrak{p}}\right) - M(X\_{\mathfrak{c}})\right)\big|\_{\mathfrak{p}=1,2,\cdots,\mathfrak{p}}\tag{23}$$

$$M(\mathbf{X}\_i) = \sqrt{\left(I\_0^1, \left(\mathbf{X}\_p\right)\right)^2 + \left(I\_{90}^1, \left(\mathbf{X}\_p\right)\right)^2} \tag{24}$$

$$\,\_1f\_5\left(M(\mathbf{X}\_p) - M(\mathbf{X}\_c)\right) = \begin{cases} 1, & \text{if } M(\mathbf{X}\_p) - M(\mathbf{X}\_c) \ge 0 \\ 0, & \text{else} \end{cases} \tag{25}$$

where M Xp � � is the magnitudes of horizontal and vertical first-order derivatives and <sup>f</sup> <sup>5</sup>ð Þ �; � 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 Xc is 4, which is assigned by using Eq. (18) with

2.4. Local vector pattern

tive directions.

yellow, respectively.

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 deriva-

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

where I is a local subregion of an image, β is the index of angle (direction), and D is the distance between referenced pixel Xc and its neighbors. Vβ,Dð Þ Xc is the derivative vector of the referenced pixel Xc along the β direction with D distance. Figure 10 demonstrates the distance between Xc and its neighbors are 1, 2, and 3 and are marked with green, blue and

� I Xð Þ<sup>c</sup> (26)

Local Patterns for Face Recognition

101

http://dx.doi.org/10.5772/intechopen.76571

Vβ,Dð Þ¼ Xc I Xβ,D

pixel Xc, Vβ,Dð Þ Xc , with various directions and distance are formulated as

Figure 10. Neighborhoods pixels of Vβ,Dð Þ Xc with various distance along different directions.

Figure 9. Example of coding second-order LTrP micropattern.

the first-order derivatives in 0<sup>∘</sup> and 90<sup>∘</sup> directions. Similarly, the quadrants of each neighborhood of referenced pixel Xc are 2, 1, 1, 3, 3, 3, 3, 2, respectively. We take the neighborhood pixel X<sup>1</sup> as an example, the quadrants of Xc and X<sup>1</sup> 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<sup>2</sup> 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 8 bit binary patterns "10000001" and "00011110" by considering the tetra pattern values "2" and" 300, 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 "1011111000.

### 2.4. Local vector pattern

the first-order derivatives in 0<sup>∘</sup> and 90<sup>∘</sup> directions. Similarly, the quadrants of each neighborhood of referenced pixel Xc are 2, 1, 1, 3, 3, 3, 3, 2, respectively. We take the neighborhood pixel X<sup>1</sup> as an example, the quadrants of Xc and X<sup>1</sup> 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

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 8 bit binary patterns "10000001" and "00011110" by considering the tetra pattern values "2" and" 300, 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 "1011111000.

P,R ¼ 21133332. Then, the tetra pattern is decomposed into three

LTrP can be expressed as LTrP<sup>2</sup>

Figure 9. Example of coding second-order LTrP micropattern.

100 From Natural to Artificial Intelligence - Algorithms and Applications

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 Xc, Vβ,Dð Þ Xc , with various directions and distance are formulated as

$$V\_{\mathfrak{F},D}(\mathbf{X}\_{\mathfrak{c}}) = I(\mathbf{X}\_{\mathfrak{F},D}) - I(\mathbf{X}\_{\mathfrak{c}}) \tag{26}$$

where I is a local subregion of an image, β is the index of angle (direction), and D is the distance between referenced pixel Xc and its neighbors. Vβ,Dð Þ Xc is the derivative vector of the referenced pixel Xc along the β direction with D distance. Figure 10 demonstrates the distance between Xc and its neighbors are 1, 2, and 3 and are marked with green, blue and yellow, respectively.


Figure 10. Neighborhoods pixels of Vβ,Dð Þ Xc with various distance along different directions.

The LVP, LVPβð Þ Xc , in β derivative direction at referenced pixel Xc is encoded as

$$LVP\_{\mathbb{P},\mathbb{R},\mathbb{\hat{\mathbb{P}}}}(\mathbf{X}\_{\mathbb{C}}) = \left\{ f\_{\mathbb{S}}\left(V\_{\mathbb{P},\mathbb{D}}\left(\mathbb{G}\_{p,\mathbb{R}}\right), V\_{\mathbb{P}+\mathbf{45}^{\*},\mathbb{D}}\left(\mathbb{G}\_{p,\mathbb{R}}\right), V\_{\mathbb{P},\mathbb{D}}\left(\mathbb{G}\_{\mathbb{C}}\right), V\_{\mathbb{P}+\mathbf{45}^{\*},\mathbb{D}}\left(\mathbb{G}\_{\mathbb{C}}\right) \right) \right\} \Big|\_{\mathbb{P}=1,2,\cdots,\mathbb{P},\mathbb{R}=1} \tag{27}$$

where f <sup>5</sup>ð Þ �; � is the coding function which can be formulated as

$$\begin{cases} f\_5\left(V\_{\boldsymbol{\beta},\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{p},\mathcal{R}}\right), V\_{\boldsymbol{\beta}+4\mathbf{5}^\*,\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{p},\mathcal{R}}\right), V\_{\boldsymbol{\beta},\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{c}}\right), V\_{\boldsymbol{\beta}+4\mathbf{5}^\*,\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{c}}\right)\right) = \\\\ 1, \quad \text{if } V\_{\boldsymbol{\beta}+4\mathbf{5}^\*,\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{p},\mathcal{R}}\right) - \left(\frac{V\_{\boldsymbol{\beta}+4\mathbf{5}^\*,\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{c}}\right)}{V\_{\boldsymbol{\beta},\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{c}}\right)} \times V\_{\boldsymbol{\beta},\mathcal{D}}\left(\mathcal{G}\_{\boldsymbol{p},\mathcal{R}}\right)\right) \geq 0 \\\\ 0, \quad \text{else} \end{cases} \tag{28}$$

Finally, the LVP of referenced pixel Xc is defined as the four 8-bit binary patterns, as shown in the following,

$$LVP\_{P,R}(X\_c) = \left\{ LVP\_{P,R,\beta}(X\_c) \middle| \beta = 0^\ast, 45^\ast, 90^\ast, 135^\ast \right\} \tag{29}$$

To extend the discriminative of 2D spatial structures, LVP integrates four pairwise directions (0<sup>∘</sup> � <sup>45</sup><sup>∘</sup> , <sup>45</sup><sup>∘</sup> � <sup>90</sup><sup>∘</sup> , <sup>90</sup><sup>∘</sup> � <sup>135</sup><sup>∘</sup> , <sup>135</sup><sup>∘</sup> � <sup>0</sup><sup>∘</sup> ) of vector to form a 32-bit binary pattern for each referenced pixel Xc.

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 Xp,R � �, can be formulated as

$$\text{CST}\left(\mathbf{X}\_{\mathcal{P},\mathcal{R}}\right) = w(\mathbf{X}\_c)^T \cdot v\left(\mathbf{X}\_{\mathcal{P},\mathcal{R}}\right) \tag{30}$$

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 Xc <sup>¼</sup> 7 in <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> direction. In Figure 11, we calculate the pairwise derivative direction vector of the referenced pixel Xc to form the 2D spatial structures, as shown in Figure 12. In Figure 12, the pairwise derivative direction vectors <sup>V</sup>β,Dð Þ Xc and <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Xc are indicated as x- and y-axis, respectively, in which, <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> and D ¼ 1. The first-order derivative direction value of referenced pixel Xc and its neighborhoods in directions <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> and <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> <sup>¼</sup> <sup>45</sup><sup>∘</sup> are shown in Figure 13. Then, we calculate the trans-

X<sup>1</sup> ¼ 4 of referenced pixel Xc ¼ 7 is evaluated according to Eq. (33) (CST Xð Þ¼ <sup>1</sup>, <sup>1</sup>

bit of the 8-bit binary codes of LVPP,R,0<sup>∘</sup> ð Þ¼ Xc 01100100 is encoded by using sign function. Similarly, the rest of LVPs with various pairwise directions are LVPP,R, <sup>45</sup><sup>∘</sup> ð Þ¼ Xc 10101011,LVPP,R, <sup>90</sup><sup>∘</sup> ð Þ¼ Xc 11100001, and LVPP,R,135<sup>∘</sup> ð Þ¼ Xc 00101101. The four binary pattern LVPs are concatenated to generate LVPP,Rð Þ¼ Xc 011001001010101 11110000100101101.

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

<sup>4</sup> ¼ �0:25 which is used to transform the β-direction value of the


Local Patterns for Face Recognition

103

http://dx.doi.org/10.5772/intechopen.76571

<sup>4</sup> � �5 ¼ �2:25). Then, the first corresponding

form ratio <sup>V</sup>βþ<sup>45</sup> <sup>∘</sup> ,Dð Þ Xc

V45<sup>∘</sup> , <sup>1</sup>ð Þ� X1,<sup>1</sup>

<sup>V</sup>β,Dð Þ Xc <sup>¼</sup> �<sup>1</sup>

V<sup>45</sup> <sup>∘</sup> ,Dð Þ Xc

2.5. Local clustering pattern

neighborhoods to comparative space <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup>

Figure 11. Example of first-order LVP in <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> direction.

<sup>V</sup><sup>0</sup> <sup>∘</sup> ,Dð Þ Xc � <sup>V</sup>0<sup>∘</sup> ,1ð Þ¼� <sup>X</sup>1, <sup>1</sup> <sup>1</sup> � �<sup>1</sup>

where w Xð Þ<sup>c</sup> <sup>T</sup>and v Xp,R � � are the weight vector and pairwise direction value of the neighborhoods which are surrounded by referenced pixel Xc in two different directions. The formulations of wð Þ� and vð Þ� can be expressed as,

$$w(X\_c) = \left(1, \frac{V\_{\emptyset + 45^\*, D}(X\_c)}{V\_{\emptyset, D}(X\_c)}\right) \tag{31}$$

$$\sigma(\mathbf{X}\_{p,\mathcal{R}}) = \left(V\_{\mathcal{P}+45^{\circ},D}\left(\mathbf{X}\_{p,\mathcal{R}}\right), V\_{\mathcal{P},D}\left(\mathbf{X}\_{p,\mathcal{R}}\right)\right)^{\mathrm{T}}\tag{32}$$

where the first term of wð Þ� is to describe the original value of neighborhood pixel Xp,R at <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> � � direction and the second term is the transform ratio which compares the derivative value of the neighborhood Xp,R in <sup>β</sup> direction to that of in <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> � � direction surrounds around the referenced pixel Xc. vð Þ� is the augmented pattern which presents the pairwise direction values of vector of neighborhood pixel Xp,R. Then, Eq. (30) can be rewritten as,

$$\text{CST}\{\mathbf{X}\_{\mathfrak{p},\mathbb{R}}\} = \text{w}(\mathbf{X}\_{\mathfrak{c}})^{\mathrm{T}} \cdot \text{w}\{\mathbf{X}\_{\mathfrak{p},\mathbb{R}}\} = V\_{\mathfrak{f}+45^{\circ},D}(\mathbf{X}\_{\mathfrak{p},\mathbb{R}}) - \frac{V\_{\mathfrak{f}+45^{\circ},D}(\mathbf{X}\_{\mathfrak{c}})}{V\_{\mathfrak{f},D}(\mathbf{X}\_{\mathfrak{c}})} \times V\_{\mathfrak{f},D}\{\mathbf{X}\_{\mathfrak{p},\mathbb{R}}\} \tag{33}$$


Figure 11. Example of first-order LVP in <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> direction.

The LVP, LVPβð Þ Xc , in β derivative direction at referenced pixel Xc is encoded as

� �; <sup>V</sup>β,Dð Þ Gc ; <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Gc

� � � �

; 45<sup>∘</sup> ; 90<sup>∘</sup> ; 135<sup>∘</sup> � � � � (29)

� �, can be formulated as

� � � � <sup>T</sup> (32)

� � � <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Xc

Vβ,Dð Þ Xc

� Vβ,D Xp,R

� � (33)

� � are the weight vector and pairwise direction value of the neighbor-

V<sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Xc Vβ,Dð Þ Xc � �

� �; Vβ,D Xp,R

� Vβ,D Gp,R

) of vector to form a 32-bit binary pattern for each

� � (30)

�

≥ 0

� (27)

(28)

(31)

� � � � <sup>p</sup>¼1, <sup>2</sup>,⋯P,R¼<sup>1</sup>

� �; <sup>V</sup>β,Dð Þ Gc ; <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Gc

Vβ,Dð Þ Gc

� � <sup>¼</sup>

� � � <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Gc

Finally, the LVP of referenced pixel Xc is defined as the four 8-bit binary patterns, as shown in

To extend the discriminative of 2D spatial structures, LVP integrates four pairwise directions

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 recogni-

� � <sup>¼</sup> w Xð Þ<sup>c</sup> <sup>T</sup> � v Xp,R

hoods which are surrounded by referenced pixel Xc in two different directions. The formula-

where the first term of wð Þ� is to describe the original value of neighborhood pixel Xp,R at <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> � � direction and the second term is the transform ratio which compares the derivative value of the neighborhood Xp,R in <sup>β</sup> direction to that of in <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> � � direction surrounds around the referenced pixel Xc. vð Þ� is the augmented pattern which presents the pairwise direction values of vector of neighborhood pixel Xp,R. Then, Eq. (30) can be rewritten as,

� � <sup>¼</sup> <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,D Xp,R

� �; <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,D Gp,R

LVPP,Rð Þ¼ Xc LVPP,R, <sup>β</sup>ð Þ Xc <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup>

, <sup>135</sup><sup>∘</sup> � <sup>0</sup><sup>∘</sup>

CST Xp,R

w Xð Þ¼ <sup>c</sup> 1;

� � <sup>¼</sup> <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,D Xp,R

where f <sup>5</sup>ð Þ �; � is the coding function which can be formulated as

1, if V<sup>β</sup>þ45<sup>∘</sup> ,D Gp,R

� �; <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,D Gp,R

LVPP,R,βð Þ¼ Xc f <sup>5</sup> Vβ,D Gp,R

8 >><

>>:

, <sup>45</sup><sup>∘</sup> � <sup>90</sup><sup>∘</sup>

referenced pixel Xc.

where w Xð Þ<sup>c</sup> <sup>T</sup>and v Xp,R

CST Xp,R

tions of wð Þ� and vð Þ� can be expressed as,

the following,

(0<sup>∘</sup> � <sup>45</sup><sup>∘</sup>

f <sup>5</sup> Vβ,D Gp,R

102 From Natural to Artificial Intelligence - Algorithms and Applications

0, else

, <sup>90</sup><sup>∘</sup> � <sup>135</sup><sup>∘</sup>

tion. The dynamic linear decision function, CST Xp,R

v Xp,R

� � <sup>¼</sup> w Xð Þ<sup>c</sup> <sup>T</sup> � v Xp,R

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 Xc <sup>¼</sup> 7 in <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> direction. In Figure 11, we calculate the pairwise derivative direction vector of the referenced pixel Xc to form the 2D spatial structures, as shown in Figure 12. In Figure 12, the pairwise derivative direction vectors <sup>V</sup>β,Dð Þ Xc and <sup>V</sup><sup>β</sup>þ45<sup>∘</sup> ,Dð Þ Xc are indicated as x- and y-axis, respectively, in which, <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> and D ¼ 1. The first-order derivative direction value of referenced pixel Xc and its neighborhoods in directions <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> and <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> <sup>¼</sup> <sup>45</sup><sup>∘</sup> are shown in Figure 13. Then, we calculate the transform ratio <sup>V</sup>βþ<sup>45</sup> <sup>∘</sup> ,Dð Þ Xc <sup>V</sup>β,Dð Þ Xc <sup>¼</sup> �<sup>1</sup> <sup>4</sup> ¼ �0:25 which is used to transform the β-direction value of the neighborhoods to comparative space <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> -direction. The CST value of neighborhood pixel X<sup>1</sup> ¼ 4 of referenced pixel Xc ¼ 7 is evaluated according to Eq. (33) (CST Xð Þ¼ <sup>1</sup>, <sup>1</sup> V45<sup>∘</sup> , <sup>1</sup>ð Þ� X1,<sup>1</sup> V<sup>45</sup> <sup>∘</sup> ,Dð Þ Xc <sup>V</sup><sup>0</sup> <sup>∘</sup> ,Dð Þ Xc � <sup>V</sup>0<sup>∘</sup> ,1ð Þ¼� <sup>X</sup>1, <sup>1</sup> <sup>1</sup> � �<sup>1</sup> <sup>4</sup> � �5 ¼ �2:25). Then, the first corresponding bit of the 8-bit binary codes of LVPP,R,0<sup>∘</sup> ð Þ¼ Xc 01100100 is encoded by using sign function. Similarly, the rest of LVPs with various pairwise directions are LVPP,R, <sup>45</sup><sup>∘</sup> ð Þ¼ Xc 10101011,LVPP,R, <sup>90</sup><sup>∘</sup> ð Þ¼ Xc 11100001, and LVPP,R,135<sup>∘</sup> ð Þ¼ Xc 00101101. The four binary pattern LVPs are concatenated to generate LVPP,Rð Þ¼ Xc 011001001010101 11110000100101101.

#### 2.5. 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

2.5.1. Local clustering pattern

<sup>0</sup><sup>∘</sup> � <sup>45</sup><sup>∘</sup>

the first-order derivatives of Xc, I

where α is the derivative direction including 0<sup>∘</sup>

LCPαð Þ¼ Xc

f r,<sup>θ</sup> I 0 <sup>γ</sup>,D Xp � �; I 0 <sup>γ</sup>,Dð Þ Xc

2.5.2. Coding scheme

LCP, including 0<sup>∘</sup> � <sup>45</sup><sup>∘</sup>

, 45<sup>∘</sup> � <sup>90</sup><sup>∘</sup> , 90<sup>∘</sup> � <sup>135</sup><sup>∘</sup> and 135<sup>∘</sup> � <sup>0</sup><sup>∘</sup>

LCP in pairwise combinatorial direction can be expressed as,

X N

f r,<sup>θ</sup> I 0 <sup>γ</sup>,D Xp � �; I 0 <sup>γ</sup>,Dð Þ Xc � � � <sup>2</sup><sup>n</sup>�<sup>1</sup>

coordinate system, and the formula can be formally defined as follows,

� � <sup>γ</sup><sup>∈</sup> <sup>α</sup>;αþ45<sup>∘</sup> f g <sup>¼</sup> <sup>0</sup>, if I<sup>0</sup>

LCP Xð Þ¼ <sup>c</sup> LCPβð Þ Xc

, 45<sup>∘</sup> � <sup>90</sup><sup>∘</sup> , 90<sup>∘</sup> � <sup>135</sup><sup>∘</sup>

I 0 <sup>γ</sup>,D Xp � � � �<sup>2</sup>

r

m<sup>γ</sup> Xp � � <sup>¼</sup> � � �

of the four 8-bit binary patterns LCPs, and can be formally as

� ( �

n¼1

Taken a subregion image I Xð Þ as an example, as shown in Figure 1, in which Xc is the referenced pixel and Xp, p ¼ 1, ⋯, 8 are the adjacent pixels around Xc. LCP firstly generates

> , 45<sup>∘</sup> , 90<sup>∘</sup>

generated by integrating the pairwise combinatorial directions of the derivative variations,

where f r,θð Þ �; � is the coding scheme and D ¼ 1, 2, 3 is the distance between referenced pixel Xc and its adjacent pixels Xp, as shown in Figure 10. The coding scheme is executed in the polar

where Ci is the cluster center. Finally, the LCP at referenced pixel Xc, LCP Xð Þ<sup>c</sup> , is combinatorial

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

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 Xp are calculated as

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

þ I 0

<sup>γ</sup>þ45<sup>∘</sup> ,D Xp � � � �<sup>2</sup>

<sup>α</sup>ð Þ¼ Xc I<sup>α</sup> Xp

<sup>α</sup>ð Þ Xc , in various directions and can be written as

� � � <sup>I</sup>αð Þ Xc (34)

, in polar coordinate system. The generation of

<sup>γ</sup><sup>∈</sup> <sup>α</sup>;αþ45<sup>∘</sup> f g,N¼<sup>8</sup>

�

<sup>γ</sup>,D Xp

1, else

� � <sup>β</sup>¼0<sup>∘</sup> ,45<sup>∘</sup> , <sup>90</sup><sup>∘</sup> ,<sup>135</sup> <sup>∘</sup> : �

� � and I<sup>0</sup>

, and 135<sup>∘</sup> directions. Then, the LCP is

Local Patterns for Face Recognition

105

http://dx.doi.org/10.5772/intechopen.76571

� (35)

<sup>γ</sup>,Dð Þ Xc ∈Ci

� (37)

, and 135<sup>∘</sup> � <sup>0</sup><sup>∘</sup> . The coordinate of the pairwise

γ∈α �

� (38)

(36)

0

I 0

Figure 12. Comparative space transform (CST) in encoding first-order LVP in <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> direction.

Figure 13. The first-order derivative direction value. (a) <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> ; (b) <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> <sup>¼</sup> <sup>45</sup><sup>∘</sup> .

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.

#### 2.5.1. Local clustering pattern

Taken a subregion image I Xð Þ as an example, as shown in Figure 1, in which Xc is the referenced pixel and Xp, p ¼ 1, ⋯, 8 are the adjacent pixels around Xc. LCP firstly generates the first-order derivatives of Xc, I 0 <sup>α</sup>ð Þ Xc , in various directions and can be written as

$$I\_{\alpha}^{'}(X\_{c}) = I\_{\alpha}(X\_{p}) - I\_{\alpha}(X\_{c}) \tag{34}$$

where α is the derivative direction including 0<sup>∘</sup> , 45<sup>∘</sup> , 90<sup>∘</sup> , and 135<sup>∘</sup> directions. Then, the LCP is generated by integrating the pairwise combinatorial directions of the derivative variations, <sup>0</sup><sup>∘</sup> � <sup>45</sup><sup>∘</sup> , 45<sup>∘</sup> � <sup>90</sup><sup>∘</sup> , 90<sup>∘</sup> � <sup>135</sup><sup>∘</sup> and 135<sup>∘</sup> � <sup>0</sup><sup>∘</sup> , in polar coordinate system. The generation of LCP in pairwise combinatorial direction can be expressed as,

$$L\mathbb{C}P\_{\alpha}(X\_{\mathfrak{c}}) = \sum\_{n=1}^{N} f\_{r,\theta} \left( \left. I\_{\gamma,D}'(X\_{\mathfrak{p}}), I\_{\gamma,D}'(X\_{\mathfrak{c}}) \right| \times \mathbf{2}^{n-1} \right|\_{\mathfrak{I}' \in \{a, a+45^{\circ}\}, N=8} \tag{35}$$

where f r,θð Þ �; � is the coding scheme and D ¼ 1, 2, 3 is the distance between referenced pixel Xc and its adjacent pixels Xp, as shown in Figure 10. The coding scheme is executed in the polar coordinate system, and the formula can be formally defined as follows,

$$\left| f\_{r,\theta} \left( \stackrel{\circ}{I}\_{\gamma,D} (\mathbf{X}\_{\mathcal{P}}), \stackrel{\circ}{I}\_{\gamma,D} (\mathbf{X}\_{\mathcal{E}}) \right) \right|\_{\mathcal{V} \in \{a, a+45^{\circ}\}} = \begin{cases} \mathbf{0}, & \text{if } \stackrel{\circ}{I}\_{\gamma,D} (\mathbf{X}\_{\mathcal{P}}) \text{ and } \stackrel{\circ}{I}\_{\gamma,D} (\mathbf{X}\_{\mathcal{E}}) \in \mathsf{C}\_{i} \\ \mathbf{1}, & \text{else} \end{cases} \tag{36}$$

where Ci is the cluster center. Finally, the LCP at referenced pixel Xc, LCP Xð Þ<sup>c</sup> , is combinatorial of the four 8-bit binary patterns LCPs, and can be formally as

$$L\mathbb{C}P(X\_{\mathfrak{c}}) = \left\{ L\mathbb{C}P\_{\mathfrak{f}}(X\_{\mathfrak{c}}) \right\} \Big|\_{\substack{\mathfrak{f} = 0^{+}, 45^{+}, 90^{+}, 135^{+}}} \tag{37}$$

#### 2.5.2. Coding scheme

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.

Figure 12. Comparative space transform (CST) in encoding first-order LVP in <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> direction.

104 From Natural to Artificial Intelligence - Algorithms and Applications

Figure 13. The first-order derivative direction value. (a) <sup>β</sup> <sup>¼</sup> <sup>0</sup><sup>∘</sup> ; (b) <sup>β</sup> <sup>þ</sup> <sup>45</sup><sup>∘</sup> <sup>¼</sup> <sup>45</sup><sup>∘</sup> .

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<sup>∘</sup> � <sup>45</sup><sup>∘</sup> , 45<sup>∘</sup> � <sup>90</sup><sup>∘</sup> , 90<sup>∘</sup> � <sup>135</sup><sup>∘</sup> , and 135<sup>∘</sup> � <sup>0</sup><sup>∘</sup> . 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 Xp are calculated as

$$m\_{\mathcal{V}}(\mathbf{X}\_{\mathcal{p}}) = \sqrt{\left(\mathbf{I}'\_{\mathcal{V},D}(\mathbf{X}\_{\mathcal{p}})\right)^2 + \left(\mathbf{I}'\_{\mathcal{V}+4\mathbf{5}',D}(\mathbf{X}\_{\mathcal{p}})\right)^2}|\_{\mathcal{V}\in\mathcal{a}}\tag{38}$$

$$\Theta\_{\mathcal{V}}(\mathbf{X}\_p) = \arctan \frac{I\_{\mathcal{V} + 45^\*, D}'(\mathbf{X}\_p)}{I\_{\mathcal{V}, D}'(\mathbf{X}\_p)} \vert\_{\mathcal{V} \in a} \tag{39}$$

where C<sup>1</sup> and C<sup>2</sup> are the two-class centers, in which C<sup>1</sup> is also the center of Xc. 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

<sup>γ</sup>∈<sup>α</sup> <sup>¼</sup> <sup>0</sup>, if Xp <sup>∈</sup> <sup>C</sup><sup>1</sup>

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

nates of referenced pixel Xc 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<sup>5</sup> belongs to the second class, the rest pixels belong to the first class. Then, the corresponding bit

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

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

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

 

1, else

and 45<sup>∘</sup> directions as shown in Figure 13. Then, the coordi-

(42)

107

Local Patterns for Face Recognition

http://dx.doi.org/10.5772/intechopen.76571

find the cluster two-class centers Ci that have the highest probability PðCijvÞ.

; θγ Xp

C m<sup>γ</sup> Xp

where C<sup>1</sup> is the cluster center which includes Xc.

of the 8-bit binary codes of LCPP,R,0<sup>∘</sup> ð Þ¼ Xc 00001000.

information and is sensitivity when light is slightly changed.

the first-order derivatives along 0<sup>∘</sup>

2.5.3. Example

3. Comparison

direction.

The adjacent pixels of the reference pixel Xc are encoded as the following equation,

where �<sup>π</sup> <sup>2</sup> < θγ < <sup>π</sup> <sup>2</sup> is normalized to 0<sup>∘</sup> ˜360<sup>∘</sup> .

The feature vectors v are m<sup>γ</sup> and θγ coordinate in the polar coordinate system and can be written as

$$\mathbf{v} = \begin{bmatrix} m\_{\boldsymbol{\gamma}}(\mathbf{X}\_n), \boldsymbol{\theta}\_{\boldsymbol{\gamma}}(\mathbf{X}\_n) \end{bmatrix}^T \tag{40}$$

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

$$\mathbf{C} = \begin{bmatrix} \mathbf{C}\_1, \mathbf{C}\_2 \end{bmatrix}^T \tag{41}$$

Figure 14. Example of the LCP takes Figure 5(a) as an example (the derivative variations along 0<sup>∘</sup> and 45<sup>∘</sup> ).

where C<sup>1</sup> and C<sup>2</sup> are the two-class centers, in which C<sup>1</sup> is also the center of Xc. 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 Ci that have the highest probability PðCijvÞ.

The adjacent pixels of the reference pixel Xc are encoded as the following equation,

$$\left. \mathbb{C} \{ m\_{\boldsymbol{\gamma}} (\mathbf{X}\_{\boldsymbol{\eta}}), \theta\_{\boldsymbol{\gamma}} (\mathbf{X}\_{\boldsymbol{\eta}}) \} \right|\_{\boldsymbol{\gamma} \in \alpha} = \begin{cases} \mathbf{0}, \text{ if } \mathbf{X}\_{\boldsymbol{\eta}} \in \mathbb{C}\_{1} \\ \mathbf{1}, \text{ else} \end{cases} \tag{42}$$

where C<sup>1</sup> is the cluster center which includes Xc.

#### 2.5.3. Example

θγ Xp

<sup>2</sup> is normalized to 0<sup>∘</sup>

106 From Natural to Artificial Intelligence - Algorithms and Applications

pixels and its adjacent pixel in the polar coordinate system.

where �<sup>π</sup>

written as

<sup>2</sup> < θγ < <sup>π</sup>

<sup>¼</sup> arctan

˜360<sup>∘</sup> .

considered as a problem of a two-class case, whose center vector C is written as

Figure 14. Example of the LCP takes Figure 5(a) as an example (the derivative variations along 0<sup>∘</sup> and 45<sup>∘</sup> ).

I 0

The feature vectors v are m<sup>γ</sup> and θγ coordinate in the polar coordinate system and can be

v ¼ mγð Þ Xn ; θγð Þ Xn

where γ∈α and n ¼ 1˜9 are the pixels in the subregion image I Xð Þ including the referenced

LCP is ensemble of several decisions from the results of clustering. Each clustering result is

C ¼ ½ � C1; C<sup>2</sup>

I 0 <sup>γ</sup>,D Xp

<sup>γ</sup>þ45<sup>∘</sup> ,D Xp 

 <sup>γ</sup>∈<sup>α</sup> 

<sup>T</sup> (40)

<sup>T</sup> (41)

(39)

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<sup>∘</sup> and 45<sup>∘</sup> directions as shown in Figure 13. Then, the coordinates of referenced pixel Xc 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<sup>5</sup> belongs to the second class, the rest pixels belong to the first class. Then, the corresponding bit of the 8-bit binary codes of LCPP,R,0<sup>∘</sup> ð Þ¼ Xc 00001000.
