Content Based Image Categorization using Support Vector Machine

DOI : 10.17577/IJERTV4IS010365

Download Full-Text PDF Cite this Publication

Text Only Version

Content Based Image Categorization using Support Vector Machine

Apeksha V Chaudhari

P.G. Student

Dept. of Elect. and Telecomm.

J.T.M.C.O.E,

Faizpur, India

K. S. Bhagat Asst.Professor

Dept.of Elect. and Telecomm.

            1. .,

              Faizpur,India

              Dr. P. M. Mahajan Asso. Professor

              Dept. of Elect. and Telecomm.

              J.T.M.C.O.E,

              Faizpur,India

              Abstract Now a days a category of different image is needed for the proper retrieval of user due to increasing rate of multimedia data, remote sensing and web photo gallery. Image categorization or classification is nothing but categorizing images based on most prominent features extracted from the image to the query image. Content based image retrieval (CBIR) system aims to get perfect and fast result. Image categorization is vital field of research in computer vision .An important role is played by contents of image such as color, texture, shape and size in semantic image classification. But the proper selection of feature are challenging task of classification. So many different approaches are applied by various researchers such as clustering, segmentation decision tree , RBF network, Markova model and some machine learning approaches like support vector machine(SVM) for image categorization. Traditional classification approaches deal poorly on content based image classification tasks being one of the reasons of high dimensionality of the feature space. We propose a novel approach for content based image categorization using SVM. Using SVM we attempt to construct a mapping between the low level and the semantically level in order to determine which category an image belongs to. SVM is used to find out the optimal result. It also evaluates the generalization ability under the limited training samples. It gives faster result as compared to other.

              Keywords Image categorization, Decision tree, RBF network, Markova model, Machine Learning, Support Vector Machine.

              1. INTRODUCTION

                Large collections of images are becoming available to the public, from photo collection to web pages, or even video databases. Since visual media requires large amounts of memory and computing power for processing and storage, there is a need to efficiently index and retrieve visual information from image database. Image categorization is an important step for efficiently handling large image databases and enables the implementation of efficient retrieval algorithm. Image categorization aims to find a description that best describe the images in one class and distinguish these images from all the other classes [1].

                Efficient indexing and retrieval of large number of color images, classification plays an important and challenging role. The main focus of this research work is devoted to finding suitable representation for images and classification generally requires comparison of images depending on the certain useful features .Image categorization is the process

                of grouping of similar types of image into a single unit i.e. called cluster of image. So the categorization is a very exciting task to find exact result. To improve the result of classification, extract the related feature of image, because of this we also get good accuracy [2].

                SVM was first proposed by Vapnik and is gaining popularity in field of machine learning due to many attractive features and to show practical performance [3]. It gives higher better performance in classification of image than other data classification algorithm. It is mainly used in real world problem like voice recognition, tone recognition, text categories, image classification, object detection, handwritten digital recognition, and data classification [3]. In this paper we present image categorization technique based on color , texture feature of image. Color, shape texture features are most prominent to compare image automatically. Color histogram ,color moments, color correlograms are used to represent color feature. Entropy

                ,energy, contrast, homogeneity are extracted from Gray level co-occurrence matrix (GLCM) for texture feature. Here the combination of color and texture is also used to evaluate the system performance. Support Vector Machine used to find out optimal result of all the feature of image. It improves efficiency as well as accuracy of all the process of CBIR.

              2. LITERATURE SURVEY

                S Agrawal et al. in Indian Institute of Technology Kanpur, India at 2011.They work on Content Based Color Image Classification using SVM.They implement classification of image using SVM classifier on color features extracted by using histogram. They use optimal hyper planes technique thorough support vector machine. Better efficiency, and insensitivity to small changes in camera view-point i.e. translation and rotation are the benefits of using color image histograms [4]. O Chapelle et al. proposed a method using SVM for Histogram based image classification which shows that support vector machines (SVMs) can generalize well on difficult image classification problems where the only features are high dimensional histograms. It is shown that it is possible to push the classification performance obtained on image histograms to surprisingly high levels with error rates as low as 11% for the classification of 14 Corel categories and 16% for a more generic set of objects [5].

                V. Karpagam et al. carried out work on Improved content- based classification and retrieval of images using support vector machine and proposed method in which the RGB image is converted to an indexed image with low level of color detail. The color map of only one image of the whole dataset is stored separately to decompose the remaining images of the dataset. A color approximation method is used to do the color mapping and the images will be almost in their original color[6] P W Pawade et al. proposed a novel texture classification algorithm using Grey Level Co- occurrence Probabilities method is being used to extract features from texture image and support vector machines . Grey Level Co-occurrence Probabilities statistics are used to preserve the spatial characteristics of a texture. This method produces promising classification results for both single and multiple class texture analysis problems. In the study, a combined GLCP with SVM post-processing showed a marked improvement over other classifier in terms of classification accuracy.[7]

                X-Q Shang et al. in China in 2003. They carried out work on content based texture image classification. A new method for content based texture image classification is proposed using support vector machine of the image, which combines the characteristics of Brushlet and Wavelet transform[8].In his work, Haralick et al. suggested the use of Gray-tone Spatial-dependence matrices also called Gray- level co-occurrence matrices(GLCM) to extract texture features from an image. Since then, GLCMs became widely used for image texture features extraction in many types of applications [9].

              3. IMAGE FEATURES AND DESCRIPTORS

A number of image features based on color and texture attributes have been reported in literature. Although quantifying their discrimination ability to classification problem has not been so easy. Among the many possible features for classification purpose, extracted from an image, we restrict our self to ones which are global and low level features. The simplest way to represent an image is to consider its bitmap representation.[4]

    1. Color Feature

      Color is one of the most important features in CBIR. It i most widely used for both human perception & computer vision [10]. In color feature extraction mainly image histogram value calculated. Currently RGB i.e. Red, Green, Blue color model is used in digital image because it is more convenient for displaying image in CRT. But it does not give good result in CBIR so we use HSV which is mostly used in CBIR system. In this, Hue represents different colors, saturation represents percentage of white color and Value represents light intensity. Advantages of HSV are suitable with human perception [11].

      1. Extraction of Color Feature

        For extraction of color feature following descriptors are used

        1. 1.1.1 Color histogram

          The color histogram is easy to compute and effective in characterizing both the global and local distribution of color in an image. In addition, it is robust to translation and rotation about the view axis and changes only slowly with the scale, occlusion and viewing angle. Since any pixel in the image can be described by three components in a certain color space, a histogram, i.e., the distribution of the number of pixels for each quantized bin, can be defined for each component. Clearly, the more bins a color histogram contains, the more discrimination power it has. However, a histogram with a large number of bins will not only increase the computational cost, but will also be inappropriate for building efficient indexes for image databases.[12]

          1. Color Moments

            Color moments are measures that can be used to differentiate images based on their features of color. Once calculated, these moments provide a measurement for color similarity between images. These values of similarity can then be compared to the values of images indexed in a database for tasks like image retrieval. Stricker and Orengo

            [13] use three central moments of a image's color distribution. They are Mean, Standard deviation and Skewness. Here we will restrict ourselves to the HSV scheme of Hue, Saturation and brightness, although alternative encoding could just as easily be used. Moments are calculated for each of these channels in an image. An image therefore is characterized by 9moments- 3 moments for each 3 color channels.

            Mean can be understood as the average color value in the image.The standard deviation is the square root of the variance of the distribution.Skewness can be understood as a measure of the degree of asymmetry in the distribution.

          2. Color autocorrelogram

            Color correlogram are the feature of color information. The color correlogram has the advantages that includes the spatial correlation of colors, can be used to describe the global distribution of local spatial correlation of colors and is simple to compute. [14]

    2. Texture Feature

      Texture is another important property of images. Texture is a powerful regional descriptor that helps in the retrieval process. Texture has been one of the most important characteristic which has been used to classify and recognize objects and have been used in finding similarities between images in multimedia databases. Texture features typically consist of contrast, uniformity, coarseness, and density. Importance of the texture feature is due to its presence in many real world images: for example, clouds, trees, bricks, hair, fabric etc., all of which have textural characteristics. Basically, texture representation methods can be classified into two categories: structural; and statistical. Statistical methods, including Fourier power spectra, co-occurrence matrices, shift-invariant principal component analysis (SPCA), Tamura features, World

      decomposition, Markov random field, fractal model, and multi-resolution filtering techniques such as Gabor and wavelet transform, characterize texture by the statistical distribution of the image intensity.

      Texture is an efficient measure to estimate the structural, orientation, roughness, smoothness, or regularity differences of diverse regions in an image scene. Characterizing a real-world view or an image into different texture classes is often a trivial task for the human visual system but is one of the most challenging problems in the field of computer vision and image processing. Accurate results have been achieved traditionally through various schemes but only working under certain assumptions or limitations.

      1. Extraction of Texture of an Image

Most natural surfaces exhibit texture, which is an important low level visual feature. Texture recognition will therefore be a natural part of many computer vision systems. In this paper, we propose a texture representation method for image classification based on GLCM. Gray level co- occurrence method use grey-level co-occurrence matrix to sample statistically the way certain grey-levels occur in relation to other grey-levels. GLCM expresses the texture feature according to the correlation of the couple pixels gray-level value at different positions. Gray-level matrix is a matrix whose elements measure the relative frequencies of occurrence of grey level combinations among pairs of pixels with a specified spatial relationship. At first the co- occurrence matrix is constructed, based on the orientation and distance between image pixels. Then meaningful statistics can be extracted from the matrix as the texture representation. The texture features such as entropy, energy, contrast, and homogeneity, can be extracted from the co-occurrence matrix of gray levels of an image. The energy of a texture describes the uniformity of a texture. In a homogeneous image there are very few dominant grey- tone transitions, hence the co-occurrence matrix of this image will have fewer entries of large magnitude. So the energy of an image is high when the image is homogeneous. The second descriptor, entropy, measures the randomness of the elements of the matrix, when all elements of the matrix are maximally random entropy has its highest value. So, a homogeneous image has lower entropy than an inhomogeneous image. In fact, when energy gets higher, entropy should get lower. Third, the correlation feature measures the correlation between the elements of the matrix. When correlation is high the image will be more complex than when correlation is low. The fourth feature, the inverse difference moment, has a relatively high value when the high values of the matrix are near the main diagonal [15,16,17].

  1. SUPPORT VECTOR MACHINE (SVM)

SVM is a supervised learning process in machine learning. The main purpose of SVM is to build optimal separating hyper planes [18]. It accepts data and identifies patterns which are used for classification and regression analysis [19]. It takes a set of input data and produces an inferred function called classifier (if input is discrete) or regression

(if output is continuous) [20]. The main aim is to draw hyper plan as wide as possible for a good separation that means largest distance to nearest training data of pixel values [21]. The distance between two hyper planes is the margin of the hyper planes with respect to the sample. The purpose of SVMs is to maximize this distance [22].If distance of pixels to hyper plan is large than generalization error of classifier is low [19].

SVMs method consists of the following phases:

  1. Mapping input data to high-dimensional feature space.

  2. Selecting a kernel and computes the hyper planes.

  3. To maximize the distance from the closest points, this is called the margin.

  4. To detect the outer boundaries.

    Its performance was auspicious because it reduces prediction error and complexity at the same time. [18][23]

    Figure:1 Linear separating hyper planes for two class separation

  5. PROPOSED METHOD

Figure.2 Block Diagram of proposed System

The proposed system can be divided into 3 parts 1.Feature Extraction

  1. Classification

  2. Output

      1. Feature extraction

        Feature extraction involves extracting the meaningful information from the images. So that it reduces the storage required and hence the system becomes faster and effective in CBIR. Once the features are extracted, they are stored in the database for future use. The degree to which a computer can extract meaningful information from the image is the most powerful key to the advancement of intelligent image interpreting systems. One of the biggest advantages of feature extraction is that, it significantly

        reduces the information to represent an image for understanding the content of that image. . The low-level feature used for content description are color and texture.

      2. Feature Vector Database

        The Images and its specified feature values can stored in a database file. We have saved the hsv histogram,color moments, color autocorrelogram , GLCM ,energy, entropy,homogeneity, correlation, wavelet moments etc as a feature vector in the database.. This .mat file is a trained database file in which we store images and its specified values. First the database files are loaded for further processing.

      3. Classifier

        In the proposed system Support Vector Machine is used as classifier

      4. Similarity Measure

        To find the similarities between query image and the images in the database , distance between two images is used. The proposed method used the Euclidean distance(L2) and Manhattan distance(L1) between the two feature vectors of the images. The Euclidean distance can be calculated by the following formula:

        (1)

        The Manhattan distance can be calculated by the following formula:

        (2)

        Where, P = (p1, p2pn) Q = (q1, q2qn) P,Q are two points in n dimensional space.

      5. Database

        For this work around 500 images from 5 classes have been used for populating the database. These images are from simplicity database in which there are 1000 images included in 10 different categories .The SIMPLIcity database is a subset of the COREL database, formed by 10 image categories, each containing 100 pictures. The images are of size 384 x 256 or 256 x 384. As the focus of information from the content of an image for most research is on image database it is categorized into different categories as Africa ,Beaches, Monuments(Landscape and buildings),Buses, Dinosaurs, Horses

        ,Elephants, Flowers, Scenery, Food [21].The images in Database are all in RGB color space.

      6. Classification Result

    Classification result will give us the class of the query image and also show number of images belonging to the query class.

    1. FLOW OF IMAGE CATEGORIZATION

      The flow of Image Categorization can e explained as below:

        1. Flow for categorization based on color

          • Step1: Query image is taken

          • Step2: Converted from RGB to HSV

          • Step3: HSV histogram, color moments, color correlogram are calculated and feature vector is created

          • Step4 : The SVM is trained with training feature sequences

          • Step5 : The test sequence is applied and class of the query image is labeled

          • Step6 : The nearest matching images to the query image within that class are found using Manhattan distance and Euclidean distance

          • Step7: Matching images are stored in result folder & also display them along with their class name

        2. Flow for categorization based on Texture

          • Step1: Query image is taken

          • Step2: Converted from RGB to Grey

          • Step3: Grey-level co-occurrence matrix is found and Entropy, Energy, Contrast , Homogeneity for images are calculated and the feature vector is created

          • Step4: The SVM is trained with training feature sequences

          • Step 5: The test sequence is applied and class of the query image is labeled

          • Step 6: The nearest matching images to the query image within that class are found using Manhattan distance and Euclidean distance

          • Step7: Matching images are stored in result folder and are displayed along with their class name

        3. Flow for categorization based on Color + Texture

          • Step1: Query image is taken

          • Step2: Converted from RGB to HSV

          • Step3: HSV histogram, color moments, color correlogram are calculated

          • Step4: Converted from RGB to Grey

          • Step5: Grey-level co-occurrence matrix is found and Entropy, Energy, Contrast , Homogeneity for images are calculated and the feature vector is created by combining with color features

          • Step6 : The SVM is trained with training feature sequences

          • Step 7 : The test sequence is applied and class of the query image is labeled

          • Step 8 : The nearest matching images to the query image within that class are found using Manhattan distance and Euclidean distance

          • Step 9: Matching images are stored in result folder and are displayed along with their class name

    2. RESULTS and DISCUSSION

      Color and texture algorithms are implemented in Matlab on database . Here three well known parameters are used to evaluate the performance of the image classification algorithm accuracy, precision and recall.

      Accuracy = (sum of correctly classified pixels) / Total no. of pixels

      Precision = tp / (tp + fp) Recall = tp / (tp + fn)

      Where tp, fp and fn are true positive, false positive predictions respectively. Confusion matrix is used to calculate above three parameters. The average overall accuracy, average precision and average recall parameters are calculated for 10 images from each of the 5 categories. The results obtained using color and texture feature for different category of images using Manhattan distance(L1) and Euclidean distance (L2) is shown in graphical format in figure 3a-c. Classification result images with query image based on texture and color with Euclidean distance (L2) are shown in Table 1a-e.

      (a)

      (b)

      (c)

      Figure 3. Graphical representation of a) Accuracy b) Precision c) Recall

      1. CONCLUSIONS

        In this proposed work, we have used content based image classification system to overcome the problem of textual approach using visual features of an image. We have extracted features such as color, texture, and histogram value of an image using feature extraction method. In this proposed work we have used SVM as a classifier for classification of various categories of image. Accuracy of the classifier using texture feature seems to be better as compared to that using color. Also the accuracy value is better for combination of color and texture as compared to color feature only. The precision and recall values for the color feature are again poor as compared to texture and combination of color and texture.

        Table 1.a Output Images for Africa class

        Query Image

        Using Texture feature

        Using Color feature

        Using Color +

        Texture feature

        Table 1.b Output Images for Beaches class

        Query Image

        Using Texture feature

        Using Color feature

        Using Color + Texture feature

        Table 1.c output Images for Monument class

        Query Image

        Using Texture feature

        Using Color feature

        Using Coor + Texture

        feature

        Table 1.d Output Images for Buses class

        Query Image

        Using Texture

        feature

        Using Color

        feature

        Using Color +

        Texture feature

        Table 1.e Output Images for Dinosaures class

        Query Image

        Using Texture feature

        Using Color feature

        Using Color + Texture

        feature

      2. REFERENCES

  1. J. Zhang , W. Hsu ,M. Lee , An Information-driven Framework for Image Mining , In Proc. of 12th International Conference on Database and Expert Systems Applications , Munich , Germany , 2001.

  2. J Umamaheswari and Dr.G.Radhamani, Quadratic Program Optimization using Support Vector Machine for CT Brain Image Classification, IJCSI International Journal of Computer Science Issues, Vol. 9, Issue 4, No 1, July 2012.

  3. D K. Srivastava and L Bhambhu, Data Classification Using Support Vector Machine, Journal of Theoretical and Applied Information Technology, 2005 – 2009 .

  4. S Agrawal ,N K Verma , P Tamrakar and P Sircar , Content Based Color Image Classification using SVM , Eighth International Conference on Information Technology: New Generations2011

  5. O Chapelle, P Haffner, and V N. Vapnik, Support Vector Machines forHistogram-Based Image Classification ,IEEE Transactions on neural networks, Vol. 10, No. 5, September 1999

  6. V. Karpagam, R. Rangarajan Improved content-based classification and retrieval of images using support vector machine Current Science, Vol. 105, No. 9, 10 November 2013

  7. Ms. P W. ,Pawade Mr. S. R. Suralkar ,Mr .A.H. Karode Texture Image Classification Using Support Vector Machine International Journal of computer Tech. Appl, Vol 3 (1), 71-75 Jan-Feb 2012

  8. X-Q Shang, G-Xiang Song, B Hou Content based texture image classification IEEE, Proceedings of the Second international conference on machine learning and cybernetics, Xian, november2003.

  9. R. M. Haralick, K. Shanmugam, and I. Dinstein, Textural features for image classification," IEEE Transactions on In Systems, Man and Cybernetics, Vol. 3, pp. 610-621, December 1973.

  10. SHI Dongcheng, XU Lan, H Ungyan, Image retrieval using both color and texture features, The Journal Of China Universities Of Posts and Telecommunications, October 2007.

  11. G Duan, J Yang, Y Yang, Content-Based Image Retrieval Research, International Conference on Physics Science and Technology. 2011.

  12. S Sergyán , Color Content-based Image Classification 5th Slovakian-Hungarian Joint Symposium on Applied Machine Intelligence and Informatics January 25-26, 2007

  13. M. Stricker and M. Orengo Similarity of color images In In SPIE Conference on Storage and Retrieval for Image and Video Databases III, volume 2420, pages 381392,Feb. 1995.

  14. Ms P A Deole, Prof. R Longadge, Content Based Image Retrieval using Color Feature Extraction with KNN Classification, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.5, May- 2014.

  15. M A. Tahoun , K A. Nagaty , T I. El-Areif , M A-Megeed , A Robust Content-Based Image Retrieval using Multiple Features Representations, Proceedings @IEEE 2005

  16. M. Babu Rao,Dr. B. Prabhakara Rao and D. A.Gowardhan, Content Based Image Retrieval using Dominant Color and Texture features, International Journal of Computer Science and Information Security,Vol.9.No.2 February 2011.

  17. D Hazra ,Texture Recognition with combined GLCM, Wavelet and Rotated Wavelet Features International Journal of Computer and Electrical Engineering, Vol.3, No.1, February, 2011

  18. H-jie Xin, M-hu Ha, B Hu, D Tian, Fuzzy Information and Engineering Branch of the Operations. Springer Research Society of China, 2009.

  19. P.S. Patheja, A A. Waoo and M J Prakash, An Enhanced Approach for Content Based Image Retrieval, Research Journal of Recent Sciences ISSN 2277 – 2502 Vol. 1, 2012.

  20. K Wang ,X Wang, Y Zhong, A Weighted Feature Support Vector Machines Method for Semantic Image Classification ,International Conference on Measuring Technology and Mechatronics Automation (IEEE), 2010.

  21. L. Vanitha. and A.R, Venmathi. Sriperumbadur, Classification of medical images using Support Vector Machine, International conference on information and network technology, 2011.

  22. K-KyuSeo, An application of one-class support vector machines in content-based image retrieval, Expert Systems with Applications 33, 2007.

  23. S Jain, S Shrivastava International Journal of Computer Science & Engineering Technology ISSN : 2229-3345 Vol. 4 No. 03 Mar 2013.

  24. J. Wang, G. Wiederhold , SIMPLIcity: semantics sensitive integrated matching for picture libraries, IEEE Transaction On Pattern Analysis and Machine Intelligence, Vo1.23, no. 8, pp.1-17, September200l.

Leave a Reply