Image enhancement method and device, electronic equipment and storage medium

By combining high-pass and low-pass filtering, and using weighted analysis graphs to distinguish high-frequency details and noise in an image, the problem of constructing an adaptive gain function is solved, and an effective combination of image detail enhancement and noise suppression is achieved.

CN121190338APending Publication Date: 2025-12-23ZHEJIANG UNIVIEW TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410803066.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to construct an adaptive gain function to distinguish between image details and noise, and it is impossible to achieve both detail enhancement and noise suppression.

Method used

The first high-frequency image is extracted by high-pass filtering. The high-frequency and low-frequency regions are distinguished by low-pass filtering and weight analysis. A weight matrix is ​​constructed for low-pass filtering to extract high-frequency detail images. The images are then enhanced by linear gain coefficients to obtain the target image.

Benefits of technology

It achieves accurate enhancement of high-frequency details in images and effective suppression of noise, simplifies the construction process of adaptive gain function, and improves the efficiency and effect of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190338A_ABST
    Figure CN121190338A_ABST
Patent Text Reader

Abstract

The invention provides an image enhancement method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a to-be-enhanced gray-scale map, and carrying out the high-pass filtering of the gray-scale map, and obtaining a first high-frequency image; performing low-pass filtering processing on the first high-frequency image according to the gray value difference of each pixel point in the first high-frequency image, and determining a second high-frequency image and a weight analysis graph; the weight analysis graph comprises a target weight value of each pixel point, and the target weight value is used for representing that the corresponding pixel point in the first high-frequency image belongs to the pixel point of a high-frequency area or belongs to the pixel point of a low-frequency area; extracting gray values corresponding to pixel points belonging to the high-frequency area in the second high-frequency image according to the weight analysis graph to obtain a third high-frequency image; and determining a target image after image enhancement according to the third high-frequency image and the grey-scale image. By adopting the technical scheme of the invention, high-frequency details and noise in the image can be distinguished more easily, so that accurate enhancement of the detail part is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of digital image processing, and in particular to an image enhancement method and device, electronic equipment and a storage medium. BACKGROUND

[0002] Digital image enhancement technology is a very important and commonly used technology in digital image processing. Digital image enhancement processing generally enhances the details or edges of the image, making the details of the digital image more prominent or the edges more clear, and the purpose is to improve the quality of the digital image. Therefore, the enhancement processing technology of the digital image is particularly important.

[0003] In related technologies, when the digital image is enhanced, the Laplace operator or the like is generally used to perform convolution processing with the original image to extract high-frequency components in the original image. Then, an adaptive gain function is constructed, and the details and noise in the high-frequency components are accurately distinguished through the adaptive gain function, and then the enhanced details and the suppressed noise are distinguished.

[0004] However, the adaptive gain function for distinguishing the details and noise in the image is difficult to construct in the above-mentioned technology, that is, the above-mentioned technology cannot take into account both the details enhancement and the noise suppression. SUMMARY

[0005] The present application provides an image enhancement method, device, electronic equipment and storage medium to solve the defect that it is difficult to construct an adaptive gain function for distinguishing details and noise in the image in the prior art, and to achieve the technical effect of more easily distinguishing high-frequency details and noise in the image, thereby achieving accurate enhancement of the details.

[0006] The present application provides an image enhancement method, comprising the following steps: Obtain a gray image to be enhanced, and perform high-pass filtering processing on the gray image to obtain a first high-frequency image corresponding to the gray image; According to the gray value difference of each pixel point in the first high-frequency image, perform low-pass filtering processing on the first high-frequency image to determine a second high-frequency image and a weight analysis image; the weight analysis image includes a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent that the corresponding pixel point in the first high-frequency image belongs to a high-frequency region or a low-frequency region; According to the target weight value of each pixel point in the weight analysis image, extract the gray value corresponding to the pixel point belonging to the high-frequency region in the second high-frequency image to obtain a third high-frequency image; According to the third high-frequency image and the gray image, determine a target image after image enhancement.

[0007] According to the image enhancement method provided by the application, the low-pass filtering processing is performed on the first high-frequency image according to the gray value difference of each pixel point in the first high-frequency image, the second high-frequency image and the weight analysis diagram are determined, and the method comprises the following steps: The filter window of the value domain filter is determined according to the preset filter radius and initial filter size; The weight matrix corresponding to the filter core of the value domain filter is determined according to the difference between the gray value of each element in the filter window and the gray value of each pixel point in the first high-frequency image; the gray value of each element is the gray value of the corresponding element at the corresponding position in the first high-frequency image, and the weight matrix comprises the filter weight value corresponding to each element in the filter window; The low-pass filtering processing is performed on the first high-frequency image by using the value domain filter, and the second high-frequency image and the weight analysis diagram are determined.

[0008] According to the image enhancement method provided by the application, each pixel point corresponds to a weight matrix; the low-pass filtering processing is performed on the first high-frequency image by using the value domain filter, the second high-frequency image and the weight analysis diagram are determined, and the method comprises the following steps: The target weight value corresponding to each pixel point is determined according to the weight matrix corresponding to each pixel point in the value domain filter, and the weight analysis diagram is determined according to the target weight value of each pixel point.

[0009] According to the image enhancement method provided by the application, the target weight value corresponding to each pixel point is determined according to the weight matrix corresponding to each pixel point in the value domain filter, and the method comprises the following steps: The mean value processing is performed on each filter weight value in the weight matrix corresponding to each pixel point, the weight mean value corresponding to each pixel point is determined, and the weight mean value of each pixel point is taken as the target weight value of the corresponding pixel point.

[0010] According to the image enhancement method provided by the application, the gray value corresponding to the pixel point belonging to the high-frequency region in the second high-frequency image is extracted according to the weight analysis diagram, and the third high-frequency image is obtained, and the method comprises the following steps: The target weight value corresponding to each pixel point in the second high-frequency image is compared with the preset weight threshold value respectively; If the target weight value of any pixel point in the second high-frequency image is less than the weight threshold value, it is determined that the any pixel point belongs to the pixel point of the high-frequency region, and the gray value corresponding to the any pixel point in the second high-frequency image is extracted, and the third high-frequency image is obtained.

[0011] According to the image enhancement method provided by the application, the target image after the image enhancement is determined according to the third high-frequency image and the gray image, and the method comprises the following steps: obtain a preset linear gain coefficient; multiply the third high-frequency image and the linear gain coefficient, and superimpose the result with the gray-scale image to obtain a target image.

[0012] According to the image enhancement method provided by the application, the method further comprises: standardize the gray-scale value of the target image according to a preset maximum gray-scale value to obtain a standardized target image.

[0013] The application further provides an image enhancement device comprising the following modules: The obtaining module is configured to obtain a gray-scale image to be enhanced, and perform high-pass filtering on the gray-scale image to obtain a first high-frequency image corresponding to the gray-scale image. The low-pass filtering module is configured to perform low-pass filtering on the first high-frequency image according to the gray-scale value difference of each pixel point in the first high-frequency image to determine a second high-frequency image and a weight analysis image; the weight analysis image comprises a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent whether the corresponding pixel point in the first high-frequency image is a pixel point in a high-frequency region or a pixel point in a low-frequency region. The extraction module is configured to extract the gray-scale value corresponding to the pixel point in the high-frequency region in the second high-frequency image according to the target weight value of each pixel point in the weight analysis image to obtain a third high-frequency image. The enhanced image determination module is configured to determine a target image after image enhancement according to the third high-frequency image and the gray-scale image.

[0014] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the program, the image enhancement method of any one of the above is realized.

[0015] The application further provides a computer readable storage medium having a computer program stored thereon; when the computer program is executed by a processor, the image enhancement method of any one of the above is realized.

[0016] The application further provides a computer program product comprising a computer program; when the computer program is executed by a processor, the image enhancement method of any one of the above is realized.

[0017] The image enhancement method, device, electronic equipment and storage medium provided by the present application, by obtaining the gray scale image to be enhanced, performing high-pass filtering processing to obtain a first high-frequency image, then performing low-pass filtering processing on the first high-frequency image according to the gray scale value difference of each pixel point in the first high-frequency image to determine a second high-frequency image and a weight analysis image, and extracting the gray scale value of the pixel point belonging to the high-frequency region in the second high-frequency image according to the target weight value of each pixel point in the weight analysis, obtaining a third high-frequency image, and obtaining the enhanced target image according to the third high-frequency image and the gray scale image; wherein the target weight value of each pixel point included in the weight analysis image is used to represent that the pixel point in the first high-frequency image belongs to a high-frequency region or a low-frequency region. In the technical solution of the present application, the low-pass filtering can be performed on the gray scale value difference of the pixel points in the denoising high-frequency image itself to obtain the weight analysis image, and then the weight analysis image is used to guide the distinction between the high-frequency details and the noise in the image. This method is more sensitive to the gray scale value change of the local image, and has more advantages in analyzing the local gray scale change degree of the image. Moreover, it is not necessary to construct an adaptive gain function to distinguish, so that the high-frequency details and the noise in the image can be distinguished more easily, and the accurate enhancement of the high-frequency detail part of the image can be realized while the noise suppression is realized. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0019] Figure 1 is one of the flowcharts of the image enhancement method provided by the embodiments of the present application.

[0020] Figure 2 is the second flowchart of the image enhancement method provided by the embodiments of the present application.

[0021] Figure 3 is the structural schematic diagram of the image enhancement device provided by the embodiments of the present application.

[0022] Figure 4 is the structural schematic diagram of the electronic equipment provided by the embodiments of the present application. DETAILED DESCRIPTION

[0023] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the embodiments of the present application.

[0024] Digital image detail enhancement technology is an important step in the field of digital image processing, and plays an important role in image detail and edge enhancement, and has important significance for improving image quality. Digital imaging systems have developed so far that digital images are not limited to visible light images, infrared thermal images, infrared remote sensing images, radar radio frequency images, X-ray images and other imaging systems, which are active in various fields such as industry, transportation and medical treatment. Compared with visible light images, images in other fields have low contrast, poor clarity, blurred edges, less detail information and high noise level, so noise suppression and detail enhancement are needed for these images.

[0025] In digital image processing, a high-pass filter can be used to extract high-frequency components of an image, such as a Sobel operator, a Laplace operator, a Prewitt operator, etc. The common characteristic of these filters is that they are sensitive to the range of values in the neighborhood. The high-frequency components of the image passing through the high-frequency filter include both the detail information of the image and the image noise. In related technologies, an adaptive gain function is usually constructed to enhance image details and edge information while suppressing noise amplification, which requires the adaptive gain function to accurately distinguish between detail information and noise. However, it is found in experiments that it is extremely difficult to construct an adaptive gain function that meets the above properties, that is, it is actually difficult to construct an adaptive gain function, thereby resulting in the inability to balance detail enhancement and noise suppression.

[0026] In one specific technology, an enhancement method of an X-ray image is proposed, in which a detail highlighting module is proposed, which uses a Laplacian operator to convolve with an original image matrix f(i,j) to extract a high-frequency component M(i,j), and the extracted high-frequency component is adaptively amplified and superimposed into the original image matrix to highlight the detail changes, and the formula is as follows: g(i,j)=f(i,j)+λM(i,j). Wherein, λ is an adaptive high-frequency adjustment factor, in the image flat area, the high-frequency component is small, λ takes a small value; in the image high-frequency area, the high-frequency component is large, λ takes a large value. According to the above characteristics, the noise amplification of the image low-frequency area can be limited while the detail information of the image is enhanced. However, the ability of the Laplacian operator to distinguish image noise and image detail information is limited, and it is difficult to design a reasonable adaptive high-frequency adjustment factor on the Laplacian high-frequency component, and such a detail enhancement algorithm usually has poor effect and cannot achieve noise suppression and detail enhancement.

[0027] Based on this, the embodiment of the present application provides an image enhancement method, device, electronic equipment and storage medium, which can solve the above technical problems.

[0028] It should be noted that the execution subject of the embodiment of the present application can be an image enhancement device, or an electronic equipment comprising the image enhancement device, or a system comprising the image enhancement device or the electronic equipment, and the following embodiments will be described taking the electronic equipment as an example.

[0029] The image enhancement method of the embodiment of the present application will be described below. Figures 1-2

[0030] Figure 1 is one of the flowcharts of the image enhancement method provided by the present application, as shown in Figure 1 The method comprises the following steps: S102, obtaining a gray-scale image to be enhanced, and performing high-pass filtering processing on the gray-scale image to obtain a first high-frequency image corresponding to the gray-scale image.

[0031] In this step, the target can be photographed in advance by an image acquisition device (such as a camera or a video camera) of an imaging system to obtain a corresponding photographed image, which can be a visible light image, an infrared thermal image, an infrared remote sensing image, a radar radio frequency image, an X-ray image, etc. In addition, the photographed image can be a digital image in any field, such as a digital image in the fields of industry, transportation, medical treatment, etc.

[0032] ​After the above photographing image is obtained, the photographing image can be preprocessed first, and if the photographing image is a visible light color image, the preprocessing can include but is not limited to black level correction, bad point correction, demosaicing, white balance correction, color correction, etc.; if the photographing image is a grayscale image, the preprocessing can include but is not limited to non-uniform correction, bad point correction, pot cover effect correction, etc. Further, if the photographing image is a visible light color image, it can generally be represented as a YUV image, wherein the Y channel is a luminance channel, and the UV two channels are chrominance channels. Generally, the Y channel image of the photographing image after preprocessing can be extracted as a grayscale image to be enhanced. If the photographing image is directly a grayscale image, the preprocessed grayscale image can be used as a grayscale image to be enhanced.

[0033] It can be understood that the above obtained grayscale image to be enhanced includes high frequency details and noise, and the high frequency details are not prominent, so the high frequency details need to be enhanced and the noise needs to be suppressed by the following embodiments. Specifically, the grayscale image to be enhanced can be first high-pass filtered. The high-pass filtering here is mainly used to extract high frequency components in the grayscale image to be enhanced, because the high frequency components are likely to be details of the image. When high-pass filtering is performed, a high-pass filter can be used for high-pass filtering. The high-pass filter here is usually implemented using an edge detection operator. The edge detection operator here can include, for example, Roberts operator, Sobel operator, Laplace operator, Prewitt operator, etc. In the present embodiment, the Laplace operator is preferably used for high-pass filtering, which can improve the efficiency of high-pass filtering.

[0034] When the Laplace operator is used for high-pass filtering, it is assumed that the Laplace operator is a filter with a filter size of 3x3, and the expression of the filter kernel M is as follows:

[0035] It is assumed that the grayscale image to be enhanced is denoted as S, and the grayscale image to be enhanced S is convolved with the filter kernel M to obtain a high frequency image, denoted as a first high frequency image H1. For a pixel point S(i,j) in the i-th row and the j-th column of the grayscale image to be enhanced S, the corresponding position of the high frequency image is denoted as H1(i,j), and the calculation method of H1(i,j) is shown in the following formula:

[0036] wherein k and l are the row and column sizes of the filter window or the row and column sizes of the filter size; S(k,l) represents the grayscale value of the element in the k-th row and the l-th column in the filter window.

[0037] The high-frequency image corresponding to each pixel point can be obtained by performing convolution processing on each pixel point in the gray-scale image to be enhanced according to the above formula, and the first high-frequency image can be obtained by combining the high-frequency images.

[0038] In S104, low-pass filtering processing is performed on the first high-frequency image according to the gray-scale value difference of each pixel point in the first high-frequency image, and a second high-frequency image and a weight analysis image are determined. The weight analysis image includes a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent whether the corresponding pixel point in the first high-frequency image belongs to a high-frequency region or a low-frequency region.

[0039] In this step, after the first high-frequency image is obtained, the gray-scale values of each pixel point in the first high-frequency image can also be obtained. Then, a low-pass filter can be constructed according to the gray-scale value difference of each pixel point, and low-pass filtering processing can be performed on the first high-frequency image to remove high-frequency noise in the first high-frequency image and obtain a second high-frequency image after noise removal. The low-pass filter constructed according to the gray-scale value difference of each pixel point can also obtain a target weight value of each pixel point. For example, the target weight value of each pixel point can be obtained by using the weight of the filter kernel in the low-pass filter (i.e., the value of the element in the filter kernel), and the target weight values of each pixel point can be combined according to the corresponding pixel positions to obtain a weight analysis image. The target weight value here can be an average weight value obtained by averaging the weights of the filter kernel, or can be a median value selected from the weights of the filter kernel as the target weight value, or can be a maximum value selected from the weights of the filter kernel as the target weight value, or can be in other ways, which are not limited here.

[0040] The target weight value of each pixel point in the weight analysis image can represent the high-frequency characteristic or low-frequency characteristic of the pixel point in the first high-frequency image, i.e., whether the pixel point belongs to a high-frequency region or a low-frequency region. The target weight values in the weight analysis image can be used to distinguish whether the pixel points in the second high-frequency image after noise removal belong to a high-frequency region or a low-frequency region. The high-frequency region is generally a region of important information such as details or edges, and the low-frequency region is generally a region of noise.

[0041] In S106, the gray-scale values corresponding to the pixel points belonging to the high-frequency region in the second high-frequency image are extracted according to the target weight values of the pixel points in the weight analysis image, and a third high-frequency image is obtained.

[0042] In this step, after the weight analysis diagram and the target weight value of each pixel point in the diagram are obtained, the pixel points belonging to the high-frequency region in the second high-frequency image can be found out according to the diagram, and then the gray value of the pixel points in the high-frequency region in the second high-frequency image is extracted to obtain an image including only the high-frequency region, which is referred to as a third high-frequency image.

[0043] The gray value of the low-frequency region of a general image changes slowly, and the high-frequency component extracted in this region is more likely to be noise. The gray value of the high-frequency region generally changes more sharply, and the high-frequency component extracted in this region is more likely to be detail and edge information. Therefore, the third high-frequency image obtained after the gray value of the high-frequency region is extracted is an image of the detail part.

[0044] Further, since the noise in the first high-frequency image is removed by the low-pass filter, and only the image of the detail part of the high-frequency region is extracted in this step, that is, the noise in the second high-frequency image is suppressed, the method of the embodiment can more easily and better distinguish the detail part and the noise part in the image, and can better suppress the noise.

[0045] S108, determining a target image after image enhancement according to the third high-frequency image and the gray image.

[0046] In this step, after the third high-frequency image including only the detail part is obtained, the third high-frequency image can be superimposed on the gray image to be enhanced to enhance the detail part, and an image after the image detail is enhanced is obtained, which is referred to as a target image. Or the pixel position of the detail part in the third high-frequency image can be used to find the pixel position of the corresponding detail part in the gray image to be enhanced, and the gray value at the pixel position in the gray image to be enhanced is enhanced (such as increasing the gray value), to obtain a target image after the detail is enhanced. Or other ways of detail enhancement can also be used, which are not limited here.

[0047] In this embodiment, the first high-frequency image is obtained by performing high-pass filtering on the gray-scale image to be enhanced, and then the second high-frequency image and the weight analysis image are obtained by performing low-pass filtering on the first high-frequency image according to the gray-scale value difference of each pixel point in the first high-frequency image, and the gray-scale value of the pixel point belonging to the high-frequency region in the second high-frequency image is extracted according to the target weight value of each pixel point in the weight analysis, and the third high-frequency image is obtained, and the enhanced target image is obtained according to the third high-frequency image and the gray-scale image; wherein the target weight value of each pixel point included in the weight analysis image is used to represent that the pixel point in the first high-frequency image belongs to a high-frequency region or a low-frequency region. In the technical scheme of the present application, the weight analysis image can be obtained by performing low-pass filtering on the gray-scale value difference of the pixel points in the denoised high-frequency image, and then the weight analysis image is used to guide the distinction between the high-frequency details and the noise in the image. This method is more sensitive to the gray-scale value change of the local image, and has more advantages in analyzing the local gray-scale change of the image. Moreover, it is not necessary to construct an adaptive gain function to distinguish, so the high-frequency details and the noise in the image can be distinguished more easily, and the noise suppression and the accurate enhancement of the high-frequency detail part of the image are realized at the same time.

[0048] The following embodiment describes the specific process of performing low-pass filtering on the first high-frequency image to obtain the second high-frequency image and the weight analysis image.

[0049] In one embodiment, the S104 described above can include the following steps: Step A1, determining the filter window of the value domain filter according to the preset filter radius and the initial filter size.

[0050] In this step, the value domain filter can also be referred to as a low-pass filter, which is mainly a low-pass filter constructed according to the difference of each pixel point in the first high-frequency image. When constructing the value domain filter, the filter kernel corresponding to the filter window of the value domain filter and the weight value of each element in the filter window need to be constructed.

[0051] First, the process of constructing the filter size of the filter window / filter kernel of the value domain filter is described. The filter window of the value domain filter can be determined by the preset filter radius and the initial filter size.

[0052] The initial filter size refers to the size of the initial filter window, which can be set according to actual conditions, such as the initial filter size being 3x3, i.e. the initial filter window being a 3x3 matrix, which includes 9 elements.

[0053] The size of the preset filter radius can be set according to actual conditions, for example, 2, 3, 4, etc. can be selected. The filter window of the value domain filter can be obtained by adding the initial filter size to the preset filter radius. For example, the preset filter radius is 2, 3, or 4, and the initial filter size is 3x3, then the filter window of the value domain filter can be 5x5, 7x7, or 9x9.

[0054] The process of constructing the weight values of each element in the filter window of the value domain filter is described below.

[0055] In step A2, the weight matrix corresponding to the filter kernel of the value domain filter is determined according to the difference between the gray value of each element in the filter window and the gray value of each pixel point in the first high-frequency image. The gray value of each element is the gray value of the corresponding element at the corresponding position in the first high-frequency image. The weight matrix includes the filter weight values corresponding to each element in the filter window.

[0056] In this step, after the filter window of the value domain filter is determined, the filter window can be corresponded to the first high-frequency image. For example, taking a certain pixel point of the first high-frequency image as an example, the position of the center pixel of the filter window coincides with the pixel position of the pixel point, then the other elements in the filter window can also be corresponded to the first high-frequency image to obtain the gray value of each element at the corresponding position in the first high-frequency image, or also called pixel value.

[0057] After the gray value of each element at the corresponding position in the first high-frequency image is determined, the gray value of the pixel point corresponding to the filter window can also be obtained. Then the difference between the gray value of each element in the filter window and the gray value of the pixel point can be calculated, and the weight value corresponding to each element in the filter window can be obtained through the difference, denoted as the filter weight value.

[0058] For example, assuming that an arbitrary image I to be filtered, the preset filter radius is r, for the pixel point of the i-th row and j-th column in the first high-frequency image, the related / corresponding filter window can be represented as {k, l | i-r≤k≤i+r, j-r≤l≤j+r}, and the filter weight value of each element in the filter window can be calculated by the following formula:

[0059] Where ω(k, l) represents the filter weight value of the element of the k-th row and l-th column in the filter window; σ represents the standard deviation, which needs to be adjusted according to the bit depth of the imaging system. For example, for an 8-bit imaging system, the value range can be [15, 25]; I(k, l) represents the gray value of the element of the k-th row and l-th column in the filter window; I(i, j) represents the gray value of the pixel point of the i-th row and j-th column in the first high-frequency image.

[0060] The filter weight value of each element in the filter window can be calculated by the above formula, and then the filter weight values of each element in the filter window form a matrix, that is, the weight matrix of the filter kernel of the value domain filter can be obtained. It can be understood that the form of the weight matrix of the filter kernel of the value domain filter is similar to the form of the filter kernel of the high-pass filter described above, and the filter weight value of each element is the value of each element.

[0061] In step A3, the first high-frequency image is processed by the value domain filter to determine the second high-frequency image and the weight analysis map.

[0062] In this step, as described above, each pixel point has a filter window / filter kernel for low-pass filtering processing of the pixel point. The weight matrix corresponding to the filter window of each pixel point can be calculated by the above calculation formula of the filter weight value, and the filter kernel corresponding to each pixel point can be obtained. That is, each pixel point corresponds to a weight matrix or a filter kernel, and the filter kernel corresponding to the pixel point with different gray values can also be different.

[0063] The value domain filter, that is, the low-pass filter, can be obtained by the above determined filter window and the filter weight value of each element in the filter window. Then, the pixel point in the first high-frequency image is processed by the weight matrix corresponding to the pixel point in the value domain filter to determine the second high-frequency image. The target weight value corresponding to each pixel point is determined according to the weight matrix corresponding to each pixel point in the value domain filter, and the weight analysis map is determined according to the target weight value of each pixel point.

[0064] Specifically, the weight matrix of the filter kernel corresponding to each pixel point in the value domain filter can be used to perform convolution processing on the corresponding pixel point in the first high-frequency image to realize low-pass filtering processing of the pixel point, that is, to filter out the high-frequency noise existing in the first high-frequency image, to realize the suppression of noise, and to obtain the high-frequency image corresponding to the pixel point. The high-frequency images of each point in the first high-frequency image are combined to obtain the second high-frequency image.

[0065] For example, for the pixel point H1(i,j) in the i-th row and j-th column of the first high-frequency image H1, the high-frequency image at the corresponding position is denoted as H2(i,j), and the calculation method of H2(i,j) is shown in the following formula:

[0066] H1(k,l) represents the gray value of the element in the k-th row and l-th column in the filter window of the first high-frequency image; and ω(k,l) represents the filter weight value of the element in the k-th row and l-th column in the filter window.

[0067] Further, for each pixel point in the first high-frequency image, an average weight value of each pixel point can be obtained through the weight matrix of the filter kernel corresponding to each pixel point in the value range filter. Alternatively, each filter weight value in the weight matrix corresponding to each pixel point can be processed by mean value to determine the weight mean value corresponding to each pixel point, and the weight mean value of each pixel point can be taken as the target weight value of the corresponding pixel point. That is, the filter weight values of each element in the filter window corresponding to each pixel point in the first high-frequency image can be summed, and the weight sum value can be processed by mean value to obtain the weight mean value, which is taken as the target weight value corresponding to the pixel point; then the target weight values of all pixel points in the first high-frequency image can be arranged according to their respective pixel positions, and thus the weight analysis map can be obtained.

[0068] For example, the target weight value of each pixel point in the first high-frequency image can be calculated by the following formula:

[0069] wherein W1(i,j) represents the target weight value of the element in the i-th row and the j-th column in the first high-frequency image; and ω(k,l) represents the filter weight value of the element in the k-th row and the l-th column in the filter window.

[0070] The target weight value of each pixel point in the first high-frequency image can be calculated by the above formula.

[0071] As can be seen from the above description, the value range filter constructed in the embodiment is a filter in which the filter kernel weight matrix is determined according to the size of the difference between the image gray values, which can better reflect the trend of the value change in the filter, i.e. more sensitive to the value change, so that it can be more conducive to distinguish noise from image details and edges.

[0072] In this embodiment, the filter window of the value range filter and the weight matrix of the filter core are constructed by the gray value difference of each pixel point in the first high-frequency image. The value range filter constructed in this way is determined by the gray value change / difference of the first high-frequency image itself, and thus the value range filter constructed is more sensitive to the local numerical change of the first high-frequency image, thereby being more advantageous in analyzing the local gray value change of the image, that is, the detail part and the noise part in the first high-frequency image can be more easily distinguished; at the same time, the high-frequency noise in the first high-frequency image can be further suppressed through low-pass filtering, thereby the accuracy of the detail part obtained subsequently can be improved. In addition, the pixel points in the first high-frequency image are low-pass filtered one by one through the weight matrix of the filter core of the constructed value range filter to obtain the second high-frequency image, so that the noise suppression and detail enhancement in the image can be taken into account. Further, the target weight value of the corresponding pixel point is determined by the mean value of the filter weight values of each element in the weight matrix, so that the degree of change of the gray value within the filter window of each pixel point can be better expressed, thereby the image noise amplification can be limited to the maximum extent while the detail information of the image is enhanced.

[0073] The following embodiment describes the specific process of extracting the gray value of the high-frequency region through the target weight value in the weight analysis map.

[0074] In one embodiment, the above S106 can include the following steps: Step B1, comparing the target weight value of each pixel point in the second high-frequency image with the preset weight threshold value respectively.

[0075] The preset weight threshold value can be set according to the actual situation, for example, its value range can be [0.3, 0.7].

[0076] In this step, the degree of change of the gray value of each pixel point in the second high-frequency image is inversely proportional to the target weight value of the pixel point in the weight analysis map, that is, the more intense the change of the gray value of the pixel point in the second high-frequency image, the smaller the corresponding target weight value. The gray value of the low-frequency region of the image changes slowly, and the high-frequency component extracted in this region is more likely to be noise; the gray value of the high-frequency region changes rapidly, and the high-frequency component extracted in this region is more likely to be detail and edge information. Based on this, a suitable weight threshold value can be set in this embodiment to distinguish the high-frequency region and the low-frequency region in the second high-frequency image.

[0077] Specifically, after obtaining the weight analysis map, the target weight value of each pixel point in the second high-frequency image is obtained, and then the target weight value of each pixel point can be compared with the preset weight threshold value respectively, that is, whether the target weight value of each pixel point is less than the weight threshold value is judged.

[0078] Step B2, if the target weight value of any pixel point in the second high frequency image is less than the weight threshold, it is determined that the pixel point belongs to the pixel point of the high frequency region, and the corresponding gray value of any pixel point in the second high frequency image is extracted to obtain the third high frequency image.

[0079] In this step, by judging whether the target weight value of each pixel point is less than the weight threshold, the judgment result of each pixel point can be obtained. Assuming that the judgment result of a certain pixel point in the second high frequency image is that the target weight value of the pixel point is less than the weight threshold, it means that the gray value around the pixel point changes sharply, and the pixel point belongs to the pixel point of the high frequency region in the second high frequency image. In this way, all the pixel points with target weight value less than the weight threshold in the second high frequency image can be obtained, and the gray value of these pixel points in the second high frequency image is extracted to obtain the high frequency image of the detail part, which is recorded as the third high frequency image.

[0080] Alternatively, the third high frequency image can be obtained by filling the corresponding gray value of any pixel point in the second high frequency image into the corresponding pixel position of the preset image to obtain the third high frequency image; the size of the preset image is the same as that of the second high frequency image. Or, the gray value of the pixel point with target weight value not less than (greater than or equal to) the weight threshold in the second high frequency image is removed to obtain the third high frequency image.

[0081] In addition, if the judgment result of a certain pixel point in the second high frequency image is that the target weight value of the pixel point is not less than (greater than or equal to) the weight threshold, it means that the gray value around the pixel point changes gently, and the pixel point belongs to the pixel point of the low frequency region in the second high frequency image.

[0082] For example, the third high frequency image can be extracted by the following formula:

[0083] Wherein, H3(i,j) represents the gray value of the pixel point of the i-th row and the j-th column in the third high frequency image; H2(i,j) represents the gray value of the pixel point of the i-th row and the j-th column in the second high frequency image; W(i,j) represents the target weight value of the pixel point of the i-th row and the j-th column; τ W represents the weight threshold.

[0084] It can be seen that the pixel point with target weight value less than the weight threshold in the second high frequency image is the pixel point of the high frequency region, and its gray value needs to be retained in the third high frequency image, and the pixel point with target weight value greater than or equal to the weight threshold in the second high frequency image is the pixel point of the low frequency region, and the gray value in the third high frequency image is 0, that is, the pixel point of the low frequency region is removed, and the third high frequency image with only high frequency details is obtained.

[0085] In the embodiment, the target weight value of each pixel point in the second high-frequency image is compared with the weight threshold value to distinguish the pixel points in the high-frequency region or the low-frequency region, and the gray value of the pixel point in the high-frequency region is extracted to obtain the high-frequency image of the detail part. The method is simple and intuitive, and thus the detail part and the noise part in the second high-frequency image can be distinguished more easily and quickly.

[0086] The following embodiment describes the specific process of obtaining the enhanced target image through the gray image and the third high-frequency image.

[0087] In one embodiment, the S108 described above can include the following steps: Step C1, obtaining a preset linear gain coefficient.

[0088] The linear gain coefficient is mainly used to enhance the detail part in the image, and can be preset or adjusted according to the user's demand.

[0089] The value range of the linear gain coefficient can be, for example, [0.2, 2]. The user can select the required value in the value range and input it into the electronic device, so that the electronic device can obtain the preset linear gain coefficient, and display the enhanced detail image according to the selected linear gain coefficient. At the same time, the user can also change the value of the linear gain coefficient according to the demand to display the enhanced detail image with the required effect. Or the electronic device can select a default value from the above value range as the preset linear gain coefficient.

[0090] Step C2, multiplying the third high-frequency image and the linear gain coefficient and superimposing the gray image to obtain a target image.

[0091] In this step, after obtaining the preset linear gain coefficient, the third high-frequency image of the extracted high-frequency detail part can be multiplied by the linear gain coefficient and then superimposed into the gray image to be enhanced to obtain the target image with enhanced detail part.

[0092] For example, the target image can be obtained by the following formula: D(i, j) = S(i, j) + a H3(i, j).

[0093] Wherein, D(i, j) represents the gray value of the pixel point in the i-th row and the j-th column of the target image; H3 represents the third high-frequency image; a represents the linear gain coefficient; by multiplying the third high-frequency image by the linear gain coefficient and then superimposing it into the original gray image to be enhanced, the target image with enhanced detail part can be obtained.

[0094] In the embodiment, the high-frequency image of the detail part is multiplied by the linear gain coefficient and then superimposed into the gray image to be enhanced to obtain the target image with the enhanced detail part, so that the image detail part can be enhanced while the noise is suppressed. Meanwhile, the linear gain coefficient can be set according to the user demand, so that the personalized detail enhancement effect can be presented to the user.

[0095] After the gray image to be enhanced is enhanced to obtain the target image, illegal gray values, including negative values and values exceeding the maximum value of the system (the maximum gray value supported by the electronic device), can exist in the target image, so that the enhanced image finally displayed on the electronic device does not meet the requirements. Based on this, the enhanced target image needs to be standardized to limit the gray values in the target image within a certain range. The following embodiment describes the specific process of standardizing the target image.

[0096] Figure 2 is a second flowchart of the image enhancement method provided by the embodiment of the present application, as shown in Figure 2 The method can further include the following steps: S202, standardizing the gray values of the target image according to the preset maximum gray value to obtain the target image after the standardization.

[0097] The preset maximum gray value is the maximum gray value supported by the electronic device, and the target image can be standardized by using the following formula:

[0098] D' represents the target image after the standardization; D represents the target image; min(D) represents the minimum value / minimum gray value in the target image D; max(D) represents the maximum value / maximum gray value in the target image D; and MAX represents the maximum gray value supported by the electronic device.

[0099] In the embodiment, the target image after the detail enhancement is standardized, so that the problem of data overflow can be avoided, and the detail enhanced image finally displayed is more in line with the actual situation.

[0100] As known from the description of the above embodiments, the gray image to be enhanced / source image in the embodiment of the present application is filtered by the low-pass filter / value range filter constructed after the high-pass filter to filter part of the noise in the high-frequency component, and the high-frequency and low-frequency regions are distinguished by the weight analysis diagram of the value range filter, so that the effective details are further extracted from the denoised high-frequency component.

[0101] It can be seen that the technical scheme of the embodiment of the present application has the following technical effects: Different from filtering the high-frequency image using the bilateral filter, the technical scheme of the embodiment of the application uses a low-pass filter / value range filter which depends entirely on the numerical change to determine the filter weight. When the bilateral filter acts on a natural image, the edge-preserving performance can be fully exerted, and the noise in the flat area can be filtered. However, when the bilateral filter acts on the high-frequency image filtered by the high-frequency filter, the strong spatial filtering performance of the bilateral filter will weaken the sensitivity of the low-pass filter to the numerical change, thereby making it difficult for the bilateral filter to distinguish the image details and the noise, and increasing the difficulty in designing the adaptive high-frequency adjustment factor. Different from the bilateral filter, the weight matrix of the filter kernel of the value range filter in the technical scheme of the embodiment of the application is determined only by the difference between the gray values of the pixel points in the image, and therefore the value range filter is more sensitive to the numerical change in the local image, and has more advantages in analyzing the degree of the local gray change of the image, that is, it is easier to distinguish the details and the noise in the high-frequency image.

[0102] Meanwhile, it is found through experiments that, in the calculation of the value range filter, the average value of the weight matrix of the filter window corresponding to each pixel point can be well used to express the degree of the numerical / gray value change in the window. If there is no gray change in the filter window, it can be known from the foregoing filter weight value calculation formula and the target weight value calculation formula that the average weight value / target weight value of the pixel point is the maximum value 1. Conversely, if there is a sharp numerical / gray value change in the filter window, the exponential part in the filter weight value calculation formula will rapidly decrease, resulting in the decrease of the weight value, and further resulting in the decrease of the average weight value / target weight value. Therefore, when the pixel point is at the image detail or the edge, the average weight value / target weight value will rapidly decrease. The average weight value corresponding to each pixel point can constitute a weight analysis map, and by using the above numerical relationship, the weight threshold value can be set to distinguish the low-frequency area and the high-frequency area in the denoised high-frequency image, the high-frequency area part in the denoised high-frequency image is reserved as the effective details, and then the fixed linear gain is superimposed into the source image, so that the image noise amplification can be limited to the maximum extent while the image detail information is enhanced, and the purpose of giving consideration to the image detail enhancement and the noise suppression is achieved.

[0103] The image enhancement device provided by the application is described below, and the image enhancement device described below can be correspondingly referred to the image enhancement method described above.

[0104] Figure 3 FIG. 1 is a structural schematic diagram of the image enhancement device provided by the embodiment of the application, as shown in the figure, the device can include the following modules: Figure 3 The acquisition module 310 is configured to acquire a gray image to be enhanced, and perform high-pass filtering processing on the gray image to obtain a first high-frequency image corresponding to the gray image. ​The low-pass filtering module 320 is configured to perform low-pass filtering processing on the first high-frequency image according to a difference between a gray value of each pixel point in the first high-frequency image, to determine a second high-frequency image and a weight analysis graph; the weight analysis graph includes a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent that the corresponding pixel point in the first high-frequency image is a pixel point in a high-frequency region or a pixel point in a low-frequency region. The extraction module 330 is configured to extract a gray value corresponding to a pixel point in a high-frequency region in the second high-frequency image according to the target weight value of each pixel point in the weight analysis graph, to obtain a third high-frequency image. The enhanced image determination module 340 is configured to determine a target image after image enhancement according to the third high-frequency image and the gray image.

[0105] In one embodiment, the low-pass filtering module 320 is specifically configured to

[0106] determine a filter window of the value domain filter according to the preset filter radius and the initial filter size; determine a weight matrix corresponding to a filter core of the value domain filter according to a difference between a gray value of each element in the filter window and a gray value of each pixel point in the first high-frequency image; the gray value of each element is a gray value of a corresponding element at a corresponding position in the first high-frequency image, and the weight matrix includes a filter weight value corresponding to each element in the filter window; and perform low-pass filtering processing on the first high-frequency image by using the value domain filter, to determine the second high-frequency image and the weight analysis graph.

[0107] Optionally, each pixel point corresponds to a weight matrix; and the low-pass filtering module 320 is specifically configured to

[0108] for each pixel point in the first high-frequency image, perform low-pass filtering processing on the pixel point by using a weight matrix corresponding to the pixel point in the value domain filter, to determine the second high-frequency image; determine a target weight value corresponding to each pixel point according to the weight matrix corresponding to each pixel point in the value domain filter, and determine the weight analysis graph according to the target weight value of each pixel point.

[0109] Optionally, the low-pass filtering module 320 is specifically configured to

[0110] perform mean value processing on each filter weight value in the weight matrix corresponding to each pixel point, to determine a weight mean value corresponding to each pixel point, and take the weight mean value of each pixel point as the target weight value of the corresponding pixel point.

[0111] In one embodiment, the extraction module 330 is specifically configured to

[0112] The target weight value corresponding to each pixel point in the second high-frequency image is compared with a preset weight threshold value; if the target weight value of any pixel point in the second high-frequency image is less than the weight threshold value, it is determined that the any pixel point belongs to a pixel point in a high-frequency region, and the corresponding gray value of the any pixel point in the second high-frequency image is extracted to obtain a third high-frequency image.

[0113] In one embodiment, the above-mentioned enhanced image determination module 340 is specifically configured to

[0114] A preset linear gain coefficient is obtained; the third high-frequency image is multiplied by the linear gain coefficient and then superimposed with the gray image to obtain a target image.

[0115] In one embodiment, the above-mentioned device can further include: A standardization processing module is configured to perform standardization processing on the gray value of the target image according to a preset maximum gray value to obtain a standardized target image.

[0116] It should be noted that the above-mentioned device provided by the embodiments of the present application can realize all the method steps realized by the method embodiments and achieve the same technical effects, and therefore the same parts and beneficial effects of the method embodiments will not be described in detail.

[0117] Figure 4 An example of a schematic diagram of the physical structure of an electronic device is shown in FIG. 1. Figure 4 As shown in FIG. 1, the electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 can complete mutual communication through the communications bus 440. The processor 410 can invoke a logical instruction in the memory 430 to execute an image enhancement method, which includes: obtaining a gray image to be enhanced, and performing high-pass filtering processing on the gray image to obtain a first high-frequency image corresponding to the gray image; performing low-pass filtering processing on the first high-frequency image according to the gray value difference of each pixel point in the first high-frequency image to determine a second high-frequency image and a weight analysis diagram; the weight analysis diagram includes a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent that the corresponding pixel point in the first high-frequency image belongs to a pixel point in a high-frequency region or a pixel point in a low-frequency region; extracting the gray value corresponding to the pixel point in the high-frequency region in the second high-frequency image according to the target weight value of each pixel point in the weight analysis diagram to obtain a third high-frequency image; and determining a target image after image enhancement according to the third high-frequency image and the gray image.

[0118] In addition, the logic instructions in the memory 430 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0119] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a computer readable storage medium, and the computer program can be executed by a processor to enable a computer to execute the image enhancement method provided by the above-mentioned method, which comprises: acquiring a gray-scale image to be enhanced, and performing high-pass filtering processing on the gray-scale image to obtain a first high-frequency image corresponding to the gray-scale image; performing low-pass filtering processing on the first high-frequency image according to the gray-scale value difference of each pixel point in the first high-frequency image to determine a second high-frequency image and a weight analysis image; the weight analysis image comprises a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent that the corresponding pixel point in the first high-frequency image belongs to a high-frequency region or a low-frequency region; extracting the gray-scale value corresponding to the pixel point belonging to the high-frequency region in the second high-frequency image according to the target weight value of each pixel point in the weight analysis image to obtain a third high-frequency image; and determining a target image after image enhancement according to the third high-frequency image and the gray-scale image.

[0120] In yet another aspect, the present application also provides a computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the image enhancement method provided by the above method, and the method comprises: acquiring a gray-scale image to be enhanced, and performing high-pass filtering processing on the gray-scale image to obtain a first high-frequency image corresponding to the gray-scale image; performing low-pass filtering processing on the first high-frequency image according to the gray-scale value difference of each pixel point in the first high-frequency image to determine a second high-frequency image and a weight analysis image; the weight analysis image includes a target weight value of each pixel point in the first high-frequency image, and the target weight value is used to represent that the corresponding pixel point in the first high-frequency image is a pixel point in a high-frequency region or a pixel point in a low-frequency region; extracting the gray-scale value corresponding to the pixel point in the high-frequency region in the second high-frequency image according to the target weight value of each pixel point in the weight analysis image to obtain a third high-frequency image; and determining a target image after image enhancement according to the third high-frequency image and the gray-scale image.

[0121] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0122] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary general hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0123] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An image enhancement method, characterized in that, include: Obtain the grayscale image to be enhanced, and perform high-pass filtering on the grayscale image to obtain the first high-frequency image corresponding to the grayscale image; The first high-frequency image is subjected to low-pass filtering based on the difference in grayscale values ​​of each pixel in the first high-frequency image to determine the second high-frequency image and the weight analysis map; the weight analysis map includes the target weight value of each pixel in the first high-frequency image, and the target weight value is used to characterize whether the corresponding pixel in the first high-frequency image belongs to the high-frequency region or the low-frequency region. Based on the target weight value of each pixel in the weight analysis diagram, the gray value corresponding to the pixel in the high-frequency region in the second high-frequency image is extracted to obtain the third high-frequency image; Based on the third high-frequency image and the grayscale image, the target image after image enhancement is determined.

2. The image enhancement method according to claim 1, characterized in that, The step of performing low-pass filtering on the first high-frequency image based on the grayscale value differences of each pixel in the first high-frequency image to determine the second high-frequency image and the weight analysis map includes: The filtering window of the range filter is determined based on the preset filtering radius and initial filtering size. The weight matrix corresponding to the filtering kernel of the value range filter is determined based on the difference between the gray values ​​of each element in the filtering window and the gray values ​​of each pixel in the first high-frequency image; the gray value of each element is the gray value of the corresponding element at the corresponding position in the first high-frequency image, and the weight matrix includes the filtering weight value corresponding to each element in the filtering window. The first high-frequency image is low-pass filtered using the value range filter to determine the second high-frequency image and the weight analysis map.

3. The image enhancement method according to claim 2, characterized in that, Each pixel corresponds to a weight matrix; the step of using the value range filter to perform low-pass filtering on the first high-frequency image to determine the second high-frequency image and the weight analysis map includes: For each pixel in the first high-frequency image, the pixel is low-pass filtered using the weight matrix corresponding to the pixel in the value range filter to determine the second high-frequency image; Based on the weight matrix corresponding to each pixel in the value range filter, the target weight value corresponding to each pixel is determined, and the weight analysis map is determined based on the target weight value of each pixel.

4. The image enhancement method according to claim 3, characterized in that, The step of determining the target weight value corresponding to each pixel based on the weight matrix corresponding to each pixel in the value range filter includes: The average value of each filter weight in the weight matrix corresponding to each pixel is processed to determine the average weight value corresponding to each pixel, and the average weight value of each pixel is used as the target weight value of the corresponding pixel.

5. The image enhancement method according to any one of claims 1 to 4, characterized in that, The step of extracting the gray values ​​corresponding to pixels belonging to the high-frequency region in the second high-frequency image according to the weight analysis map to obtain the third high-frequency image includes: The target weight value corresponding to each pixel in the second high-frequency image is compared with a preset weight threshold. If the target weight value of any pixel in the second high-frequency image is less than the weight threshold, then the pixel is determined to be a pixel in the high-frequency region, and the gray value corresponding to the pixel in the second high-frequency image is extracted to obtain the third high-frequency image.

6. The image enhancement method according to any one of claims 1 to 4, characterized in that, The step of determining the enhanced target image based on the third high-frequency image and the grayscale image includes: Obtain the preset linear gain coefficient; The target image is obtained by multiplying the third high-frequency image and the linear gain coefficient, and then superimposing them on the grayscale image.

7. The image enhancement method according to any one of claims 1 to 4, characterized in that, The method further includes: The grayscale values ​​of the target image are standardized according to the preset maximum grayscale value to obtain the standardized target image.

8. An image enhancement device, characterized in that, include: The acquisition module is used to acquire the grayscale image to be enhanced and perform high-pass filtering on the grayscale image to obtain the first high-frequency image corresponding to the grayscale image; The low-pass filtering module is used to perform low-pass filtering on the first high-frequency image based on the difference in grayscale values ​​of each pixel in the first high-frequency image, and to determine the second high-frequency image and the weight analysis map; the weight analysis map includes the target weight value of each pixel in the first high-frequency image, and the target weight value is used to characterize whether the corresponding pixel in the first high-frequency image belongs to the high-frequency region or the low-frequency region. The extraction module is used to extract the gray values ​​corresponding to the pixels belonging to the high-frequency region in the second high-frequency image according to the target weight values ​​of each pixel in the weight analysis map, so as to obtain the third high-frequency image. An enhanced image determination module is used to determine the target image after image enhancement based on the third high-frequency image and the grayscale image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the image enhancement method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the image enhancement method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image enhancement method and device thereof as well as image low frequency component computing method and device thereof

    CN101706954A

  • Image denoising method

    CN106056555A

  • An image enhancement method and apparatus

    CN106228520A

  • An edge protection denoising method

    CN109377450A

  • Low-illumination image enhancement optimization method based on frame accumulation and multi-scale Retinex

    CN111986120A