thresholds are fixed, the pixels on the local neighbor set are
classified into different quantization levels. The number of
neighbor pixels located at the ith quantization level (q
i
) is then
counted as follows:
q
i
¼
X
P
p ¼ 1
Lðg
p
g
c
Þ; LðxÞ¼
1; if
σ
i
r x
jj
r σ
i þ 1
0; else
(
ð2Þ
where g
c
represents the gray value of the center pixel and g
p
(p¼1,
…,P) denotes the gray value of the neighbor pixel on a circle
neighbor set, and
σ
i
is the ith quantization threshold. As in [9], the
neighbors that do not fall in the center of pixels are estimated by
bilinear interpolation. Obviously, computing the q
i
is equal to
count the number of the neighbor pixels that are quantized into
the ith level.
After the q
i
at each local quantization level is calculated, we can
define the Local Quantization Code (LQC) as follows:
LQC ¼
X
Q
i ¼ 1
q
i
10
i 1
ð3Þ
where q
i
is the number of neighbor pixels at quantization level i,
and Q represents the total number of the neighbor quantization
levels.
The center pixel, which expresses the local gray level, also has
discriminative information. Therefore the proposed LQC is also
combined with the global quantization level of the central pixel:
LQC ¼ q
c
10
i
þ
X
Q
i ¼ 1
q
i
10
i 1
ð4Þ
where q
c
represents the quantization level of the central pixel. In
this paper, the central pixel is quantized by equally splitting the
gray level histogram. The proposed LQC encoding scheme adopts a
decimal system coding rather than commonly used binary system
coding, thus the central quantization level q
c
can be set from 0 to
9. Different to the neighbor pixels, the gray value of central pixel is
quantized by means of global quantization method instead of local
quantization. That is because q
c
is supposed to describe the level of
local gray value among the whole image.
Fig. 4 illustrates the encoding process of the LQC at (R¼ 1, P¼8).
Each cubic column denotes a pixel and the height of the cubic
column represents the gray value of corresponding pixel. In Fig. 4,
gray value of neighbor pixels is quantized into 4 levels. Then the
number q
i
(i¼1,…,4) of neighbor pixels located at each level is
counted. There are 1, 2, 2, 3 pixels located at 1st, 2nd, 3th, and 4th
level, respectively. Finally, numbers of pixels at different levels are
combined to form the LQC code 122. We omit the last number 3 at
1st level to reduce the feature size, since the total number of
neighbor pixels is fixed (1 þ 2þ 2þ 3¼ 8).
It is obvious that the LQC can accurately characterize the local
structure by means of more quantization levels than traditional
LBP. As shown in Fig. 5, different local structures may have the
same LBP code. But their LQC codes are quite different from each
other. Note that the LQC merely counting the number of pixels at
different levels and thus is strictly invariant to rotation. As a result,
the LQC encoding is very suitable for the rotation invariant texture
classification scenario.
In this paper, the neighbor number P at radius 1 is set as 8, i.e.,
(R¼1, P¼8), therefore the value of each q
i
can be nine value (0–8).
When the radius of the neighbor set enlarged, the value of each q
i
is still quantized into nine values (0-8) so that the decimal system
based Eq. (4) can be used at larger radiuses. For example, the value
range of q
i
is 0 to 16 when the radius is 2, and this q
i
is then
directly quantized into nine levels (0–8).
After the Local Quantization Code of each pixel is calculated, a
histogram is built to represent the texture image. It should be
noted that although the size of LQC histogram is 10
L
with quan-
tization level L, many bins of the histogram are always zeros. That
is because there are only finite neighbor pixels to be encoded. For
example, if the q
4
at the quantization level 4 is 8 with (R¼ 1, P¼ 8),
the LQC code only can be ‘800’ since there are total 8 neighbor
pixels. The rest codes ‘801’ to ‘899’ are thus insignificant and we
can simply remove these meaningless all-zeros-bins from the final
histogram. After removing the all-zeros-bins, the sizes of LQC
histograms are 9, 45, 165, 495 with (q
c
¼0, R ¼1, P ¼8) for quan-
tization level of 2, 3, 4, 5, respectively.
In conventional LBP, the gray value of local central pixel is used
as local threshold directly. It is clear that the fixed artificial
threshold is not robust to discontinuous and non-uniform illumi-
nation transformations, while the local difference is relatively
more insensitive to illumination transformations. Hence, we adopt
the average local difference to set the series of quantization
thresholds instead of fixed artificial thresholds. A base-threshold
Δ
is computed as the average difference of local neighbors on the
Fig. 2. Illustration of the LTP (P¼8, R¼1).
Fig. 3. The illustration of the LBC (P¼8, R¼1).
Y. Zhao et al. / Neurocomputing 207 (2016) 354–364356