A Method Based on Geodesic Distance for Image Segmentation and Denoising

The study introduces image segmentation and denoising method which is based on geodesic framework and k means algorithm. Our method combines geodesic with k means algorithm. What’s more, a denoising method is applied to denoise. We optimize the distance function of k means algorithm to achieve our goals. This method can segment and denoise image which contains a lot of noise effectually.


INTRODUCTION
Many operations are needed in image, such as image annotation (Russell et al., 2008), image noise and image segmentation.Image noise and image segmentation are the basic operations among these operations.
Image noise, which is one of the most important factors of image interference and image degradation, may come when we get image, transfer image or save image influenced by imaging devices or external factors.Hence, image denoising is an important part when we try to recover images.
Image segmentation is a key step from image process to image analysis.It is the process of detecting objects or interesting areas from input image and it is a crucial step in object detection and recognition.
Image segmentation and image denoising have drawn high attention in recent years.Thousands of algorithms about image denoising or image segmentation were introduced, yet all problems are not settled.However, we may be able to solve some certain problems effectively through the combination of several methods.
K means segmentation algorithm is one method which is characterized by tradition and concision.Key steps in K means algorithm are the selection of clustering center and the distance function.Many people have improved K means algorithm, example as Li et al. (2012) in which K means algorithm is based on the association diagram partition.The Euclidean distance between the seeds and pixel is used in most K means algorithm as the distance function, though the segmentation result to the more complex images is less satisfaction due to the space limitations of Euclidean distance.So, Bai and Sapiro (2007) introduced a distance function based on geodesic distance which solves the problem of Euclidean distance obviously.However, the computation of geodesic distance in is relatively complex.This study proposes a computation of geodesic distance through image gradient which is less accurate than the method given by Bai and Sapiro (2007), yet can still achieve satisfactory results.
As to the image with more noises, only to apply geodesic distance cannot reach the goal.Methods of Image denoising are varied, such as the study about the median filtering and wavelet transform in Li (2011) and an easier method mentioned by Wang et al. (2009) which combines the gray value of pixels and the physics relationship when segment an image.What's more, a method based on structural similarity and curvelet (He et al., 2013), an optimal weight method (Dinh et al., 2012) and a fast non-local means method (Xing et al., 2012) are used to solve image denoising.We use these two methods for reference and get a geodesic framework for image segmentation and denoising while improve them.

MATERIALS AND METHODS
In K means algorithm, using Euclidean distance is the traditional method.Nevertheless, the method is meaningless when exist any amounts of points which are not in considering area between two points.This is because of not considering regional connectivity that result to the space limitations of Euclidean distance.To seek out a solution, Bai and Sapiro (2007) proposed to replace Euclidean distance by geodesic distance.
In Bai and Sapiro (2007), geodesic distance is computed by the color PDF of pixels.This method has high accuracy, but the computation process is relatively complicated.This study introduces a computation As regards denoise, we use the edge-weighted CVT denoising method mentioned in Wang et al. (2009) and Hao (2010): to statistics the number of pixels which are the neighbors but not cluster of pixel x and to give further processing.
The computing method of geodesic distance: It is known to all that an image is formulated by a twodimensional discrete function.And the image gradient is actually the derivative of the two-dimensional discrete.The direction of a gradient is the direction of the largest variance rate of gray level.So computation of the geodesic distance can base on this property.
Take the Example as follows.There are two points, a and b, shown in the Fig. 1: The radial lines (1) and (3) are on the connection of point a sand point b and the directions are opposite in which point a and b have the largest variance rate of gray value, etc.The difference between the gray values of these two points is the largest.These two points are most likely appearing in two different clusters.Furthermore, the difference between the gray values of these two points is the smallest when these directions are on the contrary, etc.They will most likely appear in the same cluster.Therefore, we give the computational process of the weight.When α and β both are 0, weight 1 is 0.1, the largest value.And when α and β both are π, weight 1 is 0, the smallest.The weight 1 is then computed as: The value of the gradient is also a key factor which is related to the geodesic distance.The larger the gradient' value is, the larger difference of the two points' gray value have and the larger distance they have.We define a variable ti as the value of the gradient of pixel x and seedti as the value of the gradient of seed.For the range of weight 2 should be basically the same with weight 1's, we compute weight 2 as: Combining the gray value of the image with the computations of weight 1 and weight 2, we define the geodesic distance as follows: The algorithm is based on k means algorithm and it replaces the distance function by function (4).Suppose that an image will be divided into K clusters and there is a user-provided scribble w as the generator in every cluster.The scribble contains L points, so the generator is denoted by ‫ݓ{‬ } ୀଵ .Take L points mean value as the cluster center when initialize the algorithm, then the cluster center is {ܵ } ୀଵ .Classifying x into cluster k at the time when the geodesic distance between x and the seed S k is the smallest.The geodesic distance is computed as: After classifying using the geodesic distance, we can get the result image as shown in Fig. 2 and 3.
From Fig. 2 and 3, we can see the method can segment a digital image effectively without noises.However, for the images with lots of noises, there are

IMAGE DENOISING
We can find out from Fig. 3 that the gray value of noise point is much different with its neighbor points.In this case, we consider the physics relationship of noise point and its neighbors and combine the neighborhoods' gray value for a further segmentation process.
In Fig. 4, the pixel x is white and its neighborhoods are blue and x is a noise point.Obviously, this image will have no noise if x can be classfied into the blue.Suppose the number of the x's neighborhoods, which are in the same cluster with x, is denoted by N x and the number of the x's neighbors which are not in the same cluster is x N .Then, when x N > x N , we should reclassify the pixel x.
According to Dinh et al. (2012), ) ( x Nω is the neighborhood of pixel x, which can be the centre of a

RESULTS AND DISCUSSION
We now compare our method with other two algorithms.The first algorithm is k means algorithm

Fig. 1 :
Fig. 1: The angle between the two gradients ] and value [b] represent respectively the gray value of point a sand point b in function (3).

Fig. 3 :
Fig. 3: The segmentation of digital image with noises using geodesic distance

Fig. 5 :
Fig. 5: The result of image denoising Fig. 10: a) The result of the algorithm produced in this study, b) the result of the first algorithm mentioned above, c) the result of the second algorithm mentioned above