Keywords

1 Introduction

With the advancement of technology and the increasing popularity of mobile terminals, people are increasingly demanding imaging systems, and they always hope to obtain high-resolution, high-definition images. However, the image quality is degraded due to various factors in the collection, transmission, compression, transformation and other processes [1]. For example, in different lighting environments, the brightness of the image may change; when the device is operated, jitter causes image shifting, etc., which may cause the details and textures in the image to be unclear. In practical applications, these problems will cause the readability of the image to decline, which also brings great difficulties to image processing methods such as image detection, feature information extraction and analysis [2]. In order to solve these problems, the image needs to be enhanced. Image enhancement process-ing is to enhance the useful information in the image. Its purpose is to extract the information hidden in the image or to improve the contrast of the image, to improve the quality and visual effect of the image, or to convert the image to be more suitable for human eye observation or machine Analyze the form of recognition to get more useful information from the image [3].

By adjusting the pixel gray value of the image, the degree of distortion of the image can be relieved to some extent. However, when dealing with some textures, borders, and other information, it is difficult to be effective, and it needs to be analyzed by using a near-field processing method. The image can be enhanced by adjusting the contrast between the pixel and the surrounding pixels in the image, which means that the filtering enhancement technique is required to be processed. By suppressing the low-frequency information by enhancing the high-frequency information by filtering, the details such as edges, lines, or textures where the gray value of the pixel greatly changes can be highlighted. For image applications, the overall or local characteristics of the image are purposefully emphasized, and the original unclear image becomes clear or emphasizes some interesting features. Extend the difference between different objects in the image and suppress uninteresting features to match the image with visual characteristics. Improving image quality enhances the effects of image interpretation and recognition for subsequent analysis and understanding of the image.

2 Image Enhancement Classification

Image enhancement can be divided into two categories: spatial domain and frequency domain.

2.1 Spatial Domain Filtering Enhancement

The spatial domain filtering technology has three kinds of consideration: (1) extracting edge information of original image. (2) the fuzzy component of the original image is weighted, and then superposed with the original image. (3) using a specified function, the original image is weighted so that the image is generated Sharpen or smooth effect. In the three operations, the space convolution technique is used, and the template is moved on the original image by the template, and the local operation is carried out block by block [4]. Assuming that the original image is \( f(x,y) \), we can detect the edge information of the window by some way, \( \nabla f(x,y) \), and then add it to the original image after weighted processing, and then:

$$ {\text{g}}\left( {\text{x,y}} \right) = g\left( {x,y} \right) \pm K \cdot_{\Delta } f\left( {x,y} \right) $$
(1)

Where g(x, y) is the filtered image and K is a constant term.

There are already a variety of convolution filters available, such as sharpening (high pass) filters that help to highlight target contour and edge, line information, smoothing (low pass filters) to eliminate noise and excessive detail, non-linear mean filter. Various directional filters can enhance the different edges and streaks in the specified direction.

2.2 Frequency Domain Filtering Enhancement

Convolution theorem and Fourier transform are the basis of frequency domain filter enhancement. Which can be expressed as:

$$ f\left( {x,y} \right)\,\underrightarrow {FFT}\;\,F\left( {u,v} \right) \to G\left( {u,v} \right)\,\underrightarrow {IFFT}\;\,f^{{\prime }} \left( {x,y} \right) $$
(2)
$$ {\text{G}}(u,v) = F(u,v).H(u,v) $$
(3)

Which \( H(u,v) \) is a transfer function, its role is to suppress some frequencies in the Fourier transform but retain some other frequency, it is also known as the filter. Two types of filters are commonly used: one is a filter for attenuating high frequencies through high frequencies, called a “low-pass filter,” and the other is a filter for attenuating low frequencies through high frequencies. It is a “high pass filter.”

3 Image Enhancement Algorithm

3.1 Bilateral Filtering Algorithm Based on Spatial Domain

Bilateral filtering is an improvement over Gaussian filtering. Gauss filtering is a weighted average process of the whole image, and the value of each pixel is obtained by weighted averaging of other pixel values in the neighborhood itself. The specific process of Gauss filtering is to use a template or convolution to scan every pixel in the image, and use the weighted average gray value of pixels in the neighborhood to replace the value of the template center pixel. The Gauss filter only considers the proximity of the image space pixels. The following Fig. 1 is the effect of the parameters on the filtering effect in the Gauss filter [5].

Fig. 1.
figure 1

Gaussian filter parameters: (a) \( \alpha \) parameter value small, (b) \( \alpha \) parameter value large, (c) Smoothness small, (d) Smoothness larger

$$ {\text{G}}B\left[ I \right]_{\text{P}} = \sum\limits_{q \in S} {G_{\delta } } \left( {\left\| {p - \left. q \right\|} \right.} \right)I_{q} $$
(4)

where \( \alpha \) is the size of the sliding window. Compared with the Gaussian filter, the bilateral filter increases the effect of the gray value on the image, that is, if the pixel gray value of the neighborhood is closer to the gray value of the central pixel, the weight is added to the weight of the Gaussian filter relatively large weights. Conversely, if the grayscale difference is large, a small weight will be added to the position of the generated Gaussian template. Bilateral filtering is a kind of compromise which combines the image spatial proximity and the pixel similarity [6]. It takes the spatial information and the gray similarity into consideration to achieve the preserving edge from denoising. It has the characteristics of simple, non-iterative and local [7].

The pixel value g of the bilateral filter output (i, j) position depends on the weighted combination of the neighborhood pixel value f(k, l represents the neighbor-hood pixel position).

$$ g(i,j) = \frac{{\sum\nolimits_{k,l} {f(k,l)w(i,j,k,l)} }}{{\sum\nolimits_{k,l} {w(i,j,k,l)} }} $$
(5)
$$ w(i,j,k,l) = \exp \left( { - \frac{{(i - k)^{2} + (j - l)^{2} }}{{2\sigma_{d}^{2} }} - \frac{{\left\| {f(i,j) - \left. {f(k,l)} \right\|^{2} } \right.}}{{2\sigma_{d}^{2} }}} \right) $$
(6)

The weight coefficient w(i, j, k, l) depends on the product of the domain kernel and the domain r, The following Fig. 3 (b) and (d) is the effect of bilateral filtering, in which the neighborhood diameter is 20, the value of the color space filter \( \delta \) is 35, and the value of the filter \( \delta \) in the coordinate space is 35.

Gaussian filter parameters are shown in Fig. 1.

3.2 Homomorphic Filtering Algorithm Based on Frequency Domain

Homomorphic filtering is an image processing method that combines frequency and spatial gray transform. It uses the illumination/reflectivity model of the image as the basis of frequency domain processing to improve the quality of the image by compressing the brightness range and enhancing the contrast. Due to the small changes in illumination can be seen as the low-frequency components of the image, while the reflectivity is the high-frequency components. By dealing with the effect of illuminance and reflectance on pixel gray value respectively, the image quality can be improved and the details of the shaded area can be revealed, which makes the image process more accords with the non-linear characteristic of the human eye to the brightness response and avoids the direct Distortion of Fourier transform processing [8]. Homomorphic filtering is a kind of frequency domain filtering. Its function is to adjust the gray range of the image and enhance the image detail of the dark area by eliminating the problem of uneven illumination on the image, without losing the image detail of the bright area [9]. The Illumination-Reflection model can be used to develop a frequency-domain process that changes the appearance of an image by simultaneously performing grayscale range compression and contrast enhancement.

The basic principle of homomorphic filtering is that the pixel gray value is regarded as the product of illumination and reflectivity, that is, the image \( f(x,y) \) consists of the product of the illumination component \( i(x,y) \) and the reflection component \( r(x,y) \).

$$ \begin{array}{*{20}c} {f(x,y) = i(x,y)r(x,y)} \\ {DFT[\ln f(x,y)] = DFT[\ln i(x,y)] + DFT[\ln r(x,y)]} \\ \end{array} $$
(7)

The illumination component, \( i(x,y) \), reflects the average brightness of the image. The data changes are usually flat. So the illumination component mainly occupies the low frequency region of the image spectrum. The reflection component reflects the dramatic changes in the image, such as isolated noise, \( r(x,y) \) edge of target and background and other false edges and image details are included in the reflection component, thus constitute the high-frequency part of the spectrum image. Do Fourier transform of the image to get its corresponding frequency domain representation [10].

The low frequency part of the image logarithmic Fourier transform mainly corresponds to the illuminance component, and the high frequency part mainly corresponds to the reflection component [3, 11]. Design a frequency domain filter \( H(u,v) \) logarithmic image frequency domain filtering. In order to suppress the low-frequency brightness component and enhance the high-frequency reflection component, the filter H should be a high-pass filter, but can not completely suppress the low-frequency component, only suitable suppression. Therefore, the homomorphic filter generally adopts the following form:

$$ H\left( {u,v} \right) = (\gamma_{H} - \gamma_{L} )H_{hp} (u,v) + \gamma_{L} $$
(8)

which \( \gamma_{H} < 1,\gamma_{L} > 1 \) control the scope of the filter. \( H_{hp} \) usually high-pass filter, such as Gaussian high-pass filter, Butterworth high-pass filter, Laplacian filter. The filter function tends to attenuate the contribution of low frequency (illumination) while enhancing the contribution of high frequency reflection. The end result is simultaneous dynamic range compression and contrast enhancement. Figure 2 shows the cross section of the filter function.

Fig. 2.
figure 2

Cross-sectional view of the filter function

4 Experimental Comparison

The bilateral filtering effect is shown in Fig. 3.

Fig. 3.
figure 3

Bilateral filtering effect, (a) and (c) is the original, (b) and (d) is the corresponding renderings.

It can be seen from Fig. 3(a) and (b) that the bilateral filter preserves the image edge details and other information well and smoothes the edge of the image. From Fig. 3(c) and (d), there is no obvious change before and after using the bilateral filter to process the image.

The homomorphic filter effect is shown in Fig. 4.

Fig. 4.
figure 4

The homomorphic filtering effect, (a) and (c) is the original, (b) and (d) is the corresponding renderings.

It can be seen from Fig. 4(a) and (b), the original image is unevenly illuminated. After the homomorphic filtering, the gray level of the image is adjusted to eliminate the problem of uneven illumination in the image and enhance the image detail of the dark area without losing the Image details. The detail of the image has been significantly enhanced, and in line with the characteristics of human visual observation. You can see from Fig. 4(c) and (d) image processing effect contrast is very obvious, the processed image to display the image invisible part, display the details of the image features, image processing is superior to the original.

5 Conclusion

With the method of image enhancement technology, we can extract image features effectively, and make it easier for everyone to understand and recognize. This paper is going to look into the different advantages between bilateral filtering algorithm and homomorphic filtering algorithm, based on those former studies on image processing. The experiment results show that bilateral filtering algorithm can effectively maintain the image edge details and make the image smoother; homomorphic filtering algorithm can effectively adjust the gray range for uneven shading image, the image area on the image details can be increased, and as far as possible to maintain the image details of bright region. Aiming at improving the effect of image enhancement, we will devote oneself to the development of image processing in the future ceaselessly.