• No results found

APPLICATION OF HIERARCHICAL AND K-MEANS TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL

N/A
N/A
Protected

Academic year: 2020

Share "APPLICATION OF HIERARCHICAL AND K-MEANS TECHNIQUES IN CONTENT BASED IMAGE RETRIEVAL"

Copied!
7
0
0

Loading.... (view fulltext now)

Full text

(1)

Murthy V.S.V.S. et al. / International Journal of Engineering Science and Technology Vol. 2(5), 2010, 749-755

APPLICATION OF HIERARCHICAL

AND K-MEANS TECHNIQUES IN

CONTENT BASED IMAGE RETRIEVAL

Murthy V.S.V.S 1* E.Vamsidhar 1 P.Sankara Rao 2 G.Samuel Varaprasad Raju3

1. Department of Information Technology, GIT, GITAM UNIVERSITY ,Visakhapatnam ,India 2. Department of Computer Science and Engineering, GIT,GITAM University, Visakhapatnam,India

3. Associate Professor, Andhra University, Visakhapatnam 530003 India

ABSTRACT

In recent years, there is an enormous growth in the collection of varied image databases in the web. It is difficult for the user to search and retrieve required images from these large collections. Content based Image retrieval emerged as an alternative to automated text based image retrieval systems. It is an approach for retrieving semantically-relevant images from an image database based on automatically-derived image features. Yet because of the gaps between low-level visual descriptions and a user’s expectation, the user may miss an image he may require.

In this paper we present an image retrieval system that takes an image as the input query and groups all the images in the database based on their similarity. This helps the user to keep a faster track of his required images, after which he can opt to retrieve images from the group that would be closest to his visual interpretation. The unique aspect of the system is the utilization of hierarchical and k-means clustering techniques. The proposed procedure consists of two stages. Initially, Hierarchical clustering technique is used for grouping similar images. Then the image groups are applied to the K-Means, so that we can get better favored image results.

Key Words: CBIR, Hierarchical clustering, K-Means clustering

Introduction

In recent years, there is an enormous growth in the collection of varied image databases in the web. While it is perfectly feasible to identify a desired image from a small collection simply by browsing, it is difficult for the user to search and retrieve required images from these large collections. This gives rise to the need of image retrieval systems to provide an effective and efficient access to image databases that contain thousands of items.

There are two general approaches for image retrieval. One is Text-based approach and the other is Content based approach. The text-based approaches apply traditional text retrieval techniques to image annotations or descriptions. In text-based image retrieval systems manually annotated by text-based keywords and when we query by a keyword, instead of looking into the contents of the image, this system matches the query to the keywords present in the database.

Advantages:

i. Faster Execution. ii. Accuracy is high.

Disadvantages:

i. It is not feasible to manually annotate them.

ii. The rich features present in an image cannot be described by keywords completely.

iii. The task of describing image content is highly subjective. The perspective of textual descriptions given by an annotator could be different from the perspective of a user.

(2)

Fig.1 Typical architecture of a Content based Image Retrieval System.

CBIR differs from classical information retrieval in that image databases are essentially unstructured, since digitized images consist purely of arrays of pixel intensities, with no inherent meaning. One of the key issues with any kind of image processing is the need to extract useful information from the raw data (such as recognizing the presence of particular shapes or textures) before any kind of reasoning about the image’s contents is possible. Image databases thus differ fundamentally from text databases, where the raw material (words stored as ASCII character strings) has already been logically structured by the author [2]. CBIR organizes digital image archives according to their visual content. . This system distinguishes the different regions present in an image based on their similarity in color, pattern, texture, shape, etc. Quick retrieval of desired images requires indexing of the content in large-scale databases along with extraction of low-level features based on the content of these images. A brief description of the low level features is as follows:

Color retrieval [3,4]

(3)

Murthy V.S.V.S. et al. / International Journal of Engineering Science and Technology Vol. 2(5), 2010, 749-755

because it is based on human texture representation. The ability to retrieve images on the basis of texture similarity may not seem very useful. But the ability to match on texture similarity can often be useful in distinguishing between areas of images with similar colour (such as sky and sea, or leaves and grass). A variety of techniques has been used for measuring texture similarity; the best-established rely on comparing values of what are known as second-order statistics calculated from query and stored images. Alternative methods of texture analysis for retrieval include the use of Gabor filters and fractals. Texture queries can be formulated in a similar manner to colour queries, by selecting examples of desired textures from a palette, or by supplying an example query image. The system then retrieves images with texture measures most similar in value to the query.

Shape retrieval [3,4]

Shape is an important visual feature for computing image similarity for retrieval. Shape feature alone provides capability to recognize objects and retrieve similar images on the basis of their contents. . A number of features characteristic of object shape (but independent of size or orientation) are computed for every object identified within each stored image. Queries are then answered by computing the same set of features for the query image, and retrieving those stored images whose features most closely match those of the query. Two main types of shape feature are commonly used – global features such as aspect ratio, circularity and moment invariants and

local features such as sets of consecutive boundary.

Present Content based Image retrieval systems utilize Query-By-Example methodology, where users submit a sample query image and the system retrieves and displays closest-matching images of the same kind. Content-based image retrieval area possesses a tremendous potential for exploration and utilization equally for researchers and people in industry due to its promising results. Applications like medicine, entertainment, education, manufacturing, etc. make use of vast amount of visual data in the form of images.

Significant limitation of current CBIR technology is the problem of efficiently retrieving the set of stored images most similar to a given query. Much research in content based retrieval is aimed at improving retrieval performance. Comparatively little effort has been directed towards improving the scalability properties of retrieval methods. Finding index structures which allow efficient searching of an image database is still an unsolved problem.

There are gaps between low-level visual descriptions and a user’s semantic expectation. They are: a) Sensory. The sensory gap is the gap between the object in the world and the information in a (computational) description derived from a recording of that scene. This makes recognition from image content challenging due to limitations in recording.

b) Semantic. The semantic gap is the lack of coincidence between the information that one can extract from the visual data and the interpretation that the same data has for a user in a given situation. This brings in the issue of a user’s interpretations of pictures and how it is inherently difficult for visual content to capture them.

Proposed method

(4)

Figure 2: Block Diagram for proposed Image Retrieval System

A Hierarchical + K-Means Combined Algorithm

Step 1: Input the Image and perform Hierarchical clustering. Step 2: Consider the Every point as its own cluster.

Step 3: Find Most Similar Pairs of Clusters.

Step 4: Merge those two points to one parent cluster.

Step 5: Repeat Step 3 to Step 5 until all points are merged into one cluster.

Step 6: Apply K-means clustering to the required image set obtained from Hierarchical clustering. Step 7: Enter How Many Clusters (Let “k”).

Step8: Randomly Guess K Cluster center Locations. Step 9: Each Data point finds out which center it’s closest to. Step 10: Thus Each Center “Owns” Set of Points.

Step 11: Each Center Finds the Centroid of its Own Points. Step 12: Center now moves to the New Centroid.

Step 13: Repeat Step 9 to Step 12 Until Terminated.

Image Similarity and Measures

Searching large databases of images is a challenging task especially for retrieval by content. Most search engines calculate the similarity between the query image and all the images in the database and rank the images by sorting their similarities. The retrieval time is the sum of two times: Tsim and Tsort. Tsim is the time to calculate the similarity between the query and every image in the database, and Tsort is the time to rank all the images in the database according to their similarity to the query.

(5)

Murthy V.S.V.S. et al. / International Journal of Engineering Science and Technology Vol. 2(5), 2010, 749-755

the similarity between the query and the cluster centers, the time to calculate the similarity between the query and the images in the nearest clusters and the time to rank the images. Therefore the total search time is:

Tcluster = kT1sim + lT1sim + O (llogl)

Here k is the number of clusters; l is the number of images in the clusters nearest to the query. Since k<<n and l<<n, Tcluster << Ttotal [6].

Retrieval accuracy with Clustering

Clustering is a mutually exclusive partitioning process of the feature space of feature vectors in a meaningful way for the application domain context. With the clusters, we may perform nearest neighbor search efficiently. Theunique aspect of this system is the utilization of hierarchical and k-means clustering techniques. Here we are going to filter most of the images in the hierarchical clustering and then apply the clustered images from the hierarchical clustering to K-Means, so that we can get better favored image results. After clustering and selecting the cluster centers, the given query image is first compared with all the cluster centers. The clusters are ranked according to their similarity with the query. Then the query image is compared directly with the images in these clusters. Thus, the number of comparisons is reduced considerably from comparing the query with all the images in the database. The number of similarity comparisons required depends on the sizes of the clusters and the number of clusters being examined [5].

A user instead of searching through a large database is concerned in only clustered image results. Now, we apply clustered images from the hierarchical clustering to the k-means algorithm which takes the input parameter, k, and partitions a set of n objects into k clusters so that the resulting intra-cluster similarity is high. An object is assigned to the cluster to which it is the most similar one. This object assignment is based on the distance between the object and the center it’s closest to. It then computes the new centroid and in this way each center finds the centroid of its own points. This process iterates until the criterion function converges. Thus, the retrieval will be very accurate with the hierarchical and K-Means clustering. It leads to the better performance than by using individual algorithmic methods.

Experimental System Inputting Image Query

In the first module, an image is browsed and selected from the system and given as input to the application. The image can be inputted from anywhere in the system. The cause behind inputting an image is to find the images that are most similar to it from the database.

We can also select the folder than contains the large image databases. It is in these large collections that we search for images similar to our query.

Hierarchical grouping of images

After selecting the image, the search process is performed. This is the process in which the query image is compared with all the images present in the database on the basis of the similarity of their color feature space. The average RGB value of the images is calculated. The RGB value of the query image is compared with each RGB values of the database images. Then Images are hierarchically grouped based on their similarity levels. This results in random groups of images.

K-Means processing

The second module is related to K-Means processing and final image retrieval. The resultant set of image groups are processed in K-Means methodology. In this process, primarily the image groups that are most similar are clustered together. Then the images in the groups are sorted in a descending order based on their similarity values.. In this way the images that are most similar to the query image are found.

Resultant image display

Finally all the images retrieved through K-Means search are displayed.

Test results

(6)

Query image 100% similar image 68.4% similar image 61.5% similar image 24.6% similar image

(7)

Murthy V.S.V.S. et al. / International Journal of Engineering Science and Technology Vol. 2(5), 2010, 749-755

Query image 64.4% similar image 55% similar image 38.8% similar image 20.5% similar image

In another set we took a large data base of 1000 images and a beach.jpg is given as a query it took 6 seconds to process the data.

Search Image Source Destination Similarity

Beach.jpg Beach.jpg Beaches.jpg 100%

Beach.jpg Beach.jpg Tbeach.jpg 99%

Beach.jpg Beach.jpg Shore.jpg 77.9%

Beach.jpg Beach.jpg Msky.jph 76.4%

Beach.jpg Beach.jpg Nature 5.jpg 75.8%

Beach.jpg Beach.jpg Nature 65.jpg 75.4%

Beach.jpg Beach.jpg Nature 5.jpg 69.2%

Beach.jpg Beach.jpg pwaves.jpg 68.9%

Beach.jpg Beach.jpg 218.jpg 68.5%

Beach.jpg Beach.jpg ………. ……….

Beach.jpg Beach.jpg 156.jpg Beach.jpg Beach.jpg Pn56.jpg 30.5%

Beach.jpg Beach.jpg Mt400.jpg 11.2%

Beach.jpg Beach.jpg ……….. ………….

Beach.jpg Beach.jpg 418.jpg 1%

In all the above test cases images are sorted in the descending order of the similarities.

Conclusion and future work

As both hierarchal and k-means clustering techniques are used here the image retrieval was done faster. Here as color was taken as a similarity measuring feature, images are compared based upon their color values and all the results are only based on the color feature. We are able to obtain faster retrieval speed from our system.

Though the accuracy was low it can be further improved by adding more features like texture, shape, ROI etc.

References

[1] Subhankar Biswas ,A system for Content-Based Image Retrieval.

[2] Santini, S and Jain, R C (1997) “The graphical specification of similarity queries” Journal of Visual Languages and Computing 7, 403-421

[3] Sabyasachi Saha and Sandip Sen, Agent Based Framework for Content Based Image Retrieval.

[4] John Eakins, Margaret Graham,” Content-based Image Retrieval”,JISC Technology Application programme.October 19999.

[5] Mohamed Abdel-Mottaleb, Santhana Krishnamachari, Nicholas J. Mankovich, “ Performance Evaluation of Clustering algorithms for scalable image retrieval”, Appeared in IEEE Workshop on Empirical Evaluation of Computer Vision Algorithms, CVPR 1998.

[6] Santhana Krishnamachari,Mohamed Abdel –Mottaleb, Hierarchical clustering algorithm for fast image retrieval, Part of the IS&T/SPIE Conference on Storage and Retrieval for Image and Video Databases VII,San Jose, California, January 1999. Pp427-435.

Figure

Figure 2: Block Diagram for proposed Image Retrieval System

References

Related documents

The former is used for consistency evaluation, data cleaning and invalid data eliminating, while the latter provides fusion results and variable precision fusion expression by

Objective To determine whether ascertainment of childhood obesity by surveillance followed by structured secondary prevention in primary care improved outcomes in overweight or

Fasting plasma citrul- line concentrations were obtained on family members and four out of five were elevated above the normal range for this amino acid. A review of the patients

The garbage monitor system proposed by ShashankShukla[2Jose M.Gutierrez et al [3] in their proposed work understood the smart waste collection monitor system using the

and linguocultural features of proverbs in two languages: English and Uzbek,.. which do not belong to one language

IG: Information Gain; IMDb: Internet movie database; MDSD: multi domain sentiment dataset; ML: machine learning; SMO: Sequential Minimal Optimization; MNB: multi-nominal Naïve

The authors are with the Department of Civil Engineering and Environment, Gadjah Mada University, Indonesia (e-mail: [email protected]). understanding of their behavior for a

Here comes our proposed method: firstly using absolute value of coefficient instead of original value to obtain the distance between the test sample and each class, and then