Skip to Content
  • Article
  • Open Access

30 September 2015

Patterned Fabric Image Retrieval Using Color and Space Features †

,
,
,
and
School of Electronic and Information, Xi'an Polytechnic University, Xi'an 710048, China
*
Author to whom correspondence should be addressed.
†
Project supported by the Scientific Research Program Funded by Natural Science Foundation of China (No. 61301276), Xi’an Polytechnic University Young Scholar Backbone Supporting Plan, Discipline Construction Funds of Xi’an Polytechnic University (No. 107090811), and the Xi’an Polytechnic University Scientific Research Foundation for Doctors (No. BS1416).

Abstract

Image retrieval has been an active research topic in the last decade. As one of the promising approaches, color histogram based image retrieval has been attracted by many researchers. However, it is sensitive to noisy interference and lost any spatial information. To overcome drawbacks, the algorithm combined weighted color histogram with image segmentation is proposed for patterned fabric images in this paper. Firstly, the patterned fabric images are preprocessed using image enhancement. Secondly, color and spatial information features are respectively extracted by weighted color histogram and image segmentation method, which are transformed into feature vectors. Finally, the similarity between objective image and image database is calculated with Euclidean distance. The retrieval results are displayed in decreasing order of similarity. Experimental results, including comparisons with color histogram algorithm and weighted color histogram algorithm, demonstrate the effectiveness of proposal for patterned fabric images.

1. Introduction

There has been a rapid increase in the size of digital patterned fabric images collections in the recent years. A huge amount of information is stored in these images. However, it is unable to be accessed or made use of the information unless it is organize so as to allow efficient browsing, searching and retrieval. There has been a very active research in the area of image retrieval [1,2,3,4] since the 1970s, with the trust from two major research communities, database management and computer vision [5].
In this paper, the algorithm combined weighted color histogram with image segmentation is presented to retrieve patterned fabric images. As is known to all, color histogram method is significant to retrieve images, which is first proposed by Swain and Ballard [6,7]. It has been widely used, especially color feature representation of images. However, two disadvantages are commonly existed in color histogram method, which is respectively noisy interference and lost any spatial information. In order to solve problems, weighted color histogram and image segmentation are adopted. In image segmentation, Markov Random model (MRF) model is chosen to extract spatial information feature, which is proposed by S. Geman and D. Geman in 1984 [10,11]. MRF model could be applied widely, because that spatial information in an image is described and it has a perfect theory effectively. The algorithm of this paper is mainly divided into three parts. Firstly, the patterned fabric images are preprocessed with image enhancement [14], which RGB space are transformed into HSV space to void certain concentrated color features of the space. Secondly, the color features and spatial information features are respectively extracted by weighted color histogram method and MRF model. Then these features are converted feature vectors. Finally, similarity between objective query image and image database is computed by Euclidean distance [16,17] and displayed in decreasing order.
The structure of the following paper is organized as: Section 2 describes image preprocessing, which RGB space is converted HSV space. Section 3 contains feature extraction, including color feature and spatial information feature. Section 4 presents similarity calculation to obtain results of image retrieval. Section 5 discusses the experimental results step by step, comparing the results of proposed algorithm with color histogram algorithm and weighted color histogram algorithm. Final Section 6 is devoted to conclusions.

2. Image Preprocessing

Image enhancement refers that certain feature of the patterned fabric images, including edge, contour and contrast, are emphasized to display, observe or be further analysis and processing. Image enhancement technology [15] is roughly divided into spatial domain and frequency domain. In this paper, spatial domain is adopted, which is that the information of the RGB space is converted into the information of the HSV space, as shown in Eq. (1). Certain features of the RGB space are concentrated, which is disadvantage to extract the color features. However, after converting RGB space into HSV space, the color features could be uniformly distributed to prepare for extracting color features. The results of the patterned fabric image enhancement are viewed by histogram, as shown in Figure 1.
Jfbi 08 00603 i001
where, H, S and V represent hue, saturation and value, respectively. R, G and B show the three primary color of light, including red, green and blue.
Figure 1. The histogram compare of original image and enhancement image, (a) Original patterned fabric image, (b) Disposed patterned fabric image with image enhancement, (c) Original patterned fabric image with histogram, (d) Disposed patterned fabric image with histogram.

3. Feature Extraction

Considerable research is carried out on the basis of color content. The most popular representation of color information is global histogram. Statistically, the color histogram [8,9] denotes the joint probability of intensities of the three-color channels, describing the global color distribution in the image. In general, useful clues are provided by the color histogram for the expression of similarity between images, owing to its robustness to background complication and object distortion. Moreover, it is very simple to realize and systems receiving histograms reveal a fast retrieval response that makes real-time implementation easier.
Obviously, two inherent problems are existed by the color histogram for the task of patterned fabric image indexing and retrieval. The first problem is sensitive to noisy interference such as quantization errors and lighting intensity changes. Because that the coarse distribution of the colors is represented by each histogram bin in an image. Two similar colors will be regarded as identical if they are assigned to the same histogram bin. On the other hand, two colors will be considered totally different provided that they are divided into two different bins even though they might be similar to each other. The second problem is that color histogram does not include any spatial information. Therefore, it is incompetent to support patterned fabric image indexing and retrieval.

3.1. The Weighted Color Histogram

The weighted color histogram could be proposed to solve the first problem. In this paper, the color complexity measure is defined to reflect the local complexity about the image point, by calculating the absolute deviation with Gaussian weighting, and assigning weight value to each color vector using the color complexity measure values, as shown in Eq. (2),
L ( i ,   j ) = ∬ x , y ∈ Ω ( i , j ) G λ ( | |   c ( x ,   y ) -   c ¯ ( i , j )   | | dxdy )
where, Gλ represents the Gaussian weighting function and c ¯ ( i , j ) denotes an average color value within a local mask Ω(i, j) centered at (i, j), as shown in Figure 2 and Eq. (3)
c ¯ ( i , j ) = 1 N ∑ x , y ∈ Ω ( i , j ) c ( x , y )
where, N is the number of points in the local mask Ω(i, j).
Figure 2. The local mask Ω(i, j) centered at (i, j).
After calculating the all color complexity measure values of a patterned fabric image, the weight value is assigned to image point color with Eq. (4).
Jfbi 08 00603 i002
where, I represents the image domain. β (X, α) is the weighting function.
Jfbi 08 00603 i003
where, τ is the normalizing constant. The weighting value is normalized to lie within [0, 1]. The variance α is the variance of the color complexity measure.
Combined with the above results, color histogram method is summarized:
(1)
Calculate the number of patterned fabric image points N(k) in the k −th(k = 1,2,··· ,50) bin
Jfbi 08 00603 i004
where m is the number of the patterned fabric image points Qi (i = 1,2,··· ,m).
(2)
Calculate the weight value of histogram bin
Jfbi 08 00603 i005
where w(k) is the weight value of the k−th histogram bin, wi is the weight value of the patterned fabric image points Qi (i = 1, 2, ··· , m).
(3)
The weighted color histogram of the patterned fabric image points is obtained, as shown in Eq. (8)
Jfbi 08 00603 i006
The weighted color histogram construction of patterned fabric image points is shown in Figure 3.
Figure 3. The color histogram for different patterned fabric images. (a) Different patterned fabric images, (b) The color histogram of different images.

3.2. Image Segmentation

The combination of color histogram and image segmentation method could overcome the second drawback. Image segmentation is defined that a patterned fabric image is represented by a set of significant communication area in physical. In other words, the target and background of patterned fabric image is marked and positioned according to a priori knowledge. Then, the target is separated from the background. In this paper, image segmentation is achieved based on the Markov Random Field (MRF) model [12,13]. MRF model is proposed by S. Geman and D. Geman in 1984. MRF is widely used for reflecting spatial information effectively. Generally speaking, it has three characteristics. The first is that spatial interactions between points could be seamlessly integrated in the process of image segmentation. The second is that a variety of different image features are used based on MRF model. The last is that labeled distribution is obtained by posterior probability.
Patterned fabric image segmentation is mainly three procedures using MRF model. Firstly, patterned fabric images are decomposed by Haar wavelet. Secondly, points in the patterned fabric image are labeled. Finally, minimum energy values are calculated by labeled points. The results of image segmentation are shown in Figure 4.
Figure 4. The color histogram for different patterned fabric images. (a) Different patterned fabric images, (b) The color histogram of different images.
(1)
The patterned images transform into vector images, which are Haar wavelet decomposition. Multi-scale and multi-resolution sub-images are obtained.
(2)
After wavelet decomposition, label field could be L scale, which defined as Ys = {Y(1), Y(2),···, Y(L)}. Use reality of the label field on low resolution scale to be the initial vectors acted as reality of the label field on high resolution scale, which could be defined as
P(Y) = P(Y)P(YL | Y(L+1))
The label field conforms to Markov characteristics and it is defined as
Jfbi 08 00603 i007
where, y(L) is a reality of YL, xij is the neighborhood of (i, j) position at the label field on scale L.
(3)
Calculate minimum energy values. Assuming that features are independent on each scale, feature field is constructed on each scale by the joint probability distribution and Gaussian model, as shown in Eq. (11).
Jfbi 08 00603 i008
where, e ij ( L ) is energy of (i, j) position at the feature field on scale L. y ij ( L ) represents the label at (i, j) position.
Combined with the above contents, the results of image segmentation are obtained, as shown in Eq. (12).
Jfbi 08 00603 i009
where, E e ij ( L ) | y ij ( L ) is energy of the label field on scale L, E y ij ( L ) represents energy of the feature field on scale L.

4. Similarity

To retrieve patterned fabric images, similarity is calculated for matching objective images and FABRIC database images in visual features. Therefore, the definition of a suitable feature similarity method has a great influence on the retrieval results. Color features with weighted color histogram algorithm and spatial information features with image segmentation algorithm are expressed in form of feature vectors respectively. In fact, the similarity measurement methods are commonly used spatial vector model. Each feature vector is seen as a point in space, by calculating the proximity of two points to measure the similarity between the image features. In this paper, Euclidean distance is adopted to calculate the similarity. It is commonly utilized to define a distance, which is true that the distance between two points in the m-dimensional space, as shown in Eq. (13).
Jfbi 08 00603 i010
where, xi is the feature vector with objective retrieval image, yi is the feature vector with any image of FABRIC database images, D(x,y) represents the feature vectors distance of two images, sim(x,y) shows the similarity of two images. The smaller K value is, the closer feature vectors and higher similarity between the two images are, and vice versa.
When integrated features of patterned fabric images are retrieved, corresponding distance measure is different due to different extractive image features. Therefore, similarity distance of sub-features is dealt with normalization to make different sub-features comparable. The overall similarity is summed to weighted similarity of normalized distance, as shown in Eq. (14)
Jfbi 08 00603 i011
where, S is overall similarity. HQuery and Hdatabase are color histogram of query image and database images. yQuery and ydatabase express the image segmentation results of query image and database images. wc, ws are respectively represented the weighted of color similarity and spatial similarity. SC, SS are respectively shown the similarity of color feature and spatial information feature.

5. Experiments

5.1. Experimental Procedure

In this paper, a new weighted color histogram and image segmentation algorithm is proposed to retrieve patterned fabric images effectively, as shown in Figure 5. The methods of feature extraction are summarized as follows.
Figure 5. Block diagram of the proposed method.
(1)
Preprocessing. The patterned fabric images are preprocessed with image enhancement.
(2)
Feature extraction. Color features and spatial information features are extracted by weighted color histogram method and image segmentation method respectively.
(3)
Similarity. The color feature vectors and spatial information feature vectors are obtained, and the similarity between patterned fabric images is computed by Euclidean distance.
Where, the section of feature extraction is concretely shown in Figure 6. With patterned fabric images preprocessed, color features and spatial information features are extracted. Then these features are separately transformed into color feature vectors h(x, y) and spatial information vectors s(x, y). Similarity SC and SS are calculated by using Euclidean distance.
Figure 6. The flow chats of mutual information descriptors extraction.

5.2. Patterned Fabric Image Retrieval Database

The proposed algorithm is tested with FABRIC Database contains 1000 printed images. The images are divided into 7 categories based on their content namely Flower, Paisley, Stripe, Leaf, Geometry, Spot and Reticulation. Flower with JPEG format which used in a general purpose image database for experimentation. These images are stored with size 256×256 and each image is represented with RGB color space. Sample of FABIC image database is shown in Figure 7. Precision and recall values are calculated to measure retrieval effectiveness for an image retrieval system. Recall [18] measures the ability of the system to retrieve all models that are relevant, which is the ratio of retrieved relevant images to the total number of relevant retrieved images to the total number of relevant images in the FABIC database. Precision measures the ability of the system to retrieve only models that are relevant, which used the ratio of relevant retrieved images to the total number of relevant retrieved images to the total number of retrieved images. On the assumption that A is the total number of relevant retrieved images and B is the total number of relevant images and C is the total number of retrieved images, recall and precision are represented by Eq. (15).
Jfbi 08 00603 i012
Figure 7. Sample of FABRIC image database.

5.3. Experimental Results

In order to choose the suitable weighting values in integrations with color and spatial feature, 300 images are selected as query images from the above image database, and tested the image retrieval accuracies for different weight values. Figure 8 (a) shows the mean of retrieval precision of 300 times query results for different weight values, which reflects the image retrieval accuracy. Figure 8 (b) represents the mean of retrieval recall of 300 times query results for different weight values, which reflects the robustness of image retrieval. From Figure 8, the optimal weight values SC and SS is obtained.
Figure 8. The mean of retrieval precision and recall of 300 times query results for different weight values.
In order to verify the feasibility of the proposed algorithm, the image (flower) of FABRIC database is treated as a sample. Then color histogram algorithm and weighted color histogram algorithm are compared with proposed algorithm. The results are shown in Figure 9.
Figure 9. The image (flower) retrieval results using three algorithms. (A) Query image: Flower, (B) (a) The result of flower retrieved image with color histogram algorithm, (B) (b) The result of flower retrieved image with weighted color histogram algorithm, (B) (c) The result of flower retrieved image with proposed algorithm.
According to Figure 9, image retrieval by the proposed method is competitive with the other methods. The effectiveness of the proposed image retrieval results from using the weighted color histogram and image segmentation. As previously mentioned, recall and precision is presented to further validate the accuracy of the algorithms, as shown in Figure 10 (a) and Figure 10 (b). In Table 1, the average precision and recall of weighted color histogram algorithm to retrieve patterned fabric images, is higher than color histogram algorithm and less than proposed algorithm. The results of experiment show that proposed algorithm is accurately and effectively.
Figure 10. Compare of the average precision and recall of three algorithms.
Table 1. Average precision and recall of three algorithms.

6. Conclusion

The proposed application performs weighted color histogram and image segmentation in FABRIC database for an objective query image. The drawbacks are overcome by proposed algorithm, which not only is sensitive to noisy interference such as quantization errors and lighting intensity changes, but also the less of any spatial information. Color features based on weighted color histogram and spatial information features based on MRF model are extracted for each image in the entire database. Most similar images are retrieved based on Euclidian distance. The retrieved patterned fabric images are displayed in decreasing order of similarity. Color histogram algorithm and weighted color histogram algorithm are compared with proposed algorithm by average recall and precision. It could be concluded that the performance of the proposed image retrieval will be effective and accurate for patterned fabric images when applied in a real world scenario.

References

  1. Madhavi, K. V.; Tamilkodi, R.; Dinakar, R. B.; JayaSudha, K. An innovative technique for content based image retrieval using color and texture features. Int. J. Innov. Res. Comput. Commun. Eng. 2013, 1(5), 1257–1263. [Google Scholar]
  2. Jain, S. A machine learning approach: SVM for image classification in CBIR. Int. J. Appl. Or Innov. Eng. Manag. (IJAIEM) 2013, 2(4). [Google Scholar]
  3. Shanmugapriya, N.; Nallusamy, R. A new content based image retrieval system using GMM and relevance feedback. J. Comput. Sci. 2014, 10(2), 330–340. [Google Scholar] [CrossRef] [Scilit]
  4. Prabhu, J.; Kumar, J. S. Wavelet based content based image retrieval using color and texture feature extraction by gray level concurrence matrix and color concurrence matrix. J. Comput. Sci. 2014, 10(1), 15–22. [Google Scholar] [CrossRef] [Scilit]
  5. Sreedhar, J.; Raju, S. V.; Babu, A. V. Query processing for content based image retrieval. Int. J. Soft Comput. Eng. 2011, 1(5), 122–131. [Google Scholar]
  6. Han, J. H.; Yang, S. J.; Lee, B. U. A novel 3-D color histogram equalization method with uniform 1-D gray scale histogram. IEEE Trans. Image Process. 2010, 20(2), 506–512. [Google Scholar] [CrossRef] [Scilit]
  7. Zhang, Y. D.; Wang, S. H.; Phillips, P. Fruit classification using computer vision and feedforward neural network. J. Food Eng. 2014, 143, 167–177. [Google Scholar] [CrossRef] [Scilit]
  8. Li; Xin, M.; Su; Ling, G.; Zhang, Y.; Li, C. Multi-feature fusion based on particle filter algorithm for moving target tracking. Sens. Transducers 2014, 178(9), 226–232. [Google Scholar]
  9. Han, J. H.; Yang, S. J.; Lee, B. U. A novel 3-D color histogram equalization method with uniform 1-D gray scale histogram. IEEE Trans. Image Process. 2010, 20(2), 506–512. [Google Scholar] [CrossRef] [Scilit]
  10. Mignotte, Max. A non-stationary MRF model for image segmentation from a soft boundary map. Pattern Anal. Appl. 2014, 17(1), 129–139. [Google Scholar] [CrossRef] [Scilit]
  11. Shekhovtsov; Kovtun, I.; Hlavac, V. Efficient MRF deformation model for non-rigid image matching. Comput. Vis. Image Underst. 112(2008), 91–99. [Google Scholar] [CrossRef] [Scilit]
  12. Cheng; Wang, Y.; Zheng, N. N.; Jia, X. C.; Bian, Z. Z. MRF model and Frame model-based unsupervised image segmentation. Sci. China Ser. F Inf. Sci. 2004, 47, 697705. [Google Scholar] [CrossRef] [Scilit]
  13. ¨oztimur Karada˘g, ¨ozge; Fatos, T.; Vural, Yarman. Image segmentation by fusion of low level and domain specific information via Markov random fields. Pattern Recognit. Lett. 2014, 46(1), 75–82. [Google Scholar] [CrossRef] [Scilit]
  14. Cho, Dongwook; Bui, Tien D. Fast image enhancement in compressed wavelet domain. Signal Process. 62(2014), 86–93. [Google Scholar] [CrossRef] [Scilit]
  15. Zhao, J. F.; Chen, Y. T.; Feng, H. J.; Xu, Z. H.; Li, Q. Infrared image enhancement through saliency feature analysis based on multi-scale decomposition. Infrared Phys. Technol. 2014, 62, 89–92. [Google Scholar] [CrossRef] [Scilit]
  16. Qi, H. D.; Yuan, X. M. Computing the nearest Euclidean distance matrix with low embedding dimensions. Math. Program. 2014, 147(1-2), 351–389. [Google Scholar] [CrossRef] [Scilit]
  17. Liu, H. C.; Liu, L.; Li, P. Failure mode and effects analysis using intuitionistic fuzzy hybrid weighted Euclidean distance operator. Int. J. Syst. Sci. 2014, 45(10), 2012–2030. [Google Scholar] [CrossRef] [Scilit]
  18. Kumar, Sameer. A knowledge based reliability engineering approach to manage product safety and recalls. Expert Syst. With Appl. 2014, 41(11), 5323–5339. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.