Image Segmentation using Clustering

DOI : 10.17577/IJERTV7IS030185

Download Full-Text PDF Cite this Publication

Text Only Version

Image Segmentation using Clustering

Himani Sabharwal

  1. tech (E.C.E) from IGDTUW New Delhi , India

    Priyanka Sharma M.tech (E.C.E) from IGDTUW

    New Delhi , India

    AbstractIn this paper image is segmented on the basis of pixels and displayed in a separate axes along with its percentage of pixels. Clusters are basically groups of various parts of image which includes some special features or sections or objects or in case of facial image can be considered as pixels in a particular group of cluster. Thus, this paper is all about clustering of image based on FCM.

    Keywords Clustering; Fcm; Image-Segmentation; Processing.

    1. INTRODUCTION

      Clustering is a vast field and algorithm which can be applied in many applications such as pattern recognition, image segmentation, medical applications- MRI and many other. Segmentation of an image classifies pixels in the image with variable values. There are different segmentation methods such as- automatic, semiautomatic, manual and pixel intensity. Segmentation can also be diagnosed by edge detection which divides the image into regions with related boundaries to it similarly as in case of MRI reports. Edge detection is sensitive to disturbances like noise and results in distorted image. Segmentation can also be done through statistical method. The most famous algorithm for image segmentation is clustering technique and these are fuzzy c-mean, neural network, whereas neural network requires a large set of training data. These algorithms work on the basis of distribution of the pixel feature vectors in feature vector space.

    2. RELATED WORK

      As the beginning of application of fuzzy logic or related task began with an implication with simple idea conceived by lotfi Zadeh. In 1960s his idea of classifying the class of objects that do not have a specific value or a criterion of a membership when it is dealed with real world. Zadehs development of theory of fuzzy sets was greatly impressed and propelled by pattern classification and cluster analysis. The 3 researchers Bellman, Kalaba, Zdeh together wrote their first paper on the application of fuzzy set theory to pattern classification in 1966. There was another researcher who evolved as an innovator on work of cluster analysis in 1969. Azriel Rosenfeld was another person who showed his interest in image study and segmentation using fuzzy. There are various clustering techniques out of which fuzzy ISODATA and Fuzzy C-Mean algorithm was introduced by J.Dunn in 1973.Whereas J.Bezdek introduced convergence theory related to FCM , cluster validity for fuzzy partitions, partition entropy.

    3. THEORY Fuzzy Clustering using FCM

      Fuzzy logic has been applied to pattern recognition have become very famous for past few years. Pattern can be of any type- object, organs of human body, face. Pattern recognition can be classified broadly into 2 categories unsupervised and supervised technique. Unsupervised clustering can be used to

      produce classification information needed by a supervised and techniques.

      Clustering basically is used to perform the segmentation of images. Segmentation is the term denoted for pixel partitioning of an image into regions that correspond to different objects or portions in the image. Fuzzy c-means (FCM) algorithm is one of the clustering technique. FCM is the extension of the hard partitioning or we may say conventional clustering algorithm. Hard partitioning basically means that a particular data belongs to only one cluster of several partitions. Then the concept of soft partitioning or clustering. It separates a single data element of a data set into multiple clusters at the same time but this differs from fuzzy partition as it only divides dataset not an input space.

      Hard c-mean (HCM) algorithm aims to find the centers of the clusters and to determine the clusters of each point in the data set for this we have to assume that are compact and well separated. According to this theorem a point in the data set belongs to the cluster from whose center is it closest.

      i.e. cj if || xi – vj || < || xi – vk || kj

      Where vj the center of the cluster cj, now to find these cluster centers objective function is given as follows:

      (1)

      Where v denotes a vector of cluster centers to be identified, J denotes the function of partition p which is determined by cluster centers v, whereas c denotes the no. of clusters. Thus HCM works to calculate the current partition based on present clusters.

      Modifying the current cluster centers using a gradient descent method to minimize the J function. This goes on until the difference between 2 consecutive vs is smaller than a threshold

      i.e. HCM converges to a local minimum of J.

      Now from the above HCM theorem FCM was evolved. Thus FCM generalizes HCM to allow a point to partially belong to multiple clusters simultaneously. FCM algorithm is used to optimize an objective function that measures the compactness and separation of clusters formed. If the number of classes of partition of data set is given, the fcm algorithm calculates the cluster centers and membership function for each cluster iterartively until convergence criterion is reached. The follows:

      Jm(p,v)=(2)

      Where p is fuzzy partition, X is data set, C is no. of clusters (C1, C2, .., , Ck) , m is the fuzzy weighting exponent for µij controls the fuzziness of the resulting clusters. Thus fuzzy C- Mean theorem is stated as:

      A constrained fuzzy partition {C1, C2, .., Ck } can be a local minimum of the objective function Jm only if the following conditions are satisfied :

      1 i k , xX (3)

      1 i k (4)

    4. GUI SYSTEM PREPARED

      To show my work in an effective way I have formed a GUI system. This GUI system looks like as follows:

      Figure1 GUI system with its axes and pop-up buttons

      1. SYSTEM

        To perform this experiment smoothly and to visualize its results effectively I tried to prepare a small soft system-gui system. This system consists of:

        1. Pop up buttons: To channelize this system I have embedded 2 popup buttons a.) loading image b.)To find the clusters of that image.

        2. Axes: To make a display of input image and processed or clustered images axes are used. Thus for the same reason I have used 1 axes for loading input image and 6 axes to display 5 clusters I have tried to create and the last axes will display 5 cluster in the single axes only. This last image can be used as a preprocessed image or use this concept for the same.

        3. Percentage: when images are clustered they are displayed with their no. of pixels available in that single cluster of image in percentage form as a title. This is done with all 5 clustered images but last image has not this feature as it is the combination of all 5 clusters of input image.

      2. Proposed Algorithms

      In this phase I have tried to show how I created clusters. Whereas the algo explained below is not for dataset or GUI system. This is only for a single image verification to be clustered whereas I have used a dataset as well as GUI to do so.

      ALGORITHM:

      1.) Image is read.

      2.) And that image is converted to mat2gray and stored in a variable

      im=imread(2.pgm); fim=mat2gray(im);

      3.) Size of rows and column are evaluated and stored in some variable

      nrows=size(fim,1); ncols=size(fim,2);

      4.) Then above variables are reshape and stored in ab as ab=reshape(fim, nrows*ncols, 1);

      5.) Fuzzy c-mean clustering is used on ab to calculate 5 clusters on face/p>

      [center,member]=fcm(ab,5); 6.) These centers are sorted

      [center,cidx]=sort(center);

      7.) Member is equated to transpose of member and the pixels of member are calculated as

      member=member; member=member(:,cidx);

      8.) Maximum of these member locations are calculated as [maxmember,label]=max(member,[],2);

      9.) Pixels are calculated for clusters as pixel_labels=reshape(label,nrows,ncols) pix1=pixel_labels; pixl(find(pix1==1))=0; pixl(find(pix1==2))=0; pixl(find(pix1==3))= fim(find(pix1==3)); pixl(find(pix1==4))= fim(find(pix1==4)); pixl(find(pix1==5))= fim(find(pix1==5));

      10.) These pixels are showed and displayed by indexing no. of clusters.

      11.) For the 5 clusters the value of pixels are calculated. 12.) Size is calculated and pixels were calculated in float as

      sw=size(im); total_pix=sw(1)*sw(2); format long

      total_p_1=(numel(ind_1)/total_pix)*100; total_p_2=(numel(ind_2)/total_pix)*100; total_p_3=(numel(ind_3)/total_pix)*100; total_p_4=(numel(ind_4)/total_pix)*100; total_p_5=(numel(ind_5)/total_pix)*100;

      13.) Finally each cluster image gets displayed with their indexing and no. of pixels or objects contained in it.

    5. RESULTS

I have tried to implement this concept on JAFFE database as well some other face images too. This is giving a satisfactory results. This not only create clusters but it also displays the

objects in clusters. One of its result showing 5 clusters of single input image and last concluded clustered image is as follows:

Figure2 ) 5 clusters of happy JAFFE image

REFERENCES

  1. Yong Yang, Shuying Huang, Image Segmentation using Fuzzy c-means clustering Algorithm with a novel penalty term computing and informatics vol. 26, 2007.

  2. Mahesh Yambal, Hitesh Gupta, Image Segmentation using Fuzzy c- means Clustering: A SurveyInternational journal of advance research in computer and communication Engineering,vol.2 issue7july 2013.

  3. Firas A.jassim, Hybrid Image Segmentation using Discerner Cluster in FCM and Histogram Thresholdingifrsa.

  4. Hui Zhao, Zhiliang Wang and Jihui Men, Facial Complex Expression Recognition Based on Fuzzy Kernel Clustering and Support Vector Mchines,third International Conference on Natural Computation(ICNC 2007)0-7695-2875-9/07,IEEE.

  5. S.Kirindis and V.Chatzis, A Robust Fuzzy Local Information C-Means clustering Algorithm,IEEETrans. Image Process. Vol.19, No.5,pp. 1328-1337, May2010.

  6. Fuzzy C-Mean Technique with Histogram Based Centroid Initialization for Brain Tissue Segmentation in MRI of Head Scans.

  7. Fu, S.K., Mui, J.K., 1981 : A Survey on Image Segmentation. Pattern Recognition, 13, pp. 3-16.

  8. Srinivas K. and Srikanth V., 2011: Automatic Histogram Threshold with Fuzzy Measures using C-Means, IJCSI International Journal of Computer Science Issues,8, Issue 6, No1,347-351.

Leave a Reply