A Novel Improved Technique of Image Indexing Using Local Patterns

advertisement
International Journal of Engineering Trends and Technology (IJETT) – Volume 12 Number 9 – Jun 2014
A Novel Improved Technique of Image Indexing
For Efficient Content Based Image Retrieval
Using Local Patterns
Srikant S K#1, Dr T C Manjunath*2
#1
PG student, Dept of ECE, HKBK college of Engineering, Bangalore, India
#2
Principal, HKBK college of Engineering, Bangalore, India
Abstract— with the rapid growth in the collection of digital
libraries due to large availability of digital cameras, mobile
phones and other multimedia, necessity for large image database
has raised. Therefore efficient way of retrieving the images has
become an important research area. Content based image
retrieval is a method to retrieve the images from the large
database based on the image content. Here in this work, we
propose a novel image indexing algorithm for CBIR using local
patterns. The main objective of the proposed method is to
retrieve the best relevant images from the stored database that
matches the query image. LTrP algorithm encodes the
relationship between the referenced pixel and its neighboring
pixel based on the directions which are calculated using the firstorder derivatives in horizontal and vertical direction. Further in
order to improve the performance we are combining LDP and
LTP with the LTrP and construct the feature vector. The
patterns of the query image and images in database are
compared to produce the retrieved relevant image. The
performance resulting from the combination of LTrP, Ldp and
Ltp has been analyzed. The analysis shows that the proposed
method improves the retrieval result in terms of average
retrieval rate, as compared with the existing methods.
KEYWORDS: Content-Based Image Retrieval (CBIR), Local
Tetra Patterns (LTrPs), Local Derivative Pattern (LDP), Local
Ternary Pattern (LTP).
I. INTRODUCTION
In the recent years we are witnessing a rapid growth in the
volume of image and video collections due to the large
availability of digital cameras, web cameras and mobile
phones inbuilt with such devices. The information is available
in huge quantity and it has become a very difficult task to
access and manage this huge database. So there should be
some means that can help the user in accessing the database
easily and in a more convenient way. Content-based image
retrieval (CBIR) is one of the best technique for such
applications.
Today content based image retrieval has become an
important research area in the field of digital image processing
techniques. The research of cbir has been started in early
1990’s and is still a hot topic in this 21st century. Due to the
growing demand of cbir in the field of multimedia such as
crime prevention, biometric techniques of identification and
many others make the application developers to build a
technique for retrieving the images efficiently. The general
ISSN: 2231-5381
method adopted for browsing the database to search for
identical images involves text based keywords or by giving
description of the image which would be impractical since it
takes a lot of time and requires user intervention. A more
practical way is to use Content based image retrieval (CBIR)
technology.
CBIR has provided an easy way to retrieve images based
on the visual content or features of the images itself. The
CBIR system simply extracts the content of the query image,
matches them to contents of the search image. CBIR is
defined as the process to find similar picture or pictures in the
image database when an input query image is given. Suppose
consider an image of a flower as the query image, then the
system must be able to produce all similar images of a flower
from the database to the users. This is done by picking up the
features of the images such as color, texture and shape. These
image features is used to comparability among the query
image and images in the database. A comparison or similarity
algorithm is used to calculate the degree of similarity between
those two images. Images in the database which has similar
images features to the query image (having minimum distance
between them) is then retrieved and displayed to the user.
Basically cbir is a two step process which is Feature
Extraction and Image Matching (also known as feature
matching).
Feature Extraction is the process to extract image
features to a distinguishable extent. Information extracted
from images such as color, texture and shape are known as
feature vectors. The feature extraction is done on both input
query images and images stored in the database. Image
matching involves using the features of both images and
comparing them to search for similar features of the images in
the database. Using multiple feature vectors to describe an
image during retrieval process increases the accuracy when
compared to the retrieval using single feature vector. For
example, searching of image based on its color and texture
provides a better result than using a single color feature since
two features are now used as indicator during matching
process.
Texture analysis of an image has been extensively
used in computer vision and pattern recognition applications
because of its potentiality in extracting the prominent features.
http://www.ijettjournal.org
Page 432
International Journal of Engineering Trends and Technology (IJETT) – Volume 12 Number 9 – Jun 2014
Texture retrieval is a branch of texture analysis that has
attracted wide attention from industries since this is well
suitable for the identification of products such as ceramic tiles,
marble, slabs, etc.
II. RELATED WORK
In this paper the analysis of image indexing and
retrieval algorithm using combination of local patterns for
content-based image retrieval (CBIR) has been proposed. The
standard local derivative pattern (Ldp) and local ternary
pattern encodes the relationship between the referenced pixel
and its surrounding neighbors by computing gray-level
difference. The ltrp method encodes the relationship between
the referenced pixel and its neighbors based on the directions
that are calculated using the first-order derivatives in vertical
and horizontal directions [1].
Muller et al. [6] provides a comprehensive and broad
review of CBIR systems for medical applications. The Image
Retrieval for Medical applications (IRMA) project [7] [8]
describes CBIR methods for medical images using intensity
distribution and texture measure. The main characteristics of
this project are its support to allow the retrieval of similar
images from heterogeneous databases. Ojala et al. [10]
presents a simple and efficient multiresolution method to
gray-scale and rotation invariant texture classification based
on local binary patterns and nonparametric discrimination of
sample and prototype distributions. Laio et al [11] proposed
an approach, in which features are robust to image rotation,
less sensitive to histogram equalization and noise. It
comprises of two sets of features: dominant local binary
patterns (DLBP) in a texture image and the supplementary
features extracted by using the circularly symmetric Gabor
filter responses. A combined completed LBP (CLBP) scheme
[12] is developed for texture classification in which a local
region is represented by its centre pixel and a local difference
sign-magnitude transform (LDSMT). Ahonen et al. [13]
reported a novel and efficient facial image representation
based on local binary pattern (LBP) texture features. The LBP
technique [5] has been widely used in numerous applications
due to its finest texture descriptor performance. It has proven
to be highly discriminative and its key advantages, mainly, its
invariance to monotonic gray-level changes and
computational efficiency, make it suitable for demanding
image analysis task. Zhang et al. proposed local derivative
patterns (LDPs) for face recognition, in which LDP templates
extract high-order local information by encoding various
distinctive spatial relationships contained in a given local
region[14]. Author et al. proposed a novel approach for face
representation and recognition by examining the information
jointly in image space, scale and orientation domains.
Information collected from different domains is explored and
examined to give an efficient face representation for
recognition. The main challenge is that the use of LBP, LDP
ISSN: 2231-5381
and their extended techniques are not so much reliable under
the unconstrained lighting conditions. To accomplish this
challenge the local ternary pattern (LTP) [16] has been
introduced for image recognition under different lighting
conditions. LTP eliminates most of the effects of changing
illumination and presents a local texture descriptor which is
unique and less sensitive to noise in uniform region.
III. PROPOSED WORK
In the proposed system the content based image retrieval
algorithm is implemented using the combination of local
patterns (LTrp, Ltp and Ldp). More detailed information can
be collected from an image using these local patterns. The ltrp
encodes the relationship between referenced pixel and its
neighboring pixel based on the directions. The directions are
calculated using first order derivatives in horizontal and
vertical directions. The Ldp and Ltp encodes the relationship
between center pixel and neighboring pixels by computing
gray level difference. These methods extract the information
from an image based on the distribution of edges in more than
two directions. The combination of these different patterns
will help in collecting more detailed information from an
image.
The complete architecture of the proposed system is shown
below in the figure 1
Fig 1 Block diagram of the proposed framework
Initially, the query image is loaded and converted into
grayscale image. As the dataset may be of different size, the
image is resized. After resizing, the first-order derivative in
both horizontal and vertical axis is applied and direction of
every pixel is calculated. Based on the direction of the centre
pixel the patterns are divided into four parts. The tetra patterns
are calculated and separated into three binary patterns. Also
http://www.ijettjournal.org
Page 433
International Journal of Engineering Trends and Technology (IJETT) – Volume 12 Number 9 – Jun 2014
the features are extracted from ternary and derivative patterns
(ltp & ldp) and then all patterns are combined to form the
feature vector. The query and database image then is
compared using Euclidean distance technique for similarity
measurement. Finally, the best matched images are retrieved
from the image database in response to the query image.
The proposed system has the following structure.
1) Image Database: A database which contains number of
mages with any one of the formats .bmp, .jpg, .tiff. is required.
2) Query: The user provides a sample image or sketched
figure as the query for the system.
3) Preprocessing: this involves resizing and rgb to gray scale
conversion of the input image for easy computations
4) Feature Extraction: The different features like local
derivative pattern, local ternary pattern and local tetra patterns
are to be collected from the database images and input query
image based on the relationship between pixels value. There
are various kinds of low-level visual features to represent an
image, such as color, texture, shape, and spatial relationship.
Since one type of features can only represent part the image
properties, a lot of work done on the combination of these
features.
5) Histogram Representation: The features extracted from
different patterns are concatenated and represented through
histogram to arrive at the feature vector for matching.
6) Similarity Matching: This involves matching these features
to yield a result that is visually similar. The commonly used
similarity measure method is the Distance method. There are
different distances available such as Euclidean distance, City
Block Distance, Canberra Distance.
………………………..eqn (1)
B. Local Derivative Pattern (Ldp)
LBP actually encodes the binary result of the first-order
derivative among local neighbors by using a simple threshold
function, which is incapable of describing more detailed
information. They considered the LBP as the no directional
first-order local pattern operator and expanded it to higher
order (nth-order) called the LDP. The LDP contains more
detailed discriminative features as compared with the LBP.
LDP encodes the higher-order derivative information which
contains more detailed discriminative features that the firstorder local pattern (LBP) cannot obtain from an image.
Given an image I (Z), the first-order derivative along
0
0 ,450 ,900 ,135 directions are denoted as
where α=
along 00,450 ,900 ,1350 .Let gc be a point in I(Z), and Zi , i =
1,……,8 be the neighboring point around gc. The four firstorder derivatives at Z = gc can be written as
c)
eqn(2)
c)
c)
The second –order directional LDP, in α direction at
Z = gc is defined as
IV. IMPLEMENTATION DETAILS
1.
LOCAL FEATURE EXTRACTION
A. Local Ternary Pattern (LTP)
LBPs have proven to be highly discriminative features for
texture classification and are resistant to lighting effects in the
sense that they are invariant to monotonic gray-level
transformations. However because they threshold at exactly
the value of the central pixel they tend to be sensitive to noise,
particularly in near-uniform image regions, and to smooth
weak illumination gradients. Many facial regions are
relatively uniform and it is legitimate to investigate whether
the robustness of the features can be improved in these regions.
LTP is a three-valued code, in which gray values in the zone
of width ± T around gc are quantized to zero, those above
(Gc+T) are quantized to +1, and those below (Gc-T) are
quantized to-1.Local Ternary Patterns are an extension of
Local Binary Pattern. Unlike LBP, it does not threshold the
pixels into 0 and 1 rather it uses a threshold constant T to
threshold pixels into three values. Here T is a user specified
threshold, So LTP code more resistant to noise. LTP can be
determined by equation (1).
ISSN: 2231-5381
…………………....eqn(3)
Where
Where f2(x,y) is a binary coding function determining the
types of local pattern transitions. It encodes the co-occurrence
of two derivative directions at different neighboring pixel.
Finally, the second-order Local Derivative Pattern is
defined as the concatenation of four 8-bit directional LDP’S
http://www.ijettjournal.org
..
…………………..eq(4)
Page 434
International Journal of Engineering Trends and Technology (IJETT) – Volume 12 Number 9 – Jun 2014
C.
Local tetra pattern (LTrp)
Local tetra pattern technique encodes the relationship
between the centre pixel and its neighbors, based on the
directions that are calculated using the first order derivatives
in vertical and horizontal directions.
The first-order derivatives at the centre pixel gc can be
written as
From above equation (7), we get 8-bit tetra pattern for
each centre pixel. Then, we separate all patterns into four parts
based on the direction of centre pixel. Finally, the tetra
patterns for each part (direction) are converted to three
binary patterns. Let the direction of centre pixel obtained
using (2) be “1”; then, can be defined by segregating it into
three binary patterns as follows
|direction
……………………………eq(5)
and the direction of the centre pixel can be calculated as
=
2.
…………………………eq(6)
From (6), it is evident that the possible direction for each
centre pixel can be 1, 2, 3, or 4, and eventually, the image is
converted into four values, i.e., directions. The second-order
tetra pattern is defined as
(
) |direction
SIMILARITY MEASUREMENT
To retrieve the similarity images from the large image
dataset, three types of Distance Metric Measures like
Euclidean Distance, Chi- Square Distance and Weighted
Euclidean but in the proposed method Euclidean distance is
used.
Euclidean Distance:
The formula of Euclidean distance is
=
Where
……………………………….eq(7)
The Euclidean distance is calculated between the query image
and every image in the database. This process is repeated until
all the images in the database have been compared with the
query image. Upon completion of the Euclidean distance
algorithm, we have an array of Euclidean distances, which is
then sorted. The five topmost images are then displayed as a
result of the texture search.
The algorithm flow for the proposed work is given
below
Input: Query image; Output: Retrieval result










Fig 2 Calculation Of Tetra Pattern
ISSN: 2231-5381

Load the query image
Convert the image into grayscale
Resize the image.
Segmenting the image
Apply the first-order derivatives in horizontal and
vertical axis.
Calculate the direction for every pixel.
Calculate the tetra patterns, derivative patterns and
ternary patterns.
Combine all the patterns from all regions.
Construct the feature vector.
Compare the query image with the images in the
database using Euclidian distance method.
Retrieve the images based on the best matches and
display the result on GUI.
http://www.ijettjournal.org
Page 435
International Journal of Engineering Trends and Technology (IJETT) – Volume 12 Number 9 – Jun 2014
Performance Parameters
Precision and Recall (P-R): The images are retrieved
and measured against P-R as
Number of relevant images retrieved
P=
Total Number of images retrieved
Total number of relevant images in the database
R=
Number of relevant images retrieved.
Now in the example given below we have applied
the query image of skull and have retrieved 7 Similar images
from the the database
Fig 3 Proposed work Flow diagram
V. EXPERIMENTAL RESULTS
The database consists of a large number of images of
various contents ranging from animals to outdoor sports to
natural images. These images have been pre-characterized into
different categories each of size 100 by domain experts. The
images in the database contain the different dimensions and
it’s collected into single database images. The performance of
the proposed method is measured in terms of average
precision and average recall. Performance analysis shows that
the proposed method improves the retrieval result from in
terms of average precision/average recall rate.
Fig 5 Retrieved images for a given query image as human
skull.
Fig 4 Sample Database Images
ISSN: 2231-5381
Fig 6 Bar-chart Representation showing performance for
different classes
http://www.ijettjournal.org
Page 436
International Journal of Engineering Trends and Technology (IJETT) – Volume 12 Number 9 – Jun 2014
REFERENCES
Fig 7 Showing the comparison of accuracy rate between
local pattern method and shape based method.
VI. CONCLUSION AND FUTURE ENHANCEMENT
Conclusion
It is clear that the rate at which the number of images
available to the public in digital form grows will increase in
the coming years, because of new image compression
techniques, cheaper storage, and faster Internet connections.
Hence, the role of CBIR (certainly within the framework of
content-based multimedia retrieval) in the future will become
even more important. In this paper we proposed novel
approach referred as LTrPs for CBIR was presented. The
LTrP encodes the images based on the direction of pixels that
are calculated by horizontal and vertical derivatives. In
addition to this we combined ldp and ltp with ltrp and the
performance was analyzed. This Retrieval algorithm mainly
reduces the computational time and at the same time increases
the user interaction. The retrieval accuracy is also increased to
greater extent as the images are retrieved on the basis of both
pixel information and colour feature. Since this idea is
implemented in high level language like Matlab, it can be
used readily in many real time applications.
[1] Subramanian Murala, R.P.Maheshwari and R.Balasubramanian,”Local
Tetra Patterns: A New Feature Descriptor for Content-Based Image
Retrieval” IEEE Trans. Image Process., vol. 21, no. 5, pp. 2874–2886, MAY
2012.
[2] Ashish Gupta, “Content Based Medical Image Retrieval Using Texture
Descriptor, IJREAS” Volume 2, Issue 2 (February 2012), ISSN: 2249- 3905.
[3] D. Unay, A. Ekin, and R. S. Jasinschi, “Local structure-based region- ofinterest retrieval in brain MR images”IEEE Trans. Inf. Technol. Biomed., vol.
14, no. 4, pp. 897–903, Jul. 2010.
[4] M.Saadatmand Tarzjan and H. A. Moghaddam, “A novel evolutionary
approach for optimizing content based image retrieval,” IEEE Trans. Syst.,
Man, Cybern. B, Cybern, vol. 37, no. 1, pp. 139–153, Feb. 2007.
[5] M. Kokare, P. K. Biswas, and B. N. Chatterji, “Rotation-invariant texture
Image retrieval using rotated complex wavelet filters” IEEE Trans. Syst., Man,
Cybern. B, Cybern, vol. 36, no. 6, pp. 1273–1282, Dec.2006.
[6] Müller H, Michoux N, Bandon D, and Geissbuhler A., “ A review of
content-based image retrieval systems in medical applications: clinical
benefits and future directions”, in International Journal of Medical
Informatics ,Vol. 73, No.1, pp. 1-23, 2004.
[7] Lehmann TM, Guld MO, Thies C, Fischer B, Sphzer K, and Keysers D,
“Content-based image retrieval in medical applications”, in International
Journal of Medical Informatics , Vol. 73, No.1, pp. 354-361, 2004.
[8] Thies C, Guld MO, Fischer B, and Lehmann TM, “Content based queries
on the CasImage database with in the IRMA framework”,Lec Notes in Comp
ScienceVol. 3491, pp. 781-92, 2005.
[9] Ma, W.Y., and H.J.Zhang, “Content Based Image Indexing and Retrieval”,
In Handbook of Multimedia Computing,(Ed.) Furht,B.crc Press, Boca Raton,
1998.
[10]T. Ojala, M. Pietikainen, and T. Maenpaa, “Multiresolution gray-scale
and rotation invariant texture classification with local binary patterns,” in
IEEE Trans. Pattern Anal. Mach. Intell., Vol. 24, No. 7, pp. 971–987, July
2002.
[11] S. Liao, M.W. K. Law, and A. C. S. Chung, “Dominant local binary
patterns for texture classification,” in IEEE Trans. Image Process., Vol. 18,
No. 5, pp. 1107–1118, May 2009.
[12] Z. Guo, L. Zhang, and D. Zhang, “A completed modeling of local binary
pattern operator for texture classification,” in IEEE Trans. Image Process.,
Vol. 19, No. 6, pp. 1657–1663, June 2010.
[13] T. Ahonen, A. Hadid, and M. Pietikainen, “Face description with local
binary patterns: Applications to face recognition,” IEEE Trans. Pattern Anal.
Mach. Intell., Vol. 28, No. 12, pp. 2037–2041, Dec. 2006.
[14] B. Zhang, Y. Gao, S. Zhao, and J. Liu, “Local derivative pattern versus
local binary pattern: Face recognition with higher-order local pattern
descriptor,” IEEE Trans. Image Process., Vol. 19, No. 2, pp.
533–544, Feb. 2010.
Future Enhancement
In this proposed system, only horizontal and vertical pixels
have been used for 1st order derivative calculation in
calculating direction pixels. Results can be further improved
by considering the diagonal of pixels for derivative
calculations in addition to horizontal and vertical directions.
Due to the effectiveness of the proposed method, it can be also
suitable for other pattern recognition applications such as face
recognition, fingerprint recognition, etc.
ISSN: 2231-5381
http://www.ijettjournal.org
Page 437
Download