|Journal of New Media |
Research on Image Quality Enhancement Algorithm Using Hessian Matrix
1China Mobile Group Henan Co., Ltd., Zhengzhou, 450000, Henan, China
2Department of Information Science and Engineering, Hunan First Normal University, Changsha, 410205, Hunan, China
3Department of Information Engineering, Shaoyang University, Shaoyang, 422000, Hunan, China
*Corresponding Author: Yanpeng Wu. Email: email@example.com
Received: 09 January 2022; Accepted: 15 April 2022
Abstract: The Hessian matrix has a wide range of applications in image processing, such as edge detection, feature point detection, etc. This paper proposes an image enhancement algorithm based on the Hessian matrix. First, the Hessian matrix is obtained by convolving the derivative of the Gaussian function. Then use the Hessian matrix to enhance the linear structure in the image. Experimental results show that the method proposed in this paper has strong robustness and accuracy.
Keywords: Hessian matrix; Gaussian function; image enhancement; linear structure
Hessian matrix has a wide range of applications in image processing [1–5], such as edge detection  and feature point detection . The Hessian matrix itself also contains a lot of mathematical knowledge [8–13], such as Taylor expansion, multivariate function derivation, matrix, eigenvalues, etc.
2 Taylor Expansion and Hessian Matrix
Performing Taylor expansion on the unary function f(x) at x0, the following formula can be obtained.
Among them, the remainder is the Peano remainder, and the part of the second derivative is mapped to the two-dimensional and multi-dimensional space as the Hessian matrix.
In a two-dimensional image, assuming that the function of the image pixel value relative to the coordinates (x, y) is f(x, y), then expand f(x + dx, y + dy)) at f(x0, y0) to get as follows:
Eq. (2) is expressed by a matrix, and the remainder is discarded, then:
The second matrix in the third term on the right side of the above formula is the Hessian matrix in two-dimensional space; therefore, we conclude that the Hessian matrix is the second derivative of a certain point in the space. To summarize further, the Hessian matrix in the multidimensional space can be expressed as:
As we all know, the second derivative represents the change law of the derivative. If the function is a curve and the curve has a second derivative, then the second derivative represents the curvature of the curve. The greater the curvature, the more curved the curve. By analogy, the second derivative of a point in the multidimensional space represents the speed at which the gradient drops at that point. Taking a two-dimensional image as an example, the first-order derivative is the grayscale change of the image, that is, the grayscale gradient, and the second-order derivative is the degree of grayscale gradient change. The larger the second derivative, the larger the gray gradient change.
But in a two-dimensional image, the Hessian matrix is a two-dimensional positive definite matrix with two eigenvalues and two corresponding eigenvectors. These two eigenvalues represent the anisotropy of the image in the direction pointed by the two eigenvectors. If an ellipse is composed of eigenvectors and eigenvalues, then this ellipse marks the anisotropy of the image change. So in a two-dimensional image, what kind of structure is the most isotropic and what kind of structure is more anisotropic? Obviously, the isotropy of the circle is the strongest, and the structure with the stronger linearity is more anisotropic.
The characteristics that the eigenvalues should have are shown in Tab. 1.
3 Application of Hessian Matrix
The Hessian matrix has many applications. The ellipse formed by the eigenvalues of the matrix and the eigenvector represents the anisotropy of the image, and this anisotropic image processing is applied. Taking a two-dimensional image as an example, the point structure in the image is isotropic, while the linear structure is anisotropic. Therefore, the Hessian matrix can be used to enhance the linear structure in the image and filter out point-like structures and noise points. Similarly, it can also be used to find the point structure in the image and filter out other information.
Of course, when using the Hessian matrix, there is no need to perform Taylor expansion on the image, only the elements in the matrix need to be directly obtained. Generally, the second derivative of a digital image uses the following formula:
However, this method has poor robustness and is susceptible to interference from local signals in the image. It can even be said that this derivation method is controversial. You can also use the following formula to calculate the second derivative:
In addition to the above two expression methods, the second derivative can also be expressed in other ways. Different methods often get different values, because this method only contains the information of three points including itself. not enough. According to the linear scale space theory (LOG), the derivative of a function is equal to the convolution of the derivative of the function and the Gaussian function. The formula is as follows:
Since the Gaussian template can contain the information of all points in the surrounding rectangle, there will be no errors. Therefore, when using the image to obtain the elements in the hessian matrix, the image can be convolved with the second derivative of the Gaussian function. The second-order partial derivative formula of Gaussian function is as follows:
When writing a program, you need to convolve the image on three templates in advance to generate a “graph” of three partial derivatives, and then index the partial derivatives of the corresponding positions each time as needed.
4 Experimental Analysis
Use the algorithm in this paper to carry out an image quality enhancement experiment on a frame of ordinary pictures. Fig. 1 is the original image, and Figs. 2–5 is the enhanced image.
As can be seen from Figs. 3 and 4, the result of image processing using Hessian matrices in the yx and xy directions is that most of the linear structure in the image has been enhanced. As can be seen from Figs. 2 and 5, the result of image processing using Hessian matrices in the xx and yy directions is that most of the linear structure in the image is reduced. This result may be related to the size of the derivation window and the choice of Gaussian template variance.
This paper proposes an image enhancement algorithm based on Hessian matrix. The simulation experiment results show that the linear structure of some images is enhanced, and the linear structure of some images is weakened. The effect of linear result enhancement is related to the size of the derivation window. However, in the same image, the thickness of the linear structure is different, and the same window size cannot be applied to all windows. The multi-template method may be able to solve the above problem, that is, convolve a point with Gaussian templates of multiple scales, and then select the most anisotropic result as the output of the point.
Acknowledgement: Thanks to Hunan First Normal University for providing experimental sites and equipment.
Funding Statement: This work was supported by the key scientific research projects of the Hunan Provincial Department of Education (No.19A099, 20A102), the Educational Reform Project of the Hunan Provincial Department of Education (No.HNJG-2021-1121), the Hunan First Normal University Teaching Reform Project (No.XYS21J09), Shaoyang City Science and Technology Bureau Science and Technology Research Project (No.2020GX31), Shaoyang University Cooperation Project (No.2019HX115).
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.
|This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.|