A Comparative Study on Classification of Image Pixels

In this paper, we perform the comparison between the classification method introduced by Ghimire-Wang and the classification method developed by Liao-Akritas in many images. We show that in all the considered images, the method introduced by Ghimire-Wang works better than the method of LiaoAkritas.


INTRODUCTION
Mathematically, an image can be defined by a two dimensional function, say (, ) where  and  represent plane coordinates and the amplitude of  at (, ) is called grey level or intensity of image a that point.In other words, images can be considered as a finite collection of regions and hence can be realized by groups of pixel (smallest element of digital image) values representing different regions in the image.The pixels which represent a particular feature in the image exhibit more homogenity in terms of distribution followed by the data set of pixel values.We can form groups of similar image pixels by comparing pixles with each other and to pixels with known identity and these groups so formed are called image pixels classes.Image pixels classfication is the process of assiging the pixels of an image to a specific class or category to identify the image features.Different parts of the image or the image itself may not be identifiable to human eye so that we need to perform image pixels classification to view the image parts as something familiar.
Image pixels classification is used in various areas such as medical diagonosis, astronomy, remote sensing , and computer vision.Image pixels classification has be very helpful in chromosme karyotyping, catergorization of database of x-ray images, comparing normal and abnormal blood vessels.In remote sensing it is especially used in land-use analysis, mineral exploration, and the determination of earth surface composition.For more information on application, see Dzung et al. (2000).
In this paper, we briefly discuss the test based classfication method introduced by S. Ghimire and H. Wang (2012).We then compare this method with another test based classification method introduced by Liao and Akritas (2007) in the context of classifying image pixels.We write G-W and L-A method throughout the paper to represent Ghimire-Wang and Liao-Akritas method respectively.G-W method mainly employs evidence from the hypothesis testings and minimum distance for the classification whereas L-A method used the evidence from the hypothesis testings only.Next, we briefly discuss the G-W method.For more information on this method, refers Ghimire (2011).

Binary Classification
As Ghimire and Wang's method suggests, we consider two classes in the given image.Let us consider two image pixels with their means   and   and   be a randomely selected test point in the image.

Multiclass Classification
Here we consider more than two classes in the image.
We extend the ideas of binary classification discussed above to multiclass classification.Assume that there are k pixel classes in the image with means μ 1 , μ 2 ,…,μ k and prior probabilities p 1 , p 2 ,…, p k respectively.Let x 0 be a test point which we would like to classify.Here we perform the hypothesis testing as many times as the number of classes by placing the test observation in one of the classes every time.
We do a series of hypothesis testing in which we test to see the sample evidence that x 0 belongs to each of the classes based on the training data.We choose Kruskall-Wallis and ANOVA as our statistical tests depending on the distribution of classes.
Let PV 1 (x 0 ), PV 2 (x 0 ),…,PV k (x 0 ) denote the p-values of Test 1, Test 2,…and Test k respectively.When all the test p-values are larger than the threshold, then x 0 is classified to the class obtained by eliminating classes, one at a time and comparing For the details about the multiclass classification, please refer Ghimire and Wang (2012) and Ghimire (2011).If the prior probabilities of classes are equal, then we use p 1 =p 2 =...=p k .For the unequal priors, we can define the prior probabilities of classes as follows.Let be the ordered means of the classes to be considered.Then, Prior of class i = Proportion of pixels larger than [μ (i-1) +μ (i) ]/2 and smaller than [μ (i) +μ (i+1) ]/2.Readers are suggested to refer Liao and Akritas, 2007 for the details about the classification method introduced by Liao and Akritas.

Comparison between GW and LA method
We perform the comparison between these two method in binary and multiclass classification of image pixels.Moreover we take into account of both cases of equal prior probabilities and unequal prior probability of classes considered in the images.We begin with binary classification with equal prior probability of classes.

Description
We take a standard grey scale image of size 512×512.Let class 1 and class 2 denote the two classes of interest in the image.To form the training data for a class, we choose two points in the region which will be the end points of the main diagonal of the rectangle.Then all the pixels in this rectangular region form the training data for its corresponding class and it's sub-matrix of original Santosh Ghimire 512×512 matrix.Next, we put it into a vector form by adjoining each column of the sub-matrix below its preceding column.We treat this vector of pixels as the training data from the corresponding class.We use the programming language R to perform the image pixels classification and all the images and tables we use here are R generated images and tables.Let us take an image (pepper image) as shown in Fig. 1 and define black color pepper as class 1 and white color pepper as class 2 and form training data as described above.Kernel density plot of classes as shown in the adjoining figure shows that the classes so formed are distinct in terms of pixels values.To facilitate the comparison, we consider 20 test points, 10 from each class.We assume that the classes considered in the image have equal prior probability, Table 1 shows the classification of all the considered test points (TP) in the Fig. 1.In the table, Our and LA respectively denote the Ghimire-Wang method and Liao-Akritas method.Similarly d 1 and d 2 denote the distances of pixel values from the mean of the respective classes and PV 1 , PV 2 are p-values of the hypothesis testings as discussed earlier.From the Table 1, we see that the G-W method has classified all the test points correctly whereas L-A method has misclassifications.
Next consider an image given below.

Fig. 2. River-Mountain Image and the Kernel Density estimate of classes
Now we perform the classification of image pixels in the image given above.Here we take sky as class 1 and vegetation as class 2 (distinct classes as shown by density plots) and proceed as before.In this image (Fig. 2), we also consider that classes have equal prior probabilities.Classification of all the considered test points are tabulated in Table 2. Notice that the L-A method has misclassified the test points 11, 14-20 whereas G-W method has correctly classified all the test points .
Next we perform again the binary classification of image pixels with unequal prior probabilities of classes.In the Image (Fig. 3), we again take sky as class 1 and vegetation as class 2 and form the test points accordingly and obtain the prior probability of classes (Pr1 and Pr2) using the method described earlier.Classification of test points are shown in Table 3.The Table 3 shows that L-A method has many misclassifications and G-W method has no misclassifications.Now we perform multiclass classification of image pixels in the image given below.5, one notices that there are some test points which are misclassified by the L-A method.The Table 5 does not have any test point which is misclassified by G-W method of classification.Finally we consider an image as shown in Fig. 6 and employ the methods to classify test points.Here we consider four different classes in the image.Density plot in Fig. 6 shows that the classes are nearly distinct with each other.We suppose that these four classes do not have equal prior probability.So we obtain their prior probability as described earlier and tabulated in Table 6.Total 20 test points are taken in the image where 5 test points in order are taken from class 1 to class 4 as shown in the image.

Fig. 6. House Image and Kernel Density estimate of classes
The selected test points are now classified using both of the discussed method and the results are tabulated in Table 7.One can see that all the test points are properly classified by G-W method.But L-A method fails to classify the test points 6-10, 11-15.CONCLUSIONS In all the considered images, we see that G-W method of image pixels classification has correctly classified all the test points.But L-A has failed to classify all the test points correctly and it has high rate of misclassification in all the images.From this study, we are now in the position to conclude that G-W method works better than L-A method in classifying image pixels.For the comparison of G-W method with other methods of classification (Ghimire & Wang, 2012: Ghimire, 2011).

Fig. 1 .
Fig. 1.Pepper Image and the Kernel Density estimate of classes

Fig. 3 .
Fig. 3. River-Mountain Image and the Kernel Density estimate of classes

Fig. 4 .Fig. 5 .
Fig. 4. River-Mountain Image and the Kernel Density estimate of classesWe define sky, mountain and vegetation as class 1, class 2 and class 3 respectively and choose 21 test points 7 from the regions representing each class.From the density plot, we see that the three classes so formed are distinct in terms of pixel values.Suppose that all three Place   with the observations from class 1 and use   ,   ,   ,   , … ,     and   ,   ,   , … ,     to test the null   ,   ,   , … ,     and   ,   ,   , … ,     respectively from class 1 and class 2. Then we perform following two tests where two statistical tests, namely Wilcoxon rank sum test and t-test depeding upon the distribution of image classes are used.• Test 1:  ,   ,   , … ,     and   ,   ,   ,   , … ,     to test the null hypothesis H 0 .The H 0 for the Wilcoxon rank sum test is that class 1 and class 2 have