Document 12917214

advertisement
International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 4- January 2016
Enhancement of Image Retrieval using Color
and Shape Features
1
J.Dhyaneswaran, 2R.Priyanka, 3M.Shanmuga Priya, 4K.Shriharini, 5J.Vaishali
1
Assistant Professor,Information Technology, Dr.Mahalingam College of Engineering and Technology, Coimbatore,India
2 ,3,4,5 Information Technology,Dr.Mahalingam College of Engineering and Technology, Coimbatore,India
Abstract Content based image retrieval (CBIR) is
represented to be a challenging problem making it an
active research topic. Shape analysis is one of the
main approach to the problem. The size of the feature
vector equal to image size and need of all images in
the database to be of same size are two major
drawbacks of the image retrieval. These drawbacks
are removed in the proposed content based CBIR
methods using sobel operator and block truncation
coding(BTC). This paper presents a novel
framework using color and shape features by taking
out the various components of an image using the
HSV color spaces to retrieve the edge features. The
speed of shape based retrieval can be enhanced by
considering approximate shape rather than the exact
shape. In addition to this a combination of color and
shape based retrieval is also included to improve the
accuracy of the result.
Keywords- Feature vector, Sobel operator, Block
Truncation Coding
I. INTRODUCTION
1.1 OBJECTIVE
II. SYSTEM DESIGN
2.1 PROPOSED SYSTEM
We propose fused characteristics of color and
shape features for perceptual image recognition.
Combination of edge histogram for color and
gradient method for shape feature extraction makes
the image retrieval more efficient. In the gradient
method the edges are detected first by using the Sobel
filter(i.e gradient filter).By applying histogram for
both color and shape, concatenation is performed.
CBIR using fused color and shape features retrieves
best matching images from the database to the query
images.
2.1.1 MODULES
CBIR is the Content Based Image Retrieval.
CBIR system have been developed to handle the
large image database effectively. The intention of
Content Based Image Retrieval (CBIR) systems is to
operate on collections of images and, in response to
visual queries, extract significant image. The
application potential of CBIR for fast and effective
image retrieval is massive, expanding the use of
computer technology to a management tool. CBIR is
desirable because most web-based image search
engines depend purely on metadata and this produces
a lot of garbage in the results. Textual information
about images can be easily searched using preexisting technology, but CBIR requires humans to
manually describe each image in the database. Shape
ISSN: 2231-5381
of the objects represented in images is one of the
most significant properties used in CBIR and in
identification tasks. This is particularly due to the fact
that shape is perceptually very relevant in order to
recognize objects. CBIR can filter images based on
their content would provide better indexing and
return more accurate results.
1.
2.
Color feature extraction
Shape feature extraction
Color is the first and most straightforward
visual feature for Indexing and retrieval of images,
relatively robust and simple to represent. It is also the
most commonly used feature in the field. The choice
of a color system is of great importance for the
purpose of proper image retrieval. Another
Prerequisite might be that the color system should
exhibit perceptual uniformity meaning that numerical
distances within the color space can be related to
human perceptual difference. This is important when
images are to be retrieved which should be visually
similar (e.g. stamps, trademarks and paintings)
http://www.ijettjournal.org
Page 223
International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 4- January 2016
Color histogram is a representation of the
distribution of colors in an image. Color histogram
represents the image but from another perspective. It
counts similar pixels and store it. Basically, color
histogram is a color descriptor and each descriptor
contains a feature extraction algorithm and matching
function.
2.1.1.1 COLOR FEATURE EXTRACTION
2.1.1.1.1 CONVERSION OF RGB TO HSV
RGB color space does not meet the visual
requirements. So the image converted from RGB to
HSV space. Color vision can be processed using
RGB color space or HSV color space. RGB color
space describes colors in terms of the amount of red,
green, and blue present.
HSV color space describes colors in terms
of the Hue which varies from 0 to 360 degrees.,
Saturation which shows the grey range in colour
space and ranges from 0 to 1,A faded color is due to a
lower saturation level, which means the color
contains more grey and Value which is the brightness
of color and varies with saturation and range from 0
to 1. When the value is „0‟ the color space will be
totally black. With the increase in the value, the color
space brightness up and shows various colors. RGB
defines color in terms of a combination of primary
colors, whereas, HSV describes color using more
familiar comparisons such as color, vibrancy and
brightness.
During digital image processing each pixel
can be represented in the computer memory or
interface hardware (for example, a graphics card)
as binary values for the red, green, and blue color
components. When properly managed, these values
are converted into intensities or voltages via gamma
correction to correct the inherent nonlinearity of
some devices, such that the intended intensities are
reproduced on the display.
cmap = rgb2hsv(M) converts an RGB colormap M to
an HSV colormap cmap.
The colormaps are m-by-3 matrices. The elements of
both colormaps are in the range 0 to 1.
ISSN: 2231-5381
The columns of the input matrix M represent
intensities of red, green, and blue, respectively.
The columns of the output matrix colormaps
represent hue, saturation, and value, respectively.
The R,G,B values are divided by 255 to change the
range from 0..255 to 0..1:
R' = R/255
G' = G/255
B' = B/255
Cmax = max(R', G', B')
Cmin = min(R', G', B')
Δ = Cmax - Cmin
Hue calculation:
Saturation calculation:
Value calculation:
V = Cmax
2.1.1.1.2 HISTOGRAM CALCULATION
Histogram plots are used to better
understand how frequently or infrequently certain
values occur in a given set of data.A histogram shows
what proportions of a dataset fall within which ranges
imhist(I) calculates the histogram for the
intensity image I and displays a plot of the histogram.
The number of bins in the histogram is determined by
the image type.
imhist(I,n) calculates
the
histogram,
where n specifies the number of bins used in the
histogram. n also specifies the length of the colorbar
displayed at the bottom of the histogram plot.
http://www.ijettjournal.org
Page 224
International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 4- January 2016
imhist(X,map) displays a histogram for the
indexed image X. This histogram shows the
distribution of pixel values above a colorbar of the
colormap map. The colormap must be at least as long
as the largest index in X. The histogram has one bin
for each entry in the colormap.
The inputs that has to be given inorder to calculate
histogram is Number of bins,Input indexed
image,colormap associated with indexed image and
an input image as a array and the output results as
histogram counts
Fig.1 Image Retrieval Process
2.1.1.2 SHAPE FEATURE EXTRACTION
Shape of the objects represented in images is
one of the most significant properties used in CBIR
and in recognition tasks. This is particularly due to
the fact that shape is perceptually very relevant in
order to recognize objects.Shape representation of the
image can be considered as one of the important
image discrimination factors, which can be used as
feature vector for image retrieval.Generally gradient
operators and morphological operations are used to
extract the boundary of shape as edges present in the
image. To get the complete boundary of the shape in
the image in form of connected edges, Slope
magnitude method is used along with a gradient
operator(sobel) to extract the shape features in form
of connected boundaries.
we apply the mask on the image it prominent vertical
edges. It simply works like as first order derivate and
calculates the difference of pixel intensities in a edge
region.
As the center column is of zero so it does
not include the original values of an image but rather
it calculates the difference of right and left pixel
values around that edge. Also the center values of
both the first and third column is 2 and -2
respectively.
This give more weight age to the pixel
values around the edge region. This increases the
edge intensity and it becomes enhanced
comparatively to the original image. Also when we
apply more weight to the mask, the more calculate
approximations of the derivatives - one for horizontal
changes, and one for vertical. If we define A as the
source image, and Gx and Gy are two images which at
each point contain the edges it attained.
The operator uses two 3×3 kernels which
are convolved with the original image to horizontal
and vertical derivative approximations, the
computations are as follows:
where * here denotes the 2-dimensional
signal processing convolution operation.
Since the Sobel kernels can be decomposed
as the products of an averaging and a differentiation
kernel, they compute the gradient with smoothing.
For example,
can be written as
2.1.1.2.1 SOBEL OPERATOR
The Sobel operator, sometimes called
the Sobel-Feldman operator or Sobel filter, is used
in image processing and computer vision, particularly
within edge detection algorithms where it creates an
image emphasizing edges. It is also a derivate mask
and is used for edge detection. In sobel operator the
coefficients of masks are not fixed and they can be
adjusted according to our requirement unless they do
not violate any property of derivative masks. When
ISSN: 2231-5381
The x-coordinate is defined here as increasing
in the "right"-direction, and the y-coordinate is
defined as increasing in the "down"-direction. At
each point in the image, the resulting gradient
approximations can be combined to give the gradient
magnitude, using:
http://www.ijettjournal.org
Page 225
International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 4- January 2016
Using this information,
calculate the gradient's direction:
we
can
also

Original Image
Edge Detected Image
Fig.2 Edge detection using sobel operator
(a)
(b)
2.1.1.2.2 BLOCK TRUNCATION CODING
The feature vector size should be equal to
image size and need of all images in the database to
be of same size are two major problems of the image
retrieval methods using shape edge images. These
weaknesses are removed in the proposed method
using block truncation coding (BTC).To apply image
compression algorithms,Block Truncation Coding
(BTC) is one of the simpler and easier way .In BTC
an image is divided into non over lapping blocks of
pixels, and a two level quantize is designed for each
block.Both the threshold and the two restoration
levels are varied in response to the local data of a
block.
Fig.3 Block Truncation Coding
(a) Transmitter (b) Receiver
Fig.4 Query image
ISSN: 2231-5381
http://www.ijettjournal.org
Page 226
International Journal of Engineering Trends and Technology (IJETT) – Volume 31 Number 4- January 2016
[8] A. W. M. Smeulders, M. Worring, S. Santini, A. Gupta, and R.
Jain, "Content-Based Image Retrieval at the End of the Early
Years," IEEE Transactions on Pattern Analysis and Machine
Intelligence, Vol. 22, Issue 12, pp. 1349-1380, December 2000.
[9] Sarfraz and M. Ridha “Content-Based Image Retrieval Using
Multiple Shape Descriptors”, IEEE/ACS International Conference
On Computer Systems and Applications, pp. 730-737, 2007.
[10] Irena Valova, Boris Rachev and Michael Vassilakopoulos,
“Optimization of the Algorithm for Image Retrieval by Color
Features”, International Conference on Computer Systems and
Technologies- CompSysTech‟ , pp 1-4, 2006.
[11] Jagadeesh Pujari, Pushpalata S. N., “Content based image
retrieval using color and shape descriptors”,2010 IEEE.
Fig.5 Search results for query image
3. CONCLUSION
On the basis of previous researches, the
results of low-level features of color and texture
extraction of CBIR seems to be efficient. After
comparing the CBIR based on color and texture
features with that of the color and shape fused
features, it is observed that CBIR based on color and
shape features provides better results i.e. results of
color and shape fused features are robust than the
color and Texture features based image retrieval thus
making image retrieval more efficient.
REFERENCES
[1] Dengsheng Zhang and Guojun Lu, “Review of shape
representation and description techniques”, Pattern Recognition
Society. Published by Elsevier Ltd, Vol. 37, pp. 1-19, 2004.
[2] A. Grace Selvarni and Dr. Annadurai, A “Content based
medical image retrieval for medical images using generic fourier
descriptors”,Journal
of
computational
intelligence
in
bioinformatics, ISSN: 0973-385X vol. 1 number 1 (2008) pp. 6572, Research Indian
Publications.
[3] Dr.H.B.Kekre, Sudeep D. Thepade, Shobhit W., Miti K.,
Styajit S., Priyadarshini M. “Image Retrieval with Shape Features
Extracted using Gradient Operators and Slope Magnitude
Technique with BTC”, International Journal of Computer
Applications (IJCA), Volume 6, Number 8, pp.28-33, September
2010
[4]Huang, Z. C, Chan, P.P, Ng .W. W. &Yeung, ,D .S (2010 July)
Content Based Image Retrieval using Color moment and Gabor
texture feature .In machine learning and Cybernetics (ICMLC),
2010 ,International conference on(Vol 2, P.P ,719-724) IEEE
[5] Sami Brandt, Jorma Laaksoner and krkki oja, A“Statistical
Shape Features in Content-based ImageRetrieval”, © 2000 IEEE.
[6] The IEEE website. [Online]. Available: http://www.ieee.org/
[7]Webpage:www.research.rutgers.edu/~chansu/cs580web/week06
-bme429-cbir.pdf Content Based Image Retrieval
ISSN: 2231-5381
http://www.ijettjournal.org
Page 227
Download