A method, apparatus and electronic device for image enhancement
By generating and fusing target low-frequency and high-frequency images, the problem of insufficient noise suppression in existing medical image enhancement methods is solved, achieving high-quality image enhancement results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI ELECTRIC GROUP MEDICAL EQUIPMENT CO LTD
- Filing Date
- 2022-09-22
- Publication Date
- 2026-06-26
AI Technical Summary
Existing medical image enhancement methods cannot effectively suppress noise while enhancing images, and the selection of filter parameters depends on experience, which cannot effectively solve the problem of noisy enhanced images.
By identifying the target low-frequency image and the target high-frequency image of the image to be processed, the noise in the original high-frequency image is removed, and the target high-frequency image with virtually no noise is generated by normal distribution fitting and gradient vector field optimization. Finally, image fusion is performed to achieve enhancement.
It effectively suppresses noise in enhanced images, reduces the impact of noise, improves the visual quality of images, and solves the problem of noise in enhanced images.
Smart Images

Figure CN115471421B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to an image enhancement method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Medical image enhancement refers to further processing of acquired medical images. Its purpose is to highlight certain features and improve image quality, thereby aiding in image display and final clinical diagnosis and analysis. Image enhancement can be categorized into spatial domain enhancement and frequency domain enhancement based on different implementation methods. Image edges and details typically carry a large portion of the feature information and are crucial for identifying objects in an image. Therefore, enhancing image edges and details is of significant research importance for medical image processing and its clinical applications.
[0003] For magnetic resonance imaging (MRI) images, existing image enhancement methods typically employ the unsharp masking method. This method filters the original image to obtain a low-frequency image, performs point-by-point subtraction between the low-frequency image and the original image to obtain a high-frequency image, enhances the high-frequency image using linear or nonlinear curves, and finally adds the enhanced high-frequency image to the original image to obtain the final enhanced image. However, because clinical MRI images contain noise during acquisition, the aforementioned enhancement methods, while enhancing the image, also make the noise more noticeable.
[0004] Currently, noise can be suppressed by designing filters during filtering. However, the relationship between the filter parameters required for filter selection and the original medical image is uncertain, which means that filter selection can only be based on experience and cannot effectively solve the problem of noise in enhanced images. Summary of the Invention
[0005] To address the existing technical problems, embodiments of the present invention provide an image enhancement method, apparatus, electronic device, and computer-readable storage medium.
[0006] In a first aspect, embodiments of the present invention provide an image enhancement method, comprising:
[0007] Obtain the image to be enhanced;
[0008] Determine the target low-frequency image of the image to be processed;
[0009] Determine the original high-frequency image of the image to be processed, remove the noise portion from the original high-frequency image, and generate the target high-frequency image of the image to be processed;
[0010] The target low-frequency image and the target high-frequency image are fused to generate an enhanced image.
[0011] In one possible implementation, removing noise from the original high-frequency image to generate the target high-frequency image of the image to be processed includes:
[0012] Determine the truncation threshold used to distinguish high-frequency information and noise components in the original high-frequency image;
[0013] The target high-frequency image is generated by removing the noise portion from the original high-frequency image based on the truncation threshold.
[0014] In one possible implementation, determining the truncation threshold for distinguishing high-frequency information and noise in the original high-frequency image includes:
[0015] Determine the histogram of the original high-frequency image;
[0016] The histogram is fitted with a normal distribution to determine multiple normal distributions corresponding to the histogram; the multiple superimposed normal distributions are used to represent the distribution of the histogram.
[0017] Determine the standard deviation for each of the stated normal distributions;
[0018] The standard deviations of the multiple normal distributions are weighted to determine the cutoff threshold.
[0019] In one possible implementation, the cutoff threshold satisfies:
[0020] ;
[0021] Where Th represents the cutoff threshold, m represents the number of normal distributions, and S i w represents the standard deviation of the i-th normal distribution. i Let a represent the weights of the i-th normal distribution, and the sum of all weights is 1; i Let a represent the adjustment coefficient for the i-th normal distribution, and a i With S i The two are negatively correlated.
[0022] In one possible implementation, the number of normal distributions is two, and the cutoff threshold Th satisfies:
[0023] ;
[0024] Among them, S1 represents the standard deviation of the first normal distribution, S2 represents the standard deviation of the second normal distribution, a1 is a preset adjustment coefficient, w1 represents the weight corresponding to the first normal distribution, and w2 represents the weight corresponding to the second normal distribution; S1 < S2 and a1 > 1.
[0025] In a possible implementation, determining the target low-frequency image of the image to be processed includes:
[0026] Performing low-pass filtering on the image to be processed to determine the original low-frequency image of the image to be processed;
[0027] Performing optimization processing on the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image.
[0028] In a possible implementation, the performing optimization processing on the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image includes:
[0029] Generating a target gradient vector field according to the gradient vector field of the original low-frequency image, where the target gradient vector field is used to restore the low-frequency information in the original low-frequency image;
[0030] Determining a target low-frequency image based on the target gradient vector, where the gradient vector field of the target low-frequency image matches the target gradient vector field.
[0031] In a possible implementation, the generating a target gradient vector field according to the gradient vector field of the original low-frequency image includes:
[0032] Determining a target gradient vector field that is closer to the real one than the gradient vector field of the original low-frequency image by optimizing a first function, where the first function satisfies:
[0033] ;
[0034] Among them, G represents the first function, n represents the target gradient vector field, n0 represents the gradient vector field of the original low-frequency image, α represents a preset balance coefficient, and p represents a point on the image plane.
[0035] In a possible implementation, the target low-frequency image approaches the original low-frequency image, and the gradient vector field of the target low-frequency image approaches the target gradient vector field.
[0036] In a possible implementation, the determining a target low-frequency image based on the target gradient vector includes:
[0037] Determining a target low-frequency image by optimizing a second function related to the target gradient vector, where the second function satisfies:
[0038] ;
[0039] Among them, I L The second function is represented by u, where u represents the target low-frequency image, and f represents the original low-frequency image; u x u y G represents the components of the gradient vector field of the target low-frequency image in the x and y directions, respectively. x G y λ represents the components of the target gradient vector field in the x and y directions, λ represents the preset balance coefficient, and p represents a point on the image plane.
[0040] In one possible implementation, fusing the target low-frequency image and the target high-frequency image includes:
[0041] Enhancement processing of the target high-frequency image is performed based on the unit decomposition function;
[0042] The target low-frequency image and the enhanced target high-frequency image are fused together.
[0043] In one possible implementation, the degree of decline of the unit decomposition function is negatively correlated with the rate of change of the critical visible deviation.
[0044] Secondly, embodiments of the present invention also provide an image enhancement apparatus, comprising:
[0045] The acquisition module is used to acquire the image to be enhanced.
[0046] The low-frequency processing module is used to determine the target low-frequency image of the image to be processed;
[0047] A high-frequency processing module is used to determine the original high-frequency image of the image to be processed, remove the noise portion from the original high-frequency image, and generate a target high-frequency image of the image to be processed.
[0048] The fusion module is used to fuse the target low-frequency image and the target high-frequency image to generate an enhanced image.
[0049] Thirdly, embodiments of the present invention provide an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are connected via the bus. When the computer program is executed by the processor, it implements the steps of the image enhancement method described in any of the above-mentioned embodiments.
[0050] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the image enhancement method described in any of the preceding claims.
[0051] The image enhancement method, apparatus, electronic device, and computer-readable storage medium provided in this invention, after obtaining the original high-frequency image of the image to be processed, further process the original high-frequency image to remove noise components, thereby generating a target high-frequency image that basically does not contain noise. This process can suppress noise in the target high-frequency image, resulting in a low noise level and reducing the impact of noise. Furthermore, the noise in the target high-frequency image is not amplified when the target high-frequency image is fused. Moreover, when fusing the target low-frequency image and the target high-frequency image, image enhancement is achieved by fusing them, which can effectively suppress noise in the resulting enhanced image and effectively solve the problem of noise in the enhanced image. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the accompanying drawings used in the embodiments of the present invention or the background art will be described below.
[0053] Figure 1 A flowchart of an image enhancement method provided by an embodiment of the present invention is shown;
[0054] Figure 2 A detailed flowchart of an image enhancement method provided by an embodiment of the present invention is shown;
[0055] Figure 3 A schematic diagram of the structure of an image enhancement device provided in an embodiment of the present invention is shown;
[0056] Figure 4 A schematic diagram of an electronic device for performing an image enhancement method according to an embodiment of the present invention is shown. Detailed Implementation
[0057] The embodiments of the present invention will now be described with reference to the accompanying drawings.
[0058] Figure 1 A flowchart illustrating an image enhancement method provided by an embodiment of the present invention is shown. Figure 1 As shown, the method includes:
[0059] Step 101: Obtain the image to be enhanced.
[0060] In this embodiment of the invention, the image to be processed is an image that needs to be enhanced, which can be a medical image, such as an MRI image. The directly acquired original image can be preprocessed to generate a high-quality image to be processed. For example, the preprocessing can include deformation correction, image denoising, and image restoration. Preprocessing ensures that the image to be enhanced can restore the original image as much as possible, resulting in a final enhanced image with good visual quality.
[0061] Step 102: Determine the target low-frequency image of the image to be processed.
[0062] In this embodiment of the invention, the target low-frequency image is an image containing low-frequency information from the image to be processed. Specifically, the low-frequency image of the image to be processed can be obtained using existing mature methods, and this low-frequency image can be used as the target low-frequency image. For example, a traditional low-pass filtering method can be used to perform low-pass filtering on the image to be processed to obtain a low-frequency image containing the low-frequency information of the image to be processed, and this image can be used as the target low-frequency image. Alternatively, other methods can be used to obtain the target low-frequency image, and this embodiment does not limit this method.
[0063] Step 103: Determine the original high-frequency image of the image to be processed, remove the noise from the original high-frequency image, and generate the target high-frequency image of the image to be processed.
[0064] In this embodiment of the invention, the high-frequency image of the image to be processed can be obtained based on existing mature methods, and the high-frequency image can be used as the original high-frequency image; for example, after determining the target low-frequency image, the image to be processed is subtracted from the target low-frequency image, that is, the difference between the two is calculated point by point, so as to obtain a high-frequency image that retains the high-frequency components, and the high-frequency image can be used as the original high-frequency image.
[0065] In this embodiment of the invention, although the original high-frequency image mainly contains high-frequency information of the image to be processed, the inventors discovered that the original high-frequency image still contains noise. Compared to the normal and useful information (high-frequency information) in the original high-frequency image, this noise affects the image fusion effect. To reduce the impact of this noise, this embodiment of the invention further processes the original high-frequency image to remove the noise, thereby generating a target high-frequency image that is essentially free of noise. This target high-frequency image mainly contains the high-frequency information of the image to be processed and has relatively low noise.
[0066] Step 104: Fuse the target low-frequency image and the target high-frequency image to generate an enhanced image.
[0067] In this embodiment of the invention, target low-frequency images and target high-frequency images are fused to achieve image enhancement, thereby obtaining an enhanced image, which can be displayed to the user. During the fusion of the target low-frequency and high-frequency images, corresponding enhancement levels can be set; for example, different enhancement levels can be set for the target low-frequency and target high-frequency images respectively. Generally, the target high-frequency image represents the high-detail region of the image, and its enhancement level is greater; alternatively, low frequencies may not be enhanced, i.e., only the target high-frequency image needs to be enhanced. Furthermore, different enhancement levels can also be set for different locations within the same target high-frequency image, depending on the specific circumstances.
[0068] This invention provides an image enhancement method that, after obtaining the original high-frequency image of the image to be processed, further processes the original high-frequency image to remove noise components, thereby generating a target high-frequency image that is essentially free of noise. This method suppresses noise in the target high-frequency image, resulting in a low noise level and reducing its impact. Furthermore, the method does not amplify noise in the target high-frequency image during image fusion. Additionally, by fusing the target low-frequency image and the target high-frequency image during image fusion, image enhancement is achieved, effectively suppressing noise in the resulting enhanced image and thus effectively solving the problem of noise in the enhanced image.
[0069] Based on the above embodiments, step 102, "determining the target low-frequency image of the image to be processed", may specifically include the following steps A1-A2.
[0070] Step A1: Perform low-pass filtering on the image to be processed to determine the original low-frequency image of the image to be processed.
[0071] In this embodiment of the invention, a traditional low-pass filtering method can be used to perform low-pass filtering on the image to be processed, so as to obtain a low-frequency image containing the low-frequency information of the image to be processed, i.e., the original low-frequency image. Optionally, low-pass filtering can be implemented based on a Gaussian filter. For example, the image to be processed can be represented by grayscale, and a Gaussian smoothing operator can be used to perform low-pass filtering on the image to be processed.
[0072] Step A2: Optimize the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image.
[0073] In this embodiment of the invention, the original low-frequency image is a low-frequency image obtained based on a traditional low-pass filtering method, but this original low-frequency image still contains noise. This embodiment of the invention optimizes this original low-frequency image, resulting in a target low-frequency image that is superior to the original low-frequency image. This optimization effectively reduces the impact of noise in the low-frequency image and can eliminate artifacts to a certain extent. For example, the optimized target low-frequency image is smoother than the original low-frequency image.
[0074] If the target low-frequency image is generated by optimizing the original low-frequency image, then in step 103 above, the original high-frequency image can also be obtained based on the original low-frequency image. For example, after determining the original low-frequency image, the image to be processed is subtracted from the original low-frequency image, that is, the difference between the two is calculated point by point, so as to obtain a high-frequency image that retains the high-frequency components, and this high-frequency image can be used as the original high-frequency image.
[0075] In this embodiment of the invention, after obtaining the original low-frequency image of the image to be processed, a target low-frequency image that is better than the original low-frequency image is obtained through optimization. This can suppress noise in the target low-frequency image, which has a lower noise level and can further reduce the impact of noise.
[0076] Optionally, step A2, "optimizing the original low-frequency image and reconstructing a target low-frequency image that is better than the original low-frequency image", includes steps A21-A22.
[0077] Step A21: Generate a target gradient vector field based on the gradient vector field of the original low-frequency image. This target gradient vector field is used to recover the low-frequency information in the original low-frequency image.
[0078] In this embodiment of the invention, the gradient vector field of an image can represent the degree of pixel variation in the image and can describe the edges and details of the image. After determining the original low-frequency image, this embodiment of the invention can first determine the gradient vector field of the original low-frequency image and reconstruct the gradient vector field to obtain a better gradient vector field, i.e., a target gradient vector field. Using the target gradient vector field, the low-frequency information in the original low-frequency image can be recovered, and the recovered low-frequency information contains less noise.
[0079] Optionally, step A21, "generating the target gradient vector field based on the gradient vector field of the original low-frequency image," includes:
[0080] Step A211: Determine a target gradient vector field that is closer to the real situation than the gradient vector field of the original low-frequency image by optimizing a first function, wherein the first function satisfies:
[0081] (1)
[0082] Where G represents the first function, n represents the target gradient vector field, n0 represents the gradient vector field of the original low-frequency image, and α represents the preset balance coefficient. For example, 0 < α < 1. p represents a point on the image plane, which refers to the plane where the original low-frequency image is located; where (x, y) represents the point on the image plane, p can also be expressed as p = (x, y), and dp can also be expressed as dxdy. Correspondingly, n and n0 both represent the gradient vector field formed by the gradient vectors of the points on the image plane.
[0083] In this embodiment of the invention, the target gradient vector field is used to reconstruct a low-frequency image, i.e., a target low-frequency image. The target gradient vector field should be close to the gradient vector field of the original low-frequency image. Therefore, this embodiment sets a first function as shown in the above formula (1). By minimizing the above function, a gradient vector field that is close to the gradient vector field n0 of the original low-frequency image and has a smaller gradient (with a tendency to approach zero) is determined, i.e., the target gradient vector field n. The target gradient vector field n is closer to the real situation than the gradient vector field n0 of the original low-frequency image. Here, being closer to the real situation means being more realistic and more consistent with reality. For example, the just noticeable difference (JND) of the gradient vector field can be used to characterize whether it is close to the real situation. In addition, the above formula (1) is to reconstruct the target gradient vector field using prior knowledge. Generally, the reconstructed target gradient vector field is smoother than the gradient vector field of the original low-frequency image. Therefore, the smoothness of the gradient vector field can also be used to characterize whether it is close to the real situation.
[0084] After obtaining the final target gradient vector field n, the target gradient vector field n can be assigned to G, where G represents the target gradient vector field. Existing optimization methods can be used to optimize the first function G to determine the target gradient vector field n that meets the requirements; for example, gradient descent, population optimization algorithms, etc., can be used for optimization, but this embodiment does not limit this approach.
[0085] Step A22: Determine the target low-frequency image based on the target gradient vector, and match the gradient vector field of the target low-frequency image with the target gradient vector field.
[0086] In this embodiment of the invention, after determining the target gradient vector field, an image conforming to the target gradient vector field can be constructed and used as the target low-frequency image required for the subsequent enhancement and fusion process. The gradient vector field of the target low-frequency image matches the target gradient vector field. For example, the gradient vector field of the target low-frequency image is the same as the target gradient vector field, or if the deviation between the gradient vector field of the target low-frequency image and the target gradient vector field is within the allowable range, they can also be considered to match.
[0087] Optionally, the phrase "the gradient vector field of the target low-frequency image matches the target gradient vector field" means that the two are similar, that is, the gradient vector field of the target low-frequency image is close to the target gradient vector field; and, in order to ensure consistency with the original low-frequency image, the target low-frequency image is also close to the original low-frequency image.
[0088] For example, step A22 above, "determining the target low-frequency image based on the target gradient vector," includes:
[0089] Step A221: Determine the target low-frequency image by optimizing a second function associated with the target gradient vector, which satisfies:
[0090] (2)
[0091] Among them, I L The second function is represented by u, where u represents the target low-frequency image and f represents the original low-frequency image; u x u y Let G represent the components of the gradient vector field of the target low-frequency image in the x and y directions, respectively. x G y λ represents the components of the target gradient vector field in the x and y directions, λ represents the preset balance coefficient, and p represents a point on the image plane.
[0092] In this embodiment of the invention, the target low-frequency image is u, and the original low-frequency image is f, with... This represents the difference between the two; in the x and y directions, the gradient vector fields of the target low-frequency image are u, respectively. x u y The target gradient vector fields determined in step A1 above are G and G, respectively. x G y This embodiment uses The difference between the two gradient vector fields is represented by the method of minimizing the two differences to make the target low-frequency image approach the original low-frequency image, and the gradient vector field of the target low-frequency image approach the target gradient vector field, thus obtaining the desired target low-frequency image f. In equations (1) and (2), the values in equations (2) are used to represent the difference between the two gradient vector fields. This indicates minimization.
[0093] In this embodiment of the invention, by optimizing the gradient vector field of the original low-frequency image, a more realistic gradient vector field, namely the target gradient vector field, is reconstructed; then, the low-frequency portion of the image is reconstructed based on this target gradient vector field, thereby obtaining the target low-frequency image. This target low-frequency image can enhance the low-frequency information in the image to be processed, and can reduce image noise and artifacts.
[0094] Based on any of the above embodiments, step 103, "removing the noise portion from the original high-frequency image and generating the target high-frequency image of the image to be processed", includes the following steps B1-B2.
[0095] Step B1: Determine the truncation threshold used to distinguish high-frequency information from noise in the original high-frequency image.
[0096] To reduce the impact of noise, this embodiment determines a truncation threshold for the original high-frequency image. This truncation threshold can distinguish between high-frequency information and noise in the original high-frequency image. The high-frequency information refers to useful high-frequency information in the original high-frequency image, while the noise can be, for example, low-frequency information in the original high-frequency image, which is essentially noise during the image fusion enhancement process.
[0097] Step B3: Remove the noise from the original high-frequency image based on the truncation threshold to generate the target high-frequency image.
[0098] In this embodiment of the invention, after determining the truncation threshold, noise in the original high-frequency image can be removed based on the truncation threshold to obtain the desired target high-frequency image. For example, the original high-frequency image with noise removed can be used as the target high-frequency image, which retains only high-frequency information. This embodiment of the invention can dynamically set the corresponding truncation threshold for different original high-frequency images, enabling adaptive truncation thresholding and targeted optimization of high-frequency images, effectively reducing the impact of noise in the high-frequency image.
[0099] Optionally, step B1, “determining the truncation threshold for distinguishing high-frequency information and noise in the original high-frequency image”, includes the following steps B11-B14.
[0100] Step B11: Determine the histogram of the original high-frequency image.
[0101] Step B12: Fit the histogram to a normal distribution to determine multiple normal distributions corresponding to the histogram; the multiple superimposed normal distributions are used to represent the distribution of the histogram.
[0102] In this embodiment of the invention, the original high-frequency image contains edge and detail information of the image to be processed. Generally, its pixel value distribution follows a normal distribution. Therefore, this embodiment statistically determines the histogram of the original high-frequency image and fits the histogram using a function of a normal distribution. Specifically, this embodiment fits the histogram to a normal distribution using a set of functions of a normal distribution, which includes at least two normal distribution functions. By fitting the histogram, multiple normal distribution functions corresponding to the original high-frequency image can be determined. The distribution characteristics of the original high-frequency image can be represented by superimposing these multiple normal distribution functions. For example, the function set includes two normal distribution functions, where one normal distribution function is called the first normal distribution and the other is called the second normal distribution. Correspondingly, the superimposed first and second normal distributions can represent the distribution of the histogram.
[0103] In this embodiment of the invention, the original high-frequency image mainly contains high-frequency information, such as edges and contours in the image. Compared with the overall original high-frequency image, the proportion of high-frequency information is relatively small. Correspondingly, in the histogram of the original high-frequency image, the proportion of high-frequency information is relatively small, and the histogram is characterized by very high values in the middle and very low values at both ends. It is difficult to accurately fit this histogram using traditional fitting methods. Therefore, this embodiment of the invention fits the histogram using a set of normally distributed functions, that is, it uses multiple different normally distributed functions to fit the histogram. The histogram is represented by the overall superposition of multiple normally distributed functions, which can accurately fit the histogram of the original high-frequency image.
[0104] Step B13: Determine the standard deviation for each normal distribution.
[0105] Step B14: Weight the standard deviations of multiple normal distributions to determine the cutoff threshold.
[0106] In this embodiment of the invention, the standard deviations of multiple normal distributions (e.g., all normal distributions) are used to dynamically determine the cutoff threshold, achieving adaptive cutoff thresholding. Specifically, as shown in step B14 above, the standard deviations of multiple normal distributions are weighted, and the result of the weighting process can be used as the cutoff threshold. This embodiment utilizes the standard deviations of normal distributions to dynamically identify details and edge parts in high-frequency images, effectively identifying noise components and thus reducing the impact of noise.
[0107] Optionally, the above cutoff threshold satisfies:
[0108] (3)
[0109] Where Th represents the cutoff threshold, m represents the number of normal distributions, and S iw represents the standard deviation of the i-th normal distribution. i Let a represent the weights of the i-th normal distribution, and the sum of all weights is 1; i Let a represent the adjustment coefficient for the i-th normal distribution, and a i With S i The two are negatively correlated.
[0110] In this embodiment of the invention, corresponding weights w are assigned to each of the m normal distributions. i And the sum of all weights is 1, that is Furthermore, during the weighted processing, a corresponding adjustment factor 'a' is set for each standard deviation. i , and a i With S i The two are negatively correlated, i.e., the standard deviation S i The smaller the value, the better the adjustment factor a. i The larger.
[0111] For example, if there are two normal distributions, i.e., m=2, the cutoff threshold Th can specifically satisfy:
[0112] (4)
[0113] Where S1 represents the standard deviation of the first normal distribution (hereinafter referred to as the first standard deviation), S2 represents the standard deviation of the second normal distribution (hereinafter referred to as the second standard deviation), a1 is a preset adjustment coefficient, w1 represents the weight corresponding to the first normal distribution, and w2 represents the weight corresponding to the second normal distribution; S1 < S2, and a1 > 1. Accordingly, w1 + w2 = 1.
[0114] In this embodiment of the invention, during the weighted processing in step B14 above, an adjustment coefficient a1 is added to the smaller first standard deviation S1, while no adjustment coefficient is set for the larger first standard deviation S2 (or its adjustment coefficient a2 is 1), so as to more accurately characterize the truncation threshold. For example, utilizing the 3Sigma property of the normal distribution, the adjustment coefficient a1 can be set to 3, i.e., a1=3. The 3Sigma property can be used to more effectively identify image details and edges. The two weights can be equal, i.e., w1= w2.
[0115] In this embodiment of the invention, the truncation threshold is determined using the histogram of the original high-frequency image, so that the truncation threshold can conform to the distribution characteristics of the pixel values of the original high-frequency image. By fitting the histogram distribution with multiple normal distributions, the truncation threshold can be set dynamically and accurately. The truncation threshold is determined based on the standard deviation. Using this truncation threshold, details and edge parts in the high-frequency image can be effectively identified, and the influence of noise on the identification of image edges and details can be reduced.
[0116] Optionally, high-frequency images (e.g., target high-frequency images) contain high-detail regions of the image. When high-frequency images are fused for enhancement, the enhancement degree is large, which may lead to obvious artificial processing traces in the final enhanced image. In this embodiment of the invention, the target high-frequency image is enhanced in advance using a unit decomposition function, so that the enhancement degree of the target high-frequency image can match the unit decomposition function, and the edge transition of the processed target high-frequency image is more uniform. Specifically, step 104 "fusion of target low-frequency image and target high-frequency image" includes the following steps C1-C2.
[0117] Step C1: Enhance the high-frequency image of the target based on the unit decomposition function.
[0118] In this embodiment of the invention, the unit decomposition function is a function used to implement unit decomposition, which can be a unit decomposition belonging to a certain cover; for example, the unit decomposition function can specifically be the Shepard function, the shape function obtained by the moving least squares method, the shape function of the finite element method, etc., and this embodiment does not limit it. In the process of enhancing the target high-frequency image in step C1, the unit decomposition function can be used to control the variation amplitude (drop amplitude) of at least some pixels in the target high-frequency image, which can reduce the overfilling phenomenon of the image enhancement part and reduce the traces of manual processing. For example, the unit decomposition function can be used to decompose the target high-frequency image into units to obtain a high-frequency image with uniform edge transition, which is the enhanced target high-frequency image.
[0119] Optionally, the degree of decline of the unit decomposition function is negatively correlated with the rate of change of the critical Noticeable Difference (JND); for example, the degree of decline of the unit decomposition function is inversely proportional to the rate of change of the critical Noticeable Difference.
[0120] Step C2: Fuse the target low-frequency image and the enhanced target high-frequency image.
[0121] In this embodiment of the invention, when generating the enhanced image, the enhanced target high-frequency image obtained in step C2 is used for fusion to reduce artificial processing traces in the final enhanced image and make it conform to human visual observation habits. Those skilled in the art will understand that this embodiment of the invention can use a unit decomposition function to achieve preliminary enhancement of the target high-frequency image, and during the fusion process in step C2, a preset enhancement level can be used to further enhance the preliminary enhanced target high-frequency image.
[0122] In this embodiment of the invention, the target high-frequency image is enhanced based on the unit decomposition function, which can achieve a reasonable transition in the region near the high detail area (e.g., the edge) in the target high-frequency image. Under the premise of ensuring the enhancement of the high detail area, the edge transition of the target high-frequency image is uniform, which can reduce the traces of manual processing and make the detail area conform to the observation habits of the human eye.
[0123] The following example details the process of this image enhancement method.
[0124] See Figure 2 As shown, the image enhancement method includes the following steps 201-208.
[0125] Step 201: Obtain the image m to be enhanced.
[0126] Step 202: Perform low-pass filtering on the image m to be processed to determine the original low-frequency image m of the image m to be processed. L0 .
[0127] Step 203: Process the original low-frequency image m L0 After optimization, the reconstructed image is m times lower than the original low-frequency image. L0 Smoother target low-frequency image m L .
[0128] Specifically, low-frequency image reconstruction can be achieved based on the above steps A21-A22, which will not be elaborated here.
[0129] Step 204: Determine the original high-frequency image m of the image to be processed. H0 .
[0130] Among them, it can be based on the original low-frequency image m L0 Determine the original high-frequency image m H0 For example, comparing the image to be processed m with the original low-frequency image m L0 By performing point-by-point subtraction, the original high-frequency image m is obtained. H0 , i.e. m H0 =mm L0 Therefore, step 204 can be executed after step 202 above.
[0131] Step 205: Determine the m used to distinguish the original high-frequency image H0 Cutoff thresholds for mid-to-high frequency information and noise components.
[0132] Step 206: Remove high-frequency images m from the original image based on a truncation threshold. H0 The noise portion in the image is used to generate a high-frequency image of the target m. H .
[0133] Step 207: Based on the unit decomposition function I, analyze the high-frequency image m of the target. H Enhancement processing is performed.
[0134] Step 208: Fusion of target low-frequency image m L and the enhanced high-frequency image of the target m H The enhanced image M is obtained.
[0135] For example, as mentioned above, the target low-frequency image is m L The target high-frequency image is m H The unit decomposition function is I(); and in this embodiment, only high-frequency images are enhanced, that is, only the target high-frequency images are enhanced to a certain degree, and this enhancement degree is K. Then the final enhanced image M can be expressed as: The enhancement level K can be preset and can be a certain value; or, different enhancement levels can be set for different locations in the image, that is, the enhancement level can also represent a distribution.
[0136] The image enhancement method provided by the embodiments of the present invention has been described in detail above. This method can also be implemented by a corresponding device. The image enhancement device provided by the embodiments of the present invention will be described in detail below.
[0137] Figure 3 A schematic diagram of the structure of an image enhancement apparatus provided in an embodiment of the present invention is shown. Figure 3 As shown, the image enhancement device includes:
[0138] The acquisition module 31 is used to acquire the image to be enhanced.
[0139] Low-frequency processing module 32 is used to determine the target low-frequency image of the image to be processed;
[0140] The high-frequency processing module 33 is used to determine the original high-frequency image of the image to be processed, remove the noise part in the original high-frequency image, and generate the target high-frequency image of the image to be processed.
[0141] The fusion module 34 is used to fuse the target low-frequency image and the target high-frequency image to generate an enhanced image.
[0142] In one possible implementation, the high-frequency processing module 33 includes:
[0143] A truncation threshold determination unit is used to determine a truncation threshold for distinguishing high-frequency information and noise in the original high-frequency image;
[0144] The generation unit is used to remove noise from the original high-frequency image based on the truncation threshold to generate the target high-frequency image.
[0145] In a possible implementation, the truncation threshold determination unit determines a truncation threshold for distinguishing high-frequency information and noise portions in the original high-frequency image, including:
[0146] Determine the histogram of the original high-frequency image;
[0147] Perform a normal distribution fitting on the histogram to determine multiple normal distributions corresponding to the histogram; the multiple superimposed normal distributions are used to represent the distribution of the histogram;
[0148] Determine the standard deviation of each of the normal distributions;
[0149] Perform a weighted processing on the standard deviations of the multiple normal distributions to determine the truncation threshold.
[0150] In a possible implementation, the truncation threshold satisfies:
[0151] ;
[0152] where Th represents the truncation threshold, m represents the number of normal distributions, S i represents the standard deviation of the i-th normal distribution, w i represents the weight of the i-th normal distribution, and the sum of all weights is 1; a i represents the adjustment coefficient of the i-th normal distribution, and a i and S i have a negative correlation relationship.
[0153] In a possible implementation, the number of normal distributions is two, and the truncation threshold Th satisfies:
[0154] ;
[0155] where S1 represents the standard deviation of the first normal distribution, S2 represents the standard deviation of the second normal distribution, a1 is a preset adjustment coefficient, w1 represents the weight corresponding to the first normal distribution, and w2 represents the weight corresponding to the second normal distribution; S1 < S2, and a1 > 1.
[0156] In a possible implementation, the low-frequency processing module 32 includes:
[0157] A low-pass filtering unit, configured to perform a low-pass filtering process on the image to be processed to determine the original low-frequency image of the image to be processed;
[0158] An optimization unit, configured to perform an optimization process on the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image.
[0159] In one possible implementation, the optimization unit includes:
[0160] A subunit is defined for generating a target gradient vector field based on the gradient vector field of the original low-frequency image, wherein the target gradient vector field is used to recover the low-frequency information in the original low-frequency image;
[0161] An optimization subunit is used to determine a target low-frequency image based on the target gradient vector, wherein the gradient vector field of the target low-frequency image matches the target gradient vector field.
[0162] In one possible implementation, the determining subunit generates a target gradient vector field based on the gradient vector field of the original low-frequency image, including:
[0163] By optimizing a first function, a target gradient vector field that is closer to the real situation than the gradient vector field of the original low-frequency image is determined. The first function satisfies:
[0164] ;
[0165] Wherein, G represents the first function, n represents the target gradient vector field, n0 represents the gradient vector field of the original low-frequency image, α represents the preset balance coefficient, and p represents a point on the image plane.
[0166] In one possible implementation, the target low-frequency image approximates the original low-frequency image, and the gradient vector field of the target low-frequency image approximates the target gradient vector field.
[0167] In one possible implementation, the optimization subunit determines the target low-frequency image based on the target gradient vector, including:
[0168] The target low-frequency image is determined by optimizing a second function associated with the target gradient vector, wherein the second function satisfies:
[0169] ;
[0170] Among them, I L The second function is represented by u, where u represents the target low-frequency image, and f represents the original low-frequency image; u x u y G represents the components of the gradient vector field of the target low-frequency image in the x and y directions, respectively. x G y λ represents the components of the target gradient vector field in the x and y directions, λ represents the preset balance coefficient, and p represents a point on the image plane.
[0171] In one possible implementation, the fusion module 34 includes:
[0172] The unit decomposition unit is used to enhance the target high-frequency image based on the unit decomposition function;
[0173] The fusion unit is used to fuse the target low-frequency image and the enhanced target high-frequency image.
[0174] In one possible implementation, the degree of decline of the unit decomposition function is negatively correlated with the rate of change of the critical visible deviation.
[0175] In addition, embodiments of the present invention also provide an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are respectively connected via the bus. When the computer program is executed by the processor, it implements the various processes of the above-described image enhancement method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0176] For details, see Figure 4 As shown, this embodiment of the invention also provides an electronic device, which includes a bus 1110, a processor 1120, a transceiver 1130, a bus interface 1140, a memory 1150, and a user interface 1160.
[0177] In this embodiment of the invention, the electronic device further includes a computer program stored in a memory 1150 and executable on a processor 1120, wherein the computer program, when executed by the processor 1120, implements the various processes of the above-described image enhancement method embodiment.
[0178] Transceiver 1130 is used to receive and send data under the control of processor 1120.
[0179] In this embodiment of the invention, a bus architecture (represented by bus 1110) is used. Bus 1110 may include any number of interconnected buses and bridges. Bus 1110 connects various circuits, including one or more processors represented by processor 1120 and memory represented by memory 1150.
[0180] Bus 1110 represents one or more of several types of bus architectures, including memory buses and memory controllers, peripheral buses, Accelerated Graphics Port (AGP), processors, or local buses using any bus architecture from various bus architectures. As an example and not a limitation, such architectures include: Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MCA) buses, Enhanced ISA (EISA) buses, Video Electronics Standards Association (VESA) buses, and Peripheral Component Interconnect (PCI) buses.
[0181] The processor 1120 can be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The processors mentioned above include: general-purpose processors, central processing units (CPUs), network processors (NPs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), programmable logic arrays (PLAs), microcontroller units (MCUs) or other programmable logic devices, discrete gates, transistor logic devices, and discrete hardware components. They can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. For example, the processor can be a single-core processor or a multi-core processor, and the processor can be integrated on a single chip or located on multiple different chips.
[0182] Processor 1120 can be a microprocessor or any conventional processor. The method steps disclosed in the embodiments of the present invention can be directly executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in readable storage media known in the art, such as Random Access Memory (RAM), Flash Memory, Read-Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), registers, etc. The readable storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0183] Bus 1110 can also connect various other circuits, such as peripheral devices, voltage regulators, or power management circuits. Bus interface 1140 provides an interface between bus 1110 and transceiver 1130, all of which are well known in the art. Therefore, embodiments of the present invention will not be described further.
[0184] Transceiver 1130 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. For example, transceiver 1130 receives external data from other devices, and transceiver 1130 is used to send data processed by processor 1120 to other devices. Depending on the nature of the computer system, a user interface 1160 may also be provided, such as a touchscreen, physical keyboard, monitor, mouse, speaker, microphone, trackball, joystick, or stylus.
[0185] It should be understood that, in embodiments of the present invention, memory 1150 may further include memory remotely configured relative to processor 1120, and such remotely configured memory can be connected to a server via a network. One or more portions of the aforementioned network may be an ad hoc network, intranet, extranet, virtual private network (VPN), local area network (LAN), wireless local area network (WLAN), wide area network (WAN), wireless wide area network (WWAN), metropolitan area network (MAN), Internet, public switched telephone network (PSTN), ordinary old-style telephone service (POTS), cellular telephone network, wireless network, Wi-Fi network, and combinations of two or more of the aforementioned networks. For example, cellular telephone networks and wireless networks can be Global System for Mobile Communications (GSM), Code Division Multiple Access (CDMA), WiMAX, General Packet Radio Service (GPRS), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), LTE Frequency Division Duplex (FDD), LTE Time Division Duplex (TDD), Advanced Long Term Evolution (LTE-A), Universal Mobile Telecommunications System (UMTS), Enhanced Mobile Broadband (eMBB), Massive Machine Type Communication (mMTC), Ultra Reliable Low Latency Communications (uRLLC), etc.
[0186] It should be understood that the memory 1150 in the embodiments of the present invention may be volatile memory or non-volatile memory, or may include both volatile memory and non-volatile memory. Non-volatile memory includes: read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.
[0187] Volatile memory includes random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1150 of the electronic device described in this embodiment includes, but is not limited to, the above-described and any other suitable types of memory.
[0188] In this embodiment of the invention, the memory 1150 stores the following elements of the operating system 1151 and the application 1152: executable modules, data structures, or subsets thereof, or extended sets thereof.
[0189] Specifically, the operating system 1151 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 1152 includes various applications, such as a media player and a browser, used to implement various application functions. Programs implementing the methods of this embodiment of the invention can be included in the application program 1152. The application program 1152 includes applets, objects, components, logic, data structures, and other computer system executable instructions that perform specific tasks or implement specific abstract data types.
[0190] Furthermore, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the various processes of the above-described image enhancement method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0191] Computer-readable storage media include: permanent and non-permanent, removable and non-removable media, which are tangible devices capable of retaining and storing instructions for use by an instruction execution device. Computer-readable storage media include: electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, and any suitable combination thereof. Computer-readable storage media include: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), non-volatile random access memory (NVRAM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, optical disc read-only memory (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape storage, magnetic disk storage or other magnetic storage devices, memory sticks, mechanical encoding devices (such as punched cards or raised structures in grooves on which instructions are recorded), or any other non-transfer medium that can be used to store information accessible by a computing device. As defined in the embodiments of the present invention, a computer-readable storage medium does not include the temporary signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses passing through optical fiber cables), or electrical signals transmitted through wires.
[0192] In the several embodiments provided in this application, it should be understood that the disclosed apparatus, electronic devices, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0193] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to solve the problems addressed by the embodiments of the present invention, depending on actual needs.
[0194] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0195] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (including: a personal computer, a server, a data center, or other network device) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media listed above that can store program code.
[0196] In the description of the embodiments of the present invention, those skilled in the art should understand that the embodiments of the present invention can be implemented as methods, apparatuses, electronic devices, and computer-readable storage media. Therefore, the embodiments of the present invention can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. Furthermore, in some embodiments, the embodiments of the present invention can also be implemented as a computer program product in one or more computer-readable storage media, the computer-readable storage media containing computer program code.
[0197] The aforementioned computer-readable storage medium may be any combination of one or more computer-readable storage media. Computer-readable storage media include: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, optical disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any combination thereof. In embodiments of the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0198] The computer program code contained in the aforementioned computer-readable storage medium may be transmitted using any suitable medium, including wireless, wire, optical fiber, radio frequency (RF), or any suitable combination thereof.
[0199] Computer program code for performing the operations of the embodiments of the present invention can be written in assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or in one or more programming languages or a combination thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The computer program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer or an external computer via any type of network, including a local area network (LAN) or a wide area network (WAN).
[0200] The embodiments of the present invention describe the provided methods, apparatus, and electronic devices through flowcharts and / or block diagrams.
[0201] It should be understood that each block of a flowchart and / or block diagram, as well as combinations of blocks in a flowchart and / or block diagram, can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine that, when executed by a computer or other programmable data processing apparatus, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0202] These computer-readable program instructions may also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to function in a particular manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction apparatus product that includes the functions / operations specified in the blocks of a flowchart and / or block diagram.
[0203] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable data processing apparatus provide a process for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0204] The above description is merely a specific implementation of the embodiments of the present invention, but the protection scope of the embodiments of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of the present invention should be included within the protection scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention should be determined by the protection scope of the claims.
Claims
1. A method for image enhancement, characterized in that, include: Obtain the image to be enhanced; Determine the target low-frequency image of the image to be processed; The step of determining the target low-frequency image of the image to be processed includes: performing low-pass filtering on the image to be processed to determine the original low-frequency image of the image to be processed; optimizing the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image; the step of optimizing the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image includes: generating a target gradient vector field based on the gradient vector field of the original low-frequency image, the target gradient vector field being used to recover low-frequency information in the original low-frequency image; determining the target low-frequency image based on the target gradient vector, wherein the gradient vector field of the target low-frequency image matches the target gradient vector field; the step of generating the target gradient vector field based on the gradient vector field of the original low-frequency image includes: determining a target gradient vector field that is closer to the real situation than the gradient vector field of the original low-frequency image by optimizing a first function, wherein the first function satisfies: Wherein, G represents the first function, n represents the target gradient vector field, n0 represents the gradient vector field of the original low-frequency image, α represents the preset balance coefficient, and p represents a point on the image plane. Determine the original high-frequency image of the image to be processed, remove the noise portion from the original high-frequency image, and generate the target high-frequency image of the image to be processed; The target low-frequency image and the target high-frequency image are fused to generate an enhanced image.
2. The method according to claim 1, characterized in that, The step of removing noise from the original high-frequency image to generate the target high-frequency image of the image to be processed includes: Determine the truncation threshold used to distinguish high-frequency information and noise components in the original high-frequency image; The target high-frequency image is generated by removing the noise portion from the original high-frequency image based on the truncation threshold.
3. The method according to claim 2, characterized in that, The determination of the truncation threshold used to distinguish high-frequency information and noise in the original high-frequency image includes: Determine the histogram of the original high-frequency image; The histogram is fitted with a normal distribution to determine multiple normal distributions corresponding to the histogram; the multiple superimposed normal distributions are used to represent the distribution of the histogram. Determine the standard deviation for each of the stated normal distributions; The standard deviations of the multiple normal distributions are weighted to determine the cutoff threshold.
4. The method according to claim 3, characterized in that, The truncation threshold satisfies: ; Where Th represents the cutoff threshold, m represents the number of normal distributions, and S i w represents the standard deviation of the i-th normal distribution. i Let a represent the weights of the i-th normal distribution, and the sum of all weights is 1; i Let a represent the adjustment coefficient for the i-th normal distribution, and a i With S i The two are negatively correlated.
5. The method according to claim 4, characterized in that, There are two normal distributions, and the cutoff threshold Th satisfies: ; Where S1 represents the standard deviation of the first normal distribution, S2 represents the standard deviation of the second normal distribution, a1 is a preset adjustment coefficient, w1 represents the weight corresponding to the first normal distribution, and w2 represents the weight corresponding to the second normal distribution; S1 < S2, and a1 > 1.
6. The method according to claim 1, characterized in that, The target low-frequency image is similar to the original low-frequency image, and the gradient vector field of the target low-frequency image is similar to the target gradient vector field.
7. The method according to claim 6, characterized in that, Determining the target low-frequency image based on the target gradient vector includes: The target low-frequency image is determined by optimizing a second function associated with the target gradient vector, wherein the second function satisfies: ; Among them, I L The second function is represented by u, where u represents the target low-frequency image, and f represents the original low-frequency image; u x u y G represents the components of the gradient vector field of the target low-frequency image in the x and y directions, respectively. x G y λ represents the components of the target gradient vector field in the x and y directions, λ represents the preset balance coefficient, and p represents a point on the image plane.
8. The method according to claim 1, characterized in that, The fusion of the target low-frequency image and the target high-frequency image includes: Enhancement processing of the target high-frequency image is performed based on the unit decomposition function; The target low-frequency image and the enhanced target high-frequency image are fused together.
9. The method according to claim 8, characterized in that, The degree of decline in the unit decomposition function is negatively correlated with the rate of change of the critical visible deviation.
10. An image enhancement apparatus, characterized in that, include: The acquisition module is used to acquire the image to be enhanced. The low-frequency processing module is used to determine the target low-frequency image of the image to be processed; The step of determining the target low-frequency image of the image to be processed includes: performing low-pass filtering on the image to be processed to determine the original low-frequency image of the image to be processed; optimizing the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image; the step of optimizing the original low-frequency image to reconstruct a target low-frequency image that is better than the original low-frequency image includes: generating a target gradient vector field based on the gradient vector field of the original low-frequency image, the target gradient vector field being used to recover low-frequency information in the original low-frequency image; determining the target low-frequency image based on the target gradient vector, wherein the gradient vector field of the target low-frequency image matches the target gradient vector field; the step of generating the target gradient vector field based on the gradient vector field of the original low-frequency image includes: determining a target gradient vector field that is closer to the real situation than the gradient vector field of the original low-frequency image by optimizing a first function, wherein the first function satisfies: Wherein, G represents the first function, n represents the target gradient vector field, n0 represents the gradient vector field of the original low-frequency image, α represents the preset balance coefficient, and p represents a point on the image plane. A high-frequency processing module is used to determine the original high-frequency image of the image to be processed, remove the noise portion from the original high-frequency image, and generate a target high-frequency image of the image to be processed. The fusion module is used to fuse the target low-frequency image and the target high-frequency image to generate an enhanced image.
11. An electronic device comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, characterized in that, When the computer program is executed by the processor, it implements the steps of the image enhancement method as described in any one of claims 1 to 9.
12. 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 steps of the image enhancement method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Power equipment infrared image enhancement method based on NSCT domain
CN113592729A