Local Tetra-Directional Pattern-A New Texture Descriptor For Content-Based Image Retrieval
Local Tetra-Directional Pattern-A New Texture Descriptor For Content-Based Image Retrieval
net/publication/348495185
CITATIONS READS
4 161
2 authors:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Anterpreet Kaur Bedi on 18 January 2021.
Abstract—In this present work, a new technique for content-based image retrieval is introduced using local
tetra-directional pattern. In conventional local binary pattern (LBP), each pixel of an image is changed into
a specific binary pattern in accordance with their relationship with neighbouring pixels. Texture feature
descriptor introduced in this work differs from local binary pattern as it exploits local intensity of pixels in four
directions in the neighbourhood. Also, colour feature and gray level co-occurrence matrix have been applied
in this work. Median of images have also been taken under consideration to keep the edge information pre-
served. The proposed technique has been validated experimentally by conducting experiments on two differ-
ent sets of data, viz., Corel-1K and AT&T. Performance was measured using two well-known parameters,
precision and recall, and further comparison was carried with some state-of-the-art local patterns. Compar-
ison of results show substantial improvement in the proposed technique over existing methods.
Keywords: content based image retrieval, local tetra-directional pattern, feature vector, gray level co-occur-
rence matrix, local binary pattern
DOI: 10.1134/S1054661820040057
ISSN 1054-6618, Pattern Recognition and Image Analysis, 2020, Vol. 30, No. 4, pp. 578–592. © Pleiades Publishing, Ltd., 2020.
LOCAL TETRA-DIRECTIONAL PATTERN–A NEW TEXTURE DESCRIPTOR 579
vector. Motif co-occurrence matrix was further pro- local binary co-occurrence pattern was introduced by
posed in which, a 3D matrix was constructed corre- Verma et al. [31] in which local information was
sponding to the local statistics of image [17]. attained by extracting center symmetric LBP. Later,
Verma et al. [32] proposed local extrema co-occur-
Texture is another widely used feature for retrieval
rence pattern (LECoP). In this, local directional
of images. Texture is well able to distinguish images
information was extracted for retrieval of images.
from one another [18]. It varies with local intensities of
Dubey et al. developed an efficient Local diagonal
image, thus providing with its surface characteristics.
extrema pattern (LDEP) which described relationship
Various properties like coarseness, smoothness and
among the diagonal neighbors of center pixel of the
regularity are used to identify these characteristics.
image [33]. Further, a novel texture feature, known as
Texture feature extraction is carried out extensively
local tri-directional pattern (LTriDP) was proposed,
using the signal processing methods. These methods
which exploits the local intensities of neighborhood
make use of mathematical transformations in the
pixels in three directions [34]. Subsequently, Verma
image, thus resulting in image features in the form of
et al. proposed local neighborhood difference pattern
coefficients. Gabor filters [19], discrete wavelet trans-
(LNDP) [35], which creates a pattern by estimating
form [20], etc. are some of the important transforms
differences between two immediate neighborhood
used for extraction of texture features. Another way to
pixels in horizontal or vertical directions. Recently,
extract texture feature involves model-based methods.
local neighborhood intensity pattern (LNIP) for
In these methods, an assumption model for an image
image retrieval was introduced by Banerjee et al. [36]
is initially designed. Estimation of the model parame-
which is more advantageous in terms of resistance to
ters is carried out, which are used as texture descriptor
illumination.
features. One such popularly used method is Markov
random field [21]. Structural analysis is another It is observed that there is no single optimal repre-
method for texture feature extraction. It is performed sentation of an image for retrieval purposes. This is on
in the case where texture primitives consist of regular account of the variant conditions in which photo-
patterns and are large enough to be described and seg- graphs might be captured, viz. view angle, illumina-
mented on individual basis [22]. tion changes, etc. In this paper, the authors have pre-
sented a novel pattern for the purpose of image
In this method, texture features are extracted using retrieval based on color and texture. The method
primitives and placement rules. The analysis of spatial makes use of HSV color space for calculation of hue,
distribution of gray levels is performed using statistical saturation and intensity of the color image. Herein,
methods. Some of the widely used methods include the pattern establishes a relationship of the pixel under
co-occurrence matrix, Tamura feature extraction [23], observation with its surrounding pixels by exploiting
Wold features [24], etc. Haralick et al. introduced the their mutual relationships based on four significant
concept of gray-level co-occurrence matrix (GLCM) directions. A magnitude pattern is also taken into con-
[25] in order to extract statistical features of an image. sideration using the same four directions, and both
GLCM matrix extracts texture features by identifying their histograms are combined to form a feature vec-
spatial correlation of image pixels. In another work, tor. The performance of the proposed method is vali-
Zhang et al. [26] estimated the GLCM of edge images dated using two databases. The remaining paper is
which were formed using Prewitt edge detector in four organized as follows: Section 2 gives an introduction
directions, thus extracting statistical features to form to color space, GLCM and local patterns. Framework
co-occurrence matrices for retrieval purposes. Partio of the proposed method, algorithm and similarity
et al. used GLCM with statistical features for the measure is explained in Section 3. Section 4 presents
retrieval of rock texture images [27]. the experimental results and discussions. Finally, the
An efficient method for the purpose of feature conclusion of the work is achieved in Section 5.
extraction for CBIR includes local binary pattern
(LBP), introduced by Ojala et al. [28]. LBP is a fast,
simple and robust texture descriptor which can cap- 2. COLOR AND TEXTURE DESCRIPTORS
ture local texture features unaffected by illumination. Color Space
LBP was further modified into a uniform and rotation
invariant LBP in order to limit the number of patterns. Broadly, images are classified into three catego-
A number of LBP variants have been developed for ries–binary, gray scale and color image. Binary images
different applications. Murala et al. [29] introduced comprise of only two intensity levels, viz. black and
local tetra pattern (LTrP) that retrieves images by tap- white. Gray scale images consist of a set of gray tone
ping first order derivatives in both horizontal and ver- intensity measures in one band, whereas, color images
tical directions. Further, local ternary co-occurrence compose of multiple bands, each band comprising of a
pattern was developed for retrieval of biomedical range of intensities. The most commonly used color
images [30]. In this pattern, co-occurrence of similar space is RGB color space. In this, the images consist
ternary edges was encoded based on gray level intensi- of three bands labelled as red, green, and blue.
ties in the pixel window. A robust center symmetric Another color space that is in wide use is HSV, which
(a) (b)
1 3 0 1 1 pixel 0 1 2 3
pair
0 1 2 3 2 0 1 3 0 1 90
135 45
2 2 1 0 3 1 1 1 2 2
1 3 0 0 1 2 0 2 2 2 0
2 1 2 2 3 3 2 0 1 0
Fig. 1. Example of gray level co-occurrence matrix: (a) original matrix, (b) GLCM matrix.
has three constituents known as hue, saturation and Local Binary Patterns
value. Local binary pattern (LBP), proposed by Ojala
Hue component is related to color, by referring to et al. [28], draws out local information from an image
which pure color it belongs to. It is defined as an angle by using neighbourhood pixel block, while consider-
and ranges from 0° to 360°, with each degree occupy- ing center pixel intensity as the threshold value. The
ing different colors. Saturation describes the level of neighborhood pixels are compared to the center pixel.
brightness and lightness of color component. Its value If the neighborhood pixel intensity is greater than that
ranges between 0 and 1, with the color intensity of the center pixel, the value is set to binary one, else
increasing simultaneously with saturation value. The zero. The resulting zeros and ones are then put
last component, i.e., value defines the intensity of the together to create a binary number in order to generate
color that can be extracted from the color information an LBP code for the center pixel. Mathematically, the
obtained from the image. The range of value compo- LBP operator for p surrounding pixels and radius r can
nent varies from 0 to 1, where 0 refers to completely be expressed as:
dark and 1 to completely bright intensity level. HSV p
color space is mostly preferred by researchers because
of its close proximity to human perception of color and
LBPp,r = P (I
i =1
1 i − I c ) 2i −1, (1)
invariance [37]. In this present work, images have been
1 t ≥ 0
transformed from RGB to HSV color space for feature P1 ( t ) = (2)
extraction. 0 else.
Here, Ii and Ic refer to the intensity values of the neigh-
bourhood and the center pixel, respectively. The LBP
Gray Level Co-occurrence Matrix map so created is thereafter converted into histogram
with the help of following equations:
One of the popular statistical approaches for
extraction of image features include gray level co- M N
occurrence matrix (GLCM) [25]. The matrix relates
to the spatial arrangement of co-occurring gray valued
His ( L ) LBP = P ( LBP ( m, n) , L) ;
m =1 n =1
2
(3)
L ∈ [0,(2 − 1)],
pairs of pixels located at a certain distance in a partic- p
1 3 5 0 0 1
Thresholding
8 4 7 1 1 Binary: 00111101
Decimal: 61
3 5 9 0 1 1
information, hence we consider 8-neighborhood pix- compute the difference between the neighborhood
els for pattern creation. Each neighborhood pixel is pixel and its four adjacent neighbouring pixels in four
considered, one at a time, and compared with four directions, viz., 0°, 45°, 90°, and 135°. Thus, for each
most adjacent pixels. These four pixels are located at neighborhood pixel, we have
0°, 45°, 90°, and 135°. An example for creating LTrDP
is illustrated in Fig. 3 and explained as follows.
Consider a center pixel Ic. The window chosen D1 = I i, j +1 − I i, j , D2 = I i −1, j +1 − I i, j ,
(5)
consists of closest 8 neighborhood pixels. Firstly, we D3 = I i −1, j − I i, j , D4 = I i −1, j −1 − I i, j ,
where (i, j) denote the location of the neighborhood LTrDP2 ( I c ) = {P4 ( f1 ) , P4 ( f2 ) , …, P4 ( f8 )} , (10)
pixel in question. We thus have four differences, D1,
D2, D3, and D4 for each neighborhood pixel. Further, a 1, x=2
pattern is configured based on all the four differences. P4 ( x ) = (11)
0, else,
f ( D1, D2, D3, D4 ) = {#(Dk < 0)} mod 4
∀k = 1, 2,3, 4,
(6) LTrDP3 ( I c ) = {P5 ( f1 ) , P5 ( f2 ) , …, P5 ( f8 )} , (12)
where #(Dk < 0) represents total count of Dk with neg- 1, x =3
ative values, for all k = 1, 2, 3, 4. #(Dk < 0) results in P5 ( x ) = (13)
0, else.
values ranging from 0 to 4. In order to calculate value
of each pattern, a mod of #(Dk < 0) is calculated with These three patterns so obtained are further con-
4. The values are calculated according to #(Dk < 0), verted into pattern map using the following equation:
e.g., if all Dk are negative for k = 1, 2, 3, 4, then 7
#(Dk < 0) is 4 and # ( Dk < 0) mod 4 results in zero. In LTrDP ( I c ) i =1,2,3 = 2 l
× LTrDPi ( I c ) ( l + 1) . (14)
this manner, # ( Dk < 0) mod 4 is assigned values 0, 1, l =0
2, and 3. For every neighborhood pixel i = 1, 2, 3, …, After attaining the pattern map, feature is extracted
8, pattern values fi ( D1, D2, D3, D4 ) is computed result- by computing histograms for all three binary patterns
ing in tetra-directional pattern using Eqs. (3) and (4).
LtrDP ( I c ) = { f1, f2, …, f8}. (7) The tetra-directional pattern extracts most of the
In this manner, we achieve a quaternary pattern for local information around the center pixel, but it has
each center pixel, which are further converted into been observed that magnitude pattern can also be
three binary patterns helpful in creating more illustrative feature vector [29].
Thus, we exploit magnitude information in order to
LTrDP1 ( I c ) = {P3 ( f1 ) , P3 ( f2 ) , …, P3 ( f8 )} , (8) create a magnitude pattern. It makes use of the magni-
tude values of each pixel present in the window and its
1, x =1
P3 ( x ) = (9) neighborhood pixels in four directions, viz., 0°, 45°,
0, else, 90°, and 135°. Magnitude pattern is created as follows:
Mi = ( I a,b +1 − I a,b )2 + ( I a −1,b +1 − I a,b )2 + ( I a −1,b − I a,b )2 + ( I a −1,b −1 − I a,b )2, (15)
where i = 0, 1, 2, …, 8 denotes each pixel located at described by Ic and the neighborhood pixels are
location (a, b) in the window, with M0 referring to the described by the shaded region, denoted from I1 to I8.
value calculated for the center pixel. Binary value is An example window is taken in Fig. 3b. Magnitude
further assigned to each neighborhood pixel based on term M0 for the center pixel is calculated in Fig. 3c
comparison as shown:
using Eq. (15). In Fig. 3d, pixel I1 is compared with its
1, M i ≥ M 0 neighborhood pixels located at 0°, 45°, 90°, and 135°,
Magi ( M i , M 0 ) = ∀i = 1,2,…,8, (16)
0, else i.e., I9, I10, I2, and I3, respectively and “0” and “1” is
assigned for all four comparisons. Since I1 > I9, I1 =
LtrDPmag ( I c ) = {Mag1, Mag2, …, Mag8} , (17) I10, I1 < I2 and I1 > I3, hence the pattern for I1 is 1001.
7 Thus, according to Eq. (6), the pattern value for I1 is 2.
LTrDP ( I c ) mag = 2
l =0
l
× LTrDPmag ( I c ) ( l + 1) . (18) Further, magnitude value M1 for the pixel is calculated
using Eq. (15) and compared with that of the center
Further, the histogram for this magnitude pattern pixel. Since M1 < M0, hence, “0” pattern value is
is obtained using Eqs. (3), (4). All the four histograms assigned for this. In the similar manner, pattern values
obtained are then concatenated and a joint histogram
is obtained as the final feature vector for rest of the neighborhood pixels is calculated from
Figs. 3e–3k, and one quaternary pattern and one
Hist = His LtrDP1 , His LtrDP2 , His LtrDP3 , His LtrDPmag . magnitude pattern is formed. The quaternary pattern
(19) is further divided into three patterns based on
Figure 3 illustrates the creation of LTrDP with the Eqs. (8)–(13). All the four binary patterns are further
help of an example. Figure 3a describes the window converted into histograms and are concatenated
chosen for creating the pattern. The center pixel is together to result in a feature vector.
Image
database
Value Median
Local tetra-
Centre pixel directional
magnitude pattern
Feature
vector
Gray level database
co-occurrence Resize matrix
matric to vector
Results Similarity
match
( fDB , fDB
j1
,…, fDB jL ) , j = 1, 2, …, |DB|. The distance
j2
Ravg ( b, n) = 1
N qc R (q, n) ,
q =1
(24)
measure d1 can be calculated using the following for-
mula: where b refers to the category number in the database.
Further, we compute total precision and total recall for
L
fDB ji − fQi the whole dataset using the following two equations:
D (Q,DB j ) = 1+ f + fQi
, (20) Nc
Ptotal ( n) = 1 P (b, n) ,
i =1 DB ji
avg (25)
where fDB ji refers to the ith feature of the jth image Nc b =1
in the number of images that are to be retrieved. It can case of LNDP. Thus, it can be seen that the proposed
be observed from the table that the proposed method method performs well for retrieving natural images
is more benevolent than the other existing methods in from a huge database.
terms of both precision and recall. Figures 7a, 7b
depict the graphical results for precision and recall for
Corel-1K database. It can be observed that the pro- Database-2 (AT&T)
posed method outperforms the other methods. For
retrieval of 10 images, the average retrieval rate for the Another experimentation for CBIR is carried out
proposed method is improved by 0.805% in case of using AT&T face database [41]. The database com-
LeCoP, 7.92% for LNIP, 12.13% for Tri-Directional
Pattern, and 16.20% in case of LNDP. While retriev- prises of 400 facial images of size 92 × 112. These
ing 100 images, the proposed method shows an 400 images are further divided into 40 categories with
improvement of 10.48% for LeCoP, 16.90% for LNIP, each category consisting of ten images. Figure 8 shows
21.21% for Tri-Directional Pattern, and 19.31% in a few sample images from the AT&T dataset.
Retrieved images
In this experiment, initially, a single image was was carried out for every image present in the data-
retrieved and the count of retrieval was increased by 1. base. Some of the query images and their correspond-
Ten images were retrieved maximum for each category ing retrieved images are represented in Fig. 9. Preci-
and results obtained were analysed. The experiment sion and recall values were evaluated for each experi-
(a) LeCoP
80
Tri-directional
70 LNDP
LNIP
60
Precision, % PM
50
40
30
20
10
0
10 20 30 40 50 60 70 80 90 100
No. of images retrieved
50
(b)
10
LeCoP
10
Tri-directional
10
LNDP
Recall , %
10 LNIP
10 PM
10
10
10
10
0
10 20 30 40 50 60 70 80 90 100
No. of images retrieved
Fig. 7. (a) Precision (%) and (b) recall (%) for Corel-1K dataset.
ment. Tables 4 and 5 depict the average precision and pattern, the proposed method shows an improvement
recall percentage for different number of retrieved by 6.45% and for LNDP, it shows an improvement of
images for all the techniques. From the results, it was 1.048%. This indicates the method is good for detec-
observed that the proposed method results in the bet- tion and identification of faces in comparison to the
ter precision and retrieval rates in comparison to other existing methods.
methods. Graphs for precision and recall are shown in
Figs. 10a, 10b. From the graphs, the performance of
the proposed method can be compared with the other Feature Vector Length
existing methods. For each method, the results show Table 4 calculates and describes the feature vector
100% in the case of retrieving only one image, thus lengths for every method. It can be seen that the pro-
indicating that every query image is retrieved success- posed method has the highest feature vector length out
fully for each of the methods. Further, when 2 images of all the methods. Further, the computational time
are being retrieved, the proposed method shows an for each method depends on its corresponding feature
improvement in the average retrieval rate by 23.437% vector length. Higher length of feature vector corre-
for LeCoP, 8.715% for LNIP, 4.558% for Tri-direc- sponds to higher amount of time taken for retrieving a
tional method, and 0.99% in case of retrieval by single image. Hence, compared to other existing
LNDP. While retrieving 10 images, the proposed methods, the proposed method results in highest
method is improved by 39.634% in case of LeCoP and computational time on account of highest feature vec-
10.96% for LNIP pattern. In case of Tri-directional tor length.
Retrieved images
100 LeCoP
(a)
90 Tri-directional
80 LNDP
LNIP
70
Precision, %
PM
60
50
40
30
20
10
0
1 2 3 4 5 6 7 8 9 10
No. of images retrieved
50
LeCoP (b)
45 Tri-directional
40 LNDP
35 LNIP
PM
Recall, %
30
25
20
15
10
5
0
1 2 3 4 5 6 7 8 9 10
No. of images retrieved
Fig. 10. (a) Precision (%) and (b) recall (%) for AT&T dataset.
LeCOP 72 + 20 + 256 348 In this paper, directional patterns have been taken
into consideration and weightage has also been given
Tri-directional 256 + 256 + 256 768 to the center pixel. Median has also been taken into
LNDP 256 256 account because of its robustness and preservation of
LNIP 256 + 256 512 edges. The proposed method can be used in various
applications like face detection, fingerprint recogni-
PM 1 + 72 + 20 + 256 + 256 + 256 + 256 1117 tion, etc.
29. M. Subrahmanyam, R. P. Maheshwari, and R. Balasu- Anterpreet Kaur Bedi was born in
bramanian, “Local tetra patterns: A new feature de- Pathankot, Punjab, on July 7, 1992.
scriptor for content-based image retrieval,” IEEE She received B.E. degree and M.E.
Trans. Image Process. 21 (5), 2874–2886 (2012). degree (Gold Medalist) in Electron-
ics from Department of Electronics
30. M. Subrahmanyam and Q. J. Wu, “Local ternary co- and Communication Engineering,
occurrence patterns: A new feature descriptor for MRI Dr. B. R. Ambedkar National Insti-
and CT image retrieval,” Neurocomputing 119, 399– tute of Technology, Jalandhar, India
412 (2013). in 2014 and 2017, respectively. Cur-
rently, she is pursuing her Ph.D.
31. M. Verma and B. Raman, “Center symmetric local bi- degree in Electronics and Commu-
nary co-occurrence pattern for texture, face and bio- nication Engineering Department,
medical image retrieval,” J. Visual Commun. Image Dr. B. R. Ambedkar National Insti-
tute of Technology, Jalandhar, Punjab, India. Her major
Representation 32, 224–236 (2015). fields of interest are content-based image retrieval and bio-
32. M. Verma, B. Raman, and S. Murala, “Local extrema medical imaging.
co-occurrence pattern for color and texture image re-
trieval,” Neurocomputing 165, 255–269 (2015).
Ramesh Kumar Sunkaria was born in
33. S. R. Dubey, S. K. Singh, and R. K. Singh, “Local di- Kot Khalsa, (Amritsar), on February
agonal extrema pattern: A new and efficient feature de- 20, 1967. He received B.Tech. degree
in Electronics Engg. from Depart-
scriptor for CT image retrieval,” IEEE Signal Process. ment of Electronics Technology,
Lett. 22 (9), 1215–1219 (2015). Guru Nanak Dev University Amrit-
34. M. Verma and B. Raman, “Local tri-directional pat- sar, and M.Tech. (Hons.) Degree in
Electronics Engg. from Guru Nanak
terns: A new texture feature descriptor for image re- Dev Engineering College, Ludhiana
trieval,” Digital Signal Process. 51, 62–72 (2016). (Punjab Technical University, Jaland-
35. M. Verma and B. Raman, “Local neighborhood differ- har) in 1990 and 2004, respectively.
He did his Ph.D. degree from Electri-
ence pattern: A new feature descriptor for natural and cal Engineering Department, Indian
texture image retrieval,” Multimedia Tools Appl. 77 Institute of Technology Roorkee, Roorkee in June 2010.
(10), 11843–11866 (2018). He worked as Engineer in Bharat Heavy Electricals
36. P. Banerjee, A. K. Bhunia, A. Bhattacharyya, P. P. Roy, Limited, Haridwar upto June 2004. Thereafter he joined
and S. Murala, “Local neighborhood intensity pattern— Indian Broadcasting (Engineers) Service, Govt. of India
a new texture feature descriptor for image retrieval,” Ex- and worked as Assistant Director (Engineering) until
August 1996. He directed the installation of numerous radio
pert Syst. Appl. 113, 100–115 (2018). and TV projects all-over India, namely, VLPT Joginder
37. A. Vadivel, S. Sural, and A. K. Majumdar, “An inte- Nagar, VLPT Ahjufort, VLPT Kalakot etc. Afterwards he
grated color and intensity co-occurrence matrix,” Pat- joined academics and at present he is Associate Professor in
tern Recognit. Lett. 28 (8), 974–983 (2007). Department of Electronics & Communication Engineer-
ing, Dr. B. R. Ambedkar National Institute of Technology,
38. S. Murala, R. P. Maheshwari, and R. Balasubramani- where he has been teaching UG/PG courses related to sig-
an, “Directional local extrema patterns: A new descrip- nal processing and communication engineering. Presently,
tor for content based image retrieval,” Int. J. Multime- he is also serving as Head in the Department of Electronics
and Communication Engineering in the institute. His cur-
dia Inf. Retr. 1 (3), 191–203 (2012). rent research interests are in bio-electric signal and image
39. H. Müller, W. Müller, D. M. Squire, S. Marchand- processing, filter banks and non-linear heart variability
Maillet, and T. Pun, “Performance evaluation in con- studies. He has 57 publications in reputed international
tent-based image retrieval: Overview and proposals,” journals and 45 publications in conference proceedings. At
present, seven PhD thesis have been guided and six PhD
Pattern Recognit. Lett. 22 (5), 593–601 (2001). thesis are in progress under his guidance, 34 M.Tech thesis
40. The Corel-1K Database. have already been completed and more than 44 B.Tech
http://wang.ist.psu.edu/docs/related/ projects have been completed. Also, there are two ongoing
projects under his supervision, funded by DST SERB and
41. The AT&T Database of Faces (2002). AICTE. He is member of IEEE Engineering in Medicine
http://www.uk.research.att.com/facedatabase.html and Biology Society and IEEE Computer society.