Adaptive Image Enhancement Algorithm Combining Kernel Regression and Local Homogeneity

It is known that many image enhancement methods have a tradeoff between noise suppression and edge enhancement. In this paper, we propose a new technique for image enhancement filtering and explain it in human visual perception theory. It combines kernel regression and local homogeneity and evaluates the restoration performance of smoothing method. First, image is filtered in kernel regression. Then image local homogeneity computation is introduced which offers adaptive selection about further smoothing. The overall effect of this algorithm is effective about noise reduction and edge enhancement. Experiment results show that this algorithm has better performance in image edge enhancement, contrast enhancement, and noise suppression.


Introduction
The presence of noise in image is a major problem that typically negatively affects image analysis and interpretation process.Therefore, to improve the performance of higher level processing stages, a filter method has to be applied in order to reduce noise, enhance edges, and consequently to obtain a better estimate of the ideal image.The purpose of smoothing is of twofold; noise is eliminated to facilitate further processing, and features irrelevant to a given problem are ruled out to reduce the complexity for the subsequent processing.The designs for filters have been conducted for a long time.Many of them may enable to perform some filtering functions with loss of useful information at the same time.In other words, these filters are appropriate when both smoothing and discontinuity preservation objectives are desired.The literature on signal and image filter is vast, and comprehensive review is beyond the scope of this paper.We only introduce several important nonlinear image filter methods which are relevant to our method.PDE-based image processing methods became widespread after the work of Perona and Malik 1 , where they proposed a modified version of the heat equation called anisotropic diffusion that adapted the diffusivity to image features.The anisotropic diffusion equation is also the first variation of an image energy that seeks piecewise constant solutions.A multitude of nonlinear PDE models have been developed for a wide variety of images and applications 2-5 .The nonlinear PDE models have proven to be effective, but only for particular applications where the input data is well suited to the model's underlying geometric assumptions.The parameter tuning is a challenge because it entails fuzzy thresholds that determine which image features are enhanced and which are smoothed away.Tomasi  The mean-shift procedure 13-15 moves each sample in a feature space to a weighted average of other samples using a weighting scheme that is similar to Parzen windowing.We can also view this as moving samples uphill on a PDF.Comaniciu and Meer 15 proposed an iterative mean-shift algorithm for image intensities, where the PDF does not change with iterations.Each gray scale or vector pixel intensity is drawn toward a local maximum in the corresponding PDF.Mean-shift algorithm utilizes kernel function properties to estimate gradient orientation of the point and find the bandwidth of the kernel function without estimating whole region probability density.It is an effective iterative algorithm.
To efficiently smooth the image while preserving the textures, an enhanced kernel regression method EKRM is proposed in 16 .It is noniterative.In this algorithm, the Gaussian kernel regression is explored.Then, Taylor expansion is used in the regression function.
The adaptive filter method applies both linear and nonlinear algorithms but is mainly characterized by a filter parameter adjustment depending on the local features detected over each particular location on the image.A reliable measure for the presence of a discontinuity in the processing window must be available.The structure of the filter then depends on this measure to avoid smoothing over an edge.The adaptive filter method we proposed here is similar to EKRM 16 but with the following improvements.First, a homogeneity criterion is used, which can give the homogeneity image of the original image.Next, the homogeneity image derived from the input image is used as the filter parameter to control the adaptive behavior in the kernel regression, which offers a principle for filtering the pixel.When the homogeneity value is high, Taylor expansion is used on this pixel and the pixel is judged as an edge pixel.When the homogeneity value is low, the pixel is treated as an interior pixel of a region, so the Gaussian filter is applied and the image is smoothed.It is shown to suppress noise while sharpening edge present in the input images.
The paper is organized as follows.Section 2 presents a brief review of classical kernel regression and its application in image filters.Section 3 introduces the local homogeneity measure of images.We propose our new filter method in Section 4, and some comparative results are shown in Section 5. Acknowledgments concludes this paper.

Kernel Regression for Image Filter
In this section, we review the EKRM method briefly and analyze its relation with human visual perception.

Kernel Regression Filter Based on Taylor Expansion (EKRM)
Classical parametric image processing methods rely on a specific model of the signal of interest and seek to compute the parameters of this model in the presence of noise.A generative model based upon the estimated parameters is then produced as the best estimate of the underlying signal.Nonparametric methods rely on the data itself to dictate the structure of the model, in which case the implicit model is referred to as a regression function.Given a set of independent observations x 1 , y 1 , . . ., x n , y n coming form a population X, Y , where X and Y are called predictor variable and response variable, respectively, we want to find a smooth function y i m x i ε i , i 1, 1, . . ., n, m x i is called regression function.Kernel regression offers a way of estimating the regression function without the specification of a parametric model.In kernel regression, the value of a point can be estimated by a weighted average of this point and its neighbors.This weight function is often referred to as a kernel.Usually, the kernel is continuous, bounded, and symmetric real function that integrates to one.For univariate regression, the weight sequence for a kernel smoother is defined by where the normalized term is the kernel with scale factor h. Gaussian kernel is a popular one in kernel regression.Zhang et al. 16 introduced the second derivatives of Gaussian kernel into kernel regression and applied it in image filter.The new kernel is derived from Taylor expansion theorem.Consider the univariate nonparametric regression model is where m x is a smooth function and ε is a random noise which submits to normal distribution N 0, σ 2 .
The kernel function is chosen to be When it comes to estimate m x , the noise of observations is generally removed by smoothing y x , and the estimate for m x is Then, discrete estimate of m x can be expressed as the widely used N-W estimator form 17, 18 where h is the bandwidth and n is the sample number.
The jth derivative of m x, h , denoted by m j x, h , can be obtained from 2.5 as The discrete estimate form of m j x, h can be expressed as For a normal density K with variance h 2 , the following equations are true: Expanding y in a Taylor series with respect to x, we obtain

2.10
That m x can be estimated by

2.11
Introducing a positive parameter k and h and substituting m x, h for m x and m x, h for m x, h , 2.11 becomes Here, h and h are bandwidths, n is sample number, k is a fitting coefficient, and K • is the normal density kernel.
For image filter, we use p-dimensional kernel for kernel regression.The coordinates x i , y i are predictor variables X, and their intensity values I x i , y i are response variables Y .So, the regression model is

and v x
Var Y is called variance function.
The p-dimensional kernel function is chosen as Correspondingly, the discrete form of m X, B and m j X, B can be estimated by

2.16
Then, we have the following equation: 2.17

Its Relation with Human Visual Perception
It has long been known that retinal ganglion cells and cells of the lateral geniculate body have a receptive field RF consisting of two regions, an approximately circular center and an annular surround 19 .There are two types of typical retinal ganglion cells-ON center cell and OFF center cell.Figure 1 illustrates these two types of receptive fields.The ON center cell may respond strongly when the center is stimulated by illumination and the response is restrained when the surround is stimulated as shown in Figure 1 a .Diffuse illumination covering both center and surround may excite the cells weakly.For the OFF center cell, it responds strongly when the surround is stimulated and the response is restrained when the center is stimulated as shown in Figure 1 b .It has been found that the ganglion cell's response model is equal to the difference of two Gaussian functions 20 ,

2.18
While the antagonistic center/surround organization improves the representation of local contrast, it reduces the sensitivity to global brightness over an extended area while the edge becomes prominent.where L x, y is relative stimulus intensity over space S; S represents stimulus area.We denote T x, y , and X is the center of the receptive field, then R L X P X − T dT .

2.21
According to the three Gaussian models as 2.19 , we select σ 1 σ 2 σ 3 B 2.21 can be rewritten as As Taylor expansion in kernel regression,

2.23
If we select A 1 m X /L X , A 2 m X X − T /L X , and A 3 X − T T m T X − T /2L X , we can find that 2.23 has the identical form with 2.22 , so the EKRM method can be explained in human visual perception theory.It approximates the responsiveness and transfer function of lateral geniculate nucleus LGN cells.

Adaptive Image Enhancement Method
In this section, we propose an adaptive image enhancement method.Section 3.1 describes the local homogeneity computing method used in our algorithm, which is easy and efficient for computing.The details about the new algorithm are given in Section 3.2.

Local Homogeneity
The main problem in designing nonlinear filter is how to detect discontinuities.A reliable measure for the presence of a discontinuity in the processing window must be available.The structure of the filter then depends on this measure to avoid smoothing over an edge.The homogeneity is often used as the discontinuity measure.To quantize the homogeneity of a pattern is not a trivial task.In this paper, we use the criterion proposed in 22 ; this method is easy to compute and shows pretty good results.
The pixels of an image can be viewed as a set of spatial data points located in a 2D plane with the top left corner being the origin.Denote the location of a pixel as x, y and its intensity as I x, y .Let P be the pattern to compute homogeneity.Currently, we consider P to be a square window of width 2N 1. attribute being I x c , y c .Each pixel p i x i , y i , 1 ≤ i ≤ 2N 1 2 in P corresponds to a vector cp i x i − x c , y i − y c .Based on cp i , a new vector is constructed as follows: Let f be the sum of all the vectors defined in P , that is, The measure H is defined as the norm of f, that is, H f .In homogeneity region, the H values are very small, and in the regions containing several homogeneity regions, the H values are usually high.The higher the H value is, the more likely that its central pixel is near region boundary.The H-image is a gray-scale image whose pixel values are the H values calculated over local windows centers on those pixels.The dark and bright areas in the Himage represent the region centers and region boundaries, respectively.The figures in 22 demonstrate some example patterns and their corresponding H values.We make a linear transform to convert the H value into 0, 1 , that is, Then, H can be used as the discontinuity measure in our algorithm.Figure 2 gives the example of H-image in our method.The original image in Figure 2 a includes three circles filled with different colors.As we noted that homogeneity can be used as the discontinuity measure.In this image, the circle boundary is the discontinuities we need to find. Figure 2 b shows that the discontinuity points can be clearly detected using our homogeneity measure.The homogeneity values are high at the boundary of the circles and low in the interior regions.

The Proposed Adaptive Kernel Regression Filter
We apply the local homogeneity in EKRM method and propose an adaptive image enhancement method AIEM .In EKRM, the image filter is based on Taylor expansion without any selection.So any pixel no matter it is noise or edge pixel is enhanced.In our method, we employ the local homogeneity as a parameter.The pixels in homogeneity region are smoothed using Gauss smoothing and the pixels in inhomogeneity region are enhanced.
As proposed in 16 , Another parameter B is introduced for the bandwidth in the derivative of m X , then Using the properties of the symmetric positive definite matrix B and m X , we have a more manageable form of 3.4

3.6
Here b ij p×p PBP T , P is an orthogonal matrix with P T P I such that m X P T DP .

3.7
Then, 3.4 and 3.5 are written as follows: here, λ i is the new eigenvalue of m X , and λ i is the new eigenvalue of m X, B .In 16 , a positive parameter k is introduced which is arbitrary.Then, the regression formula is We make an improvement about the regression formula.In our method, we introduce an adaptive positive parameter H X instead of k, which is a local homogeneity measure about

3.12
For simplicity, we suppose that B h 2 I is a diagonal matrix with equal diagonal elements, then PBP T h 2 I and 3.11 becomes m X, B, B m X, B − H X h 2 p i 1 λ i , 3.13 where p i 1 λ i trace m X, B , which is easy to be estimated.In our method, when a region is declared homogeneous, the homogeneity measure is zero, which means Gaussian filter is applied to smooth the central pixel.When no homogeneous region is detected, that is, when trying to estimate over a pixel which is close to a discontinuity, the adaptive filter is applied to preserve this discontinuity.

Experiment Results and Discussion
In this section, we show the performances of the proposed kernel regression algorithm on simulate data and real noisy images, then we discuss the merits of our method.
Figure 3 is the result we test on simulate data.There is a sharp boundary between a bright and a dark region as shown in Figure 3 a .The homogeneity value on the boundary is one and approximate zero elsewhere.After applying the proposed method on it, the boundary is preserved, and the interior region is smoothed as shown in Figure 3 b .The proposed method can efficiently smooth out noise and enhance the boundary.Figure 4 gives the examples of our filter results on gray images comparing with other methods.Figure 4  is the original input gray image.Figures 4 b -4 e are the images filtered by PDE method, bilateral filter, mean-shift filter, and EKRM method, respectively.Figure 4 f is the image filtered by the proposed method.The original input images are of low contrast and somewhat blurred.Reducing the noise and blurring, sharpening the edge, and increasing the contrast range can improve the quality of the images for human viewing.By comparison, we can find that Figures 4 b -4 d method can smooth the images well while making the images a little burred.EKRM method can preserve all details and enhance the contrast of the images, but it also blows up noise.Our method can overcome these shortcomings and has better performance as shown in Figure 4 f .In the homogeneity region such as the floor and the woman's arms in the image, the homogeneity measure H is approximate to zero, and the second part in 3.13 almost has no effect on it, which means the image is smoothed by Gaussian filter.So, the outliers are smoothed out.When the pixels are close to discontinuities, such as the textures parts in the image, the homogeneity measure H is approximate to one.The second part in 3.13 plays an important role in image filter.The proposed method becomes an adaptive filter which can enhance the pixel values on the boundary.So, the texture part in Figure 4 f is more clear than the original image.By comparison, Figure 4 f is more comfortable for human viewing.Figure 5 is the examples of our method on real noisy color images.Besides the merits on gray images, the proposed method gives output color images of well-increased global and local contrasts.
By introducing an adaptive parameter, the pixels in homogeneity region are smoothed, and significant discontinuities are preserved and enhanced.The filter performs as much smoothing as possible when it finds continuous region without outliers; when a discontinuity is detected, it averages only the pixels that belong to one region.Compared with other methods, it is noniterative, so computation is more efficient.It can remove blurring and noise, increasing contrast, revealing details, and improving perception of information for human viewers.Our method also has the shortcoming that it is not appropriate for low SNR image, which is our future research work.

Conclusion
An adaptive image enhancement method based on kernel regression and local homogeneity is proposed in this paper.It introduces the local homogeneity as an adaptive parameter in Mathematical Problems in Engineering 13 EKRM method in the second derivative Taylor expansion and could remove blurring and noise, increase contrast, and reveal details.Experiments results show that our method has better performance than other filter methods.

Figure 2 :
Figure 2: The example of H-image.a The original image.b The H-image.

Figure 3 :Figure 4 :
Figure 3: Result on simulate data a Original image.b Filtered by proposed method AIEM .

Figure 5 :
Figure 5: Results comparison on color image a Original color image.b PDE method.c Bilateral filter.d Mean shift method.e EKRM method.f Proposed method AIEA .
and Manduchi 6 described a bilateral filter, which does a robust averaging in Gaussian-weighted image neighborhoods.It is successfully applied to image denoising 7, 8 , mesh smoothing and denoising 9, 10 , and coherence enhancing 11 .
A theoretical analysis of this method is presented in 11 .The principle of bilateral filtering is simple.It combines gray levels or colors based on both their geometric closeness and their photometric similarity and prefers near values to distant values in both domain and range.Bilateral filter is a local adaptive filter, but it is not as robust as is claimed.It cannot suppress the impulse outliers effectively.Xu and Pattanaik 12 proposed a noniterative bilateral method for Monte Carlo noise reduction; this method has good performance on salt and pepper noise but fails on Gaussian noise.
Li et al.21demonstrated an extensive disinhibitory region DIR outside the classical inhibitory surround of the receptive field RF .By adding a disinhibitory mechanism, the average output gray level increases and the transfer property of the low spatial frequency components is clearly improved.It can explain how the visual system transfers the various gradients of luminance of an extended area and represents the mean luminance in visual environment.They use the algebraic sum of three Gaussian functions to represent it by adding a third positive Gaussian representing the outer surround disinhibitory mechanism P x, y is the sensitivity profile of the receptive field.A 1 , A 2 , and A 3 are the peak sensitivity values for the center, surround, and outer-surround mechanisms, respectively.The output of the cell response is the following model: R S L x, y P x, y dx dy, 2.20