Image Content Based Retrieval System using Cosine Similarity for Skin Disease Images

A content based image retrieval system (CBIR) is proposed to assist the dermatologist for diagnosis of skin diseases. First, after collecting the various skin disease images and their text information (disease name, symptoms and cure etc), a test database (for query image) and a train database of 460 images approximately (for image matching) are prepared. Second, features are extracted by calculating the descriptive statistics. Third, similarity matching using cosine similarity and Euclidian distance based on the extracted features is discussed. Fourth, for better results first four images are selected during indexing and their related text information is shown in the text file. Last, the results shown are compared according to doctor’s description and according to image content in terms of precision and recall and also in terms of a self developed scoring system. Keyword: Cosine similarity, Euclidian distance, Precision, Recall, Query image. 1. Basic introduction to cbir 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. An example may make this clear. Many police forces now use automatic face recognition systems. Such systems may be used in one of two ways. Firstly, the image in front of the camera may be compared with a single individual’s database record to verify his or her identity. In this case, only two images are matched, a process few observers would call CBIR[15]. Secondly, the entire database may be searched to find the most closely matching images. This is a genuine example of CBIR. 2. Structure of CBIR model Basic modules and their brief discussion of a CBIR modal is described in the following Figure 1.Content based image retrieval system consists of following modules: Feature Extraction: In this module the features of interest are calculated for image database. Fig.1 Modules of CBIR modal  Feature extraction of query image: This module calculates the feature of the query image. Query image can be a part of image database or it may not be a part of image database. Similarity measure: This module compares the feature database of the existing images with the query image on basis of the similarity measure of the interest[2]. Image Database Feature database Feature Extraction Results images Query image Indexing Similarity measure Feature extraction of query image ACSIJ Advances in Computer Science: an International Journal, Vol. 2, Issue 4, No.5 , September 2013 ISSN : 2322-5157 www.ACSIJ.org 89 Copyright (c) 2013 Advances in Computer Science: an International Journal. All Rights Reserved. Indexing: This module performs filtering of images based on their content would provide better indexing and return more accurate results. Retrieval and Result: This module will display the matching images to the user based on indexing of similarity measure. Basic Components of the CBIR system are: Image Database: Database which stores images. It can be normal drive storage or database storage. Feature database: The entire extracted feature are stored in database like mat file, excel sheets etc. 3. Scope of CBIR for skin disease images Skin diseases are well known to be a large family. The identification of a certain skin disease is a complex and demanding task for dermatologist. A computer aided system can reduce the work load of the dermatologists, especially when the image database is immense. However, most contemporary work on computer aided analysis skin disease focuses on the detection of malignant melanoma. Thus, the features they used are very limited. The goal of our work is to build a retrieval algorithm for the more general diagnosis of various types of skin diseases. It can be very complex to define the features that can best distinguish between classes and yet be consistent within the same class of skin disease. Image and related Text Database is collected from a demonologist’s websites [17, 18]. There are mainly two kinds of methods for the application of a computer assistant. One is text query. A universally accepted and comprehensive dermatological terminology is created, and then example images are located and viewed using dermatological diagnostic concepts using a partial or complete word search. But the use of only descriptive annotation is too coarse and it is easy to make different types of disease fall into same category. The other method is to use visual features derived from color images of the diseased skin. The ability to perform reliable and consistent clinical research in dermatology hinges not only on the ability to accurately describe and codify diagnostic information, but also complex visual data. Visual patterns and images are at the core of dermatology education, research and practice. Visual features are broadly used in melanoma research, skin classification and segmentation. But there is a lack of tools using content-based skin image retrieval. 4. Problem formulation However, with the emergence of massive image databases, the traditional manual and text based search suffers from the following limitations:  Manual annotations require too much time and are expensive to implement. As the number of images in a database grows, the difficulty in finding desired images increases. It is not feasible to manually annotate all attributes of the image content for large number of images.  Manual annotations fail to deal with the discrepancy of subjective perception. The phrase, “an image says more than a thousand words,” implies a Content-Based Approach to Medical Image Database Retrieval that the textual description is not sufficient for depicting subjective perception. Typically, a medical image usually contains several objects, which convey specific information. Nevertheless, different interpretations for a pathological area can be made by different radiologists. To capture all knowledge, concepts, thoughts, and feelings for the content of any images is almost impossible. 5. Methodology of work 5.1General approach The general approach of image retrieval systems is based on query by image content. Figure 2 illustrate an overview of the image retrieval modal of skin disease images of proposed work. Fig.2 Overview of the Image query based skin disease image retrieval process FIRST FOUR RESULT IMAGES AND CORRESPONDI NG TEXT INFORMATION SKIN DISEASE IMAGE RETRIVAL SYSTEM IMAGE PRE PROCESSING RELATED SKIN DISEASE IMAGES (TRAIN DATABASE) AND TEXT INFO QUERY IMAGE FROM TEST DATABASE FEEDBACK FROM USER TEST DATABASE TEXT DATABASE TRAIN DATABASE ACSIJ Advances in Computer Science: an International Journal, Vol. 2, Issue 4, No.5 , September 2013 ISSN : 2322-5157 www.ACSIJ.org 90 Copyright (c) 2013 Advances in Computer Science: an International Journal. All Rights Reserved. 5.2 Database details : Our train database contains total 460 images (approximately) which are divided into twenty eight classes of skin disease, collected from reputed websites of medical images [17,18]. Test database contains images which are selected as query image. In the present work size of train database and test database is same. All the images are in .JPEG format. Images pixel dimension is set 300X300 by preprocessing. The illumination condition was also unknown for each image. Also, the images were collected with various backgrounds. Text database corresponding to each image contains skin disease name, symptoms, cure, and description of the disease. 5.3 Use Of Descriptive Statistics Parameters for Feature Extraction Statistical texture measures are calculated directly from the original image values, like mean, standard deviation, variance, kurtosis and Skewness [13], which do not consider pixel neighborhood relationships. Statistical measure of randomness that can be used to characterize the texture of the input image. Standard deviation is pixel value analysis feature [11]. First order statistics of the gray level allocation for each image matrix I(x, y) were examined through five commonly used metrics, namely, mean, variance, standard deviation, skewness and kurtosis as descriptive measurements of the overall gray level distribution of an image. Descriptive statistics refers to properties of distributions, such as location, dispersion, and shape [15]. 5.3.1 Location Measure: Location statistics describe where the data is located. Mean : For calculating the mean of element of vector x. ( ) = ( )/ if x is a matrix , compute the mean of each column and return them into a row vector[16]. 5.3.2 Dispersion Measures: Dispersion statistics summarize the scatter or spread of the data. Most of these functions describe deviation from a particular location. For instance, variance is a measure of deviation from the mean, and standard deviation is just the square root of the variance. Variance : For calculating the variance of element of vector x. ( ) = 1/(( − 1) _ ( ) − ( )^2) If x is a matrix , compute the variance of each column and return them into a row vector [16]. Standard Deviation: For calculating the Standard Deviation of element of vector x. ( ) = (1/( − 1) _ ( ( ) − ( ))^2) If x is a matrix , compute the Standard Deviation of each column and return them into a row vector[16]. 5.3.3 Shape Measures: For getting some information about the shape of a distribution using shape statistics. Skewness describes the amount of asymmetry. Kurtosis measures the concentration of data around the peak and in the tails versus the concentration in the flanks. Skewness: For calculating the skewness of element of vector x. ( ) = 1/ ( ) ^ (−3) (( − ( ). ^3) If x is a matrix, return the skewness along the first nonsingleton dimension of the matrix [