Content-based color image retrieval based on the 2-D histogram and statistical moments

In this paper, we are interested in the problem of finding similar images in a large database. For this purpose we propose a new algorithm based on a combination of the 2-D histogram intersection in the HSV space and statistical moments. The proposed histogram is based on a 3×3 window and not only on the intensity of the pixel. This approach overcome the drawback of the conventional 1-D histogram which is ignoring the spatial distribution of pixels in the image, while the statistical moments are used to escape the effects of the discretisation of the color space which is intrinsic to the use of histograms. We compare the performance of our new algorithm to various methods of the state of the art and we show that it has several advantages. It is fast, consumes little memory and requires no learning. To validate our results, we apply this algorithm to search for similar images in different image databases.


I. INTRODUCTION
The quantity of images produced and archived every day is growing.To exploit these archives, mechanisms to indexing and retrieval stored images are essential.This requires choosing on the one hand, an appropriate representation of the database images through meaningful and reliable visual primitives able to describe the contents of the database and, on the other hand, an efficient indexing structure which takes place in the relatively short time during which the user expects the system response.Several of image retrieval systems are now available in the market, some of these systems are commercialized with a demonstration on the WEB as QBIC [1], and others are still in an experimental phase as Blobworld [2].We outline the main application areas of content-based image retrieval such as the field of biometrics fingerprint recognition or eye color, they are based on specific algorithms for determining these models, we also find handwriting recognition, pattern recognition, medical imaging .., to render the images in the database by the similarity.Generally, the criteria we use to describe an image are the low-level visual descriptors, also called feature vectors, such as color, texture, and shape.These are called low-level descriptors because these are closer to a signal (since image is a signal).These are widely used in current systems because they are easy to implement.This work described in its sections a new method of color images retrieval, and it is organized as follows.We make an overview on the technique of generating 2-D histogram in HSV space in the second and third section, we present then in the fourth section the difference between histograms and histobins.The fifth section focuses on statistical moments.We end this paper by giving some results and then a conclusion.

II. CONSTRUCTION OF 2-D HISTOGRAM
A 2-D histogram of a color image A is a map of value p(x 1 , x 2 ).Each value is the number of pixels in A image presenting the colorimetric components (x 1 , x 2 ).Since each colorimetric axis of image A is quantified on 256 levels, the 2-D histogram p n can be represented by an image B whose spatial resolution is equal to 256 x 256.The value p n (x 1 , x 2 ) of the pixel of coordinates (x 1 , x 2 ) in B is obtained by a linear dynamic contraction of the histogram between 1 and M=min (p max , 255) [3]: (1) where p min and p max are the minimum and maximum values of p.

III. HISTOGRAM 2-D IN HSV SPACE
It is noted that the HSV color space is fundamentally different from the RGB color space because it separates the intensity of the color information (chromaticity), and it has been shown that the HSV space is a perceptual color space.These three components H (Hue), S (Saturation), and V (Value) correspond to the color attributes and are closely related to the way that human eyes perceive colors [4].Many works related to the color image have been developed using this color space.For these reasons, we are developing a new approach to color image retrieval based on the hierarchical analysis of the 2-D histogram using the HSV [5].Sural et al. [6] analyzed the properties of the HSV color space focusing on the visual perception of the variation in the values of hue, saturation and intensity of a pixel in the image.For data of intensity and hue values, if the saturation is changed from 0 to 1, perceived color changes range from a shade of gray to the purest form of the color represented by its hue.Looked at from a different angle, any color in the HSV space can be transformed into a shade of grey if the saturation is low enough.The saturation threshold which determines the transition between low values and highest saturation is the intensity-dependent [6].It has been shown by Sural et al. [6] that for higher values of the intensity, saturation of 0.2 distinguishes domination between hue and intensity.Assuming that the maximum intensity is 255, the function of threshold to determine if a pixel should be represented by its hue or its intensity is given by: 255 (2) Which can lead to a characteristic component of both parties: the values of hue between 0 and 2π quantified after a transformation and a set of quantified intensity values.
Abutaleb [7] introduced another type of histogram 2-D grayscale, monochrome image which differs from the co-occurrence matrix grayscale.It is formed by the Cartesian product of the grayscale classic histogram 1-D and the local average of 1-D grayscale histogram obtained by applying a local window to each pixel in the image and by calculating the average of the gray levels in the window.In fact, the change in the value of pixels in the horizontal or vertical directions appears slow and diagonal direction the continuity of gradation change appears strong.Zhang and Zhang [8] propose to use the minimum gray value in the four-neighbor and the maximum gray value in the vicinity of a window of (3 x 3) exceptions of pixels in the four-neighbor.
On the basis of the above description, we are developing a new approach for image retrieval.In the first step, we use the space color HSV to construct the histogram where each pixel is represented by its hue or its intensity.
On the basis of the threshold function (equation ( 2)), it determines an intermediate image (Fig 1 (b)): for values low saturation, a color can be approximated with a gray value specified by the intensity level, while for higher saturation, the color can be approximated by its hue value.Then, we build each Histogram 2-D by mapping the number of pixels with the minimum and maximum (Min and Max) in the block 3 x 3 image depending on P h (Min, Max) and P v (Min, Max) for the central pixel represented by the component H or V respectively.IV.HISTOGRAM AND HISTOBIN A technique widely used for color is the histogram intersection.With this method, first we must compute the image histogram (histogram of an image can be presented by a vector in which each component is a number of color pixels corresponding to the index).Then a histobin will be created from the histogram as follows: each bin (hole) in the histobin is the sum of a few neighbouring elements of the histogram.The number of neighbours is determined by the number of the bin histobin.Let N the number of bins for each component, the histobin has 3N bins in total.The number of neighbours is 256 / N. One can see that the histobin is more compact than the histogram.In our system we calculate the histobin for color component in HSV space.Having had the histobin image, the distance between two images is the distance between two histobins.This distance can be calcul following formula [9]: Where: Q, I are two images.Q Histo is the Q histobin.I Histo is the I histobin.Q Histo i is the bin i of Q histobin.I Histo i is the bin i of I histobin.D Hist (Q, I) is the distance between two images Q and according to the intersection of histograms.

V. STATISTICAL MOMENTS
To escape the effects of the discretisation of the color space which is intrinsic to the use of histograms, another approach has been used successfully in several image retrieval systems, it is the statistical moments of colors.This approach involves calculating a weighted sum of the average and the variance and the third moment for each color channel, for providing a unique number used to index.
In Stricker et al. [10] the authors showed that the methods of using statistical moments goes faster and give better results than the methods of histogram.
If p ij is the value of the pixel j for channel i (i: HSV), N is the number of pixels in the image, these moments are defined by: A technique widely used for color is the histogram intersection.With this method, first we must compute the image histogram (histogram of an image can be presented by a vector in which each component is a number of color pixels esponding to the index).Then a histobin will be created from the histogram as follows: each bin (hole) in the histobin is the sum of a few neighbouring elements of the histogram.The number of neighbours is determined by the number of the bin t N the number of bins for each component, the histobin has 3N bins in total.The number of neighbours is 256 / N. One can see that the histobin is more compact than the histogram.In our system we calculate the histobin for each .Having had the histobin image, the distance between two images is the distance between two histobins.This distance can be calculated by the (3) (Q, I) is the distance between two images Q and I s.

OMENTS
To escape the effects of the discretisation of the color space which is intrinsic to the use of histograms, another approach has been used successfully in several image retrieval systems, his approach involves calculating a weighted sum of the average and the variance and for each color channel, for providing a ] the authors showed that the methods of using statistical moments goes faster and give better results is the value of the pixel j for channel i (i: HSV), N is the number of pixels in the image, these moments are defined (4) The moment i  of the first order is the average color of the image.The second moment  image.More variance of colors is big, more the picture is contrasted.The moment of the third order amount of light in an image.An image with a positive dissymmetry coefficient tends to appear darker and brighter than a similar image with a lower coefficient of dissymmetry.

A. Calculation of the distance between two different images
The distance between the query image Q and an image I from the database using the statistical moments following equation:

VI. COMBINATION OF FEATUR
Since each distance between features was calculated using a different standard, prior to combining these features, we normalize the distances using a Gaussian [11 ensures that the distance is normalized between 0 and 1.After the normalized distances, we used a linear combination of distances.

VII. ARCHITECTURE
To test and to implement our descriptor for color image retrieval, we develop the following The moment of the third order i S characterizes the amount of light in an image.An image with a positive nds to appear darker and brighter than a similar image with a lower coefficient of dissymmetry.

Calculation of the distance between two different images.
The distance between the query image Q and an image I from the database using the statistical moments is given by the OMBINATION OF FEATURES Since each distance between features was calculated using a different standard, prior to combining these features, we e distances using a Gaussian [11].This method ensures that the distance is normalized between 0 and 1.After the normalized distances, we used a linear combination of EXPERIMENTAL RESULTS In our system and to evaluate the new algorithm, we tested each feature as well as combinations of these features.display the first 16 similar images.The results obtaine several image databases [12] will be presented in the (Fig. 5).IX.CONCLUSION In this work, we developed a new approach of c based color image retrieval using the 2 statistical moments in the HSV color space.overcome limitations of conventional 1 method was applied to different real images to demonstrate the performance of the algorithm of color i results obtained were compared to other obtained by the intersection of the 1-D histograms in the RGB space and HSV, or those obtained by the intersection of the 2-D histograms in the HSV space, or with those obtained by statistical moments in RGB and HSV spaces.From the fi ESULTS In our system and to evaluate the new algorithm, we tested each feature as well as combinations of these features.We The results obtained on presented in the figures we developed a new approach of contentthe 2-D histogram and space.This approach is to overcome limitations of conventional 1-D Histogram.The method was applied to different real images to demonstrate the ance of the algorithm of color image retrieval.The results obtained were compared to other methods, or those D histograms in the RGB space and HSV, or those obtained by the intersection of the D histograms in the HSV space, or with those obtained by statistical moments in RGB and HSV spaces.From the figures, we see that the new method is more efficient than other methods mentioned above.

Fig. 1 :
( a) original image in HSV.(b) Intermediate image.(c) Pixels of the image represented by the hue.(d) Pixels of the image represented by the intensity.Then, we build two histograms color 2-D for intermediate images (Fig 1 (c) and 1(d)) as follows: for each block of pixels 3 x 3 of two intermediate images, we consider the central pixel which can be a component of intensity (Fig 2(a)) or hue component (Fig 2 (c)), according to the equation (2), and calculate the maximum value (Max) and minimum value (Min) in the component matching (H or V) in the original image (Fig 2(b) and 2 (d)).While Max is the maximum hue or intensity in the 3 x 3 block, except four-neighbor pixels and Min is the minimum hue or intensity in the four-neighbor.


Where w Hist2D and w Mom take a value between 0 and 1.This value can be a new program argument.

Fig. 4 :
Fig.4: Process of calculation of our descriptor to implement our descriptor for color image following algorithm step.Process of calculation of our descriptor