Self-adaptive image enhancement method and device based on texture scale dynamic adjustment

Through wavelet transformation analysis and dynamic adjustment of the number of scales and Gaussian fuzzy variance of the multi-scale Retinex method, the problem of poor image enhancement effect in complex lighting environments in the prior art is solved, and more accurate texture and lighting separation is achieved, which is suitable for a variety of application scenarios.

CN120387933APending Publication Date: 2025-07-29UNIV OF SCI & TECH BEIJING +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510606400.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

When facing complex lighting environments, existing image enhancement methods are difficult to adjust parameters adaptively, resulting in poor enhancement effects, especially in scenes where non-uniform lighting, multi-light source interference or dynamic lighting changes, noise amplification, blur boundaries and color distortion are easily generated.

Method used

The texture characteristics of the image are analyzed by wavelet transformation, the number of scales and Gaussian fuzzy variance of the multi-scale Retinex method are dynamically adjusted, and combined with multi-scale analysis of wavelet decomposition, the texture and lighting components are adaptively separated, and image enhancement processing is optimized.

Benefits of technology

It achieves robustness enhancement in complex lighting environments, reduces artifacts, and improves the accuracy of image detail retention and lighting estimation. It is suitable for a variety of application scenarios such as night vision surveillance and medical image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387933A_ABST
    Figure CN120387933A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive image enhancement method and device based on texture scale dynamic adjustment, and relates to the technical field of image processing. According to the method, illumination analysis and illumination characteristic determination are performed on an input image, specifically, low-pass filtering and high-pass filtering are performed on image pixels based on wavelet transformation, a wavelet decomposition level is given, total energy of all high-frequency sub-bands is calculated, and detail texture energy and detail texture factors of the image are obtained; adjusting the number of MSR scales according to the illumination characteristics of the image, and dynamically adjusting a Gaussian function standard deviation for each scale; and performing image enhancement processing based on the adjusted MSR scale number and the Gaussian function standard deviation. According to the invention, the limitation of a fixed scale number and predefined parameters in a complex illumination environment in the prior art can be solved, and the image enhancement processing effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to an adaptive image enhancement method and device based on dynamic adjustment of texture scale. Background Art

[0002] Image enhancement technology is one of the core research directions in the fields of computer vision and image processing. Its goal is to improve the visibility and information expression ability of images by adjusting the brightness, contrast, and color distribution of images. In complex lighting environments (such as low light, non-uniform light, or high dynamic range scenes), traditional methods such as histogram equalization and gamma correction often have difficulty in simultaneously retaining details and avoiding noise amplification or over-enhancement problems due to the lack of modeling for separating illumination and reflection.

[0003] Image enhancement methods based on the Retinex theory provide a solution that is closer to human visual perception. The Retinex theory believes that an image can be decomposed into an illumination component and a reflection component, which respectively reflect the changes in ambient light and the inherent properties of objects. Single Scale Retinex (SSR) estimates the illumination component through Gaussian blur and subtracts this component from the original image to extract the reflection component. However, the effect of SSR highly depends on the scale parameter of Gaussian blur (usually represented by the variance of the Gaussian kernel), and a single scale is difficult to balance the requirements of detail retention and illumination estimation. For example, small-scale blur may lead to over-enhancement of details, while large-scale blur may smooth out important features.

[0004] Multiscale Retinex (MSR) enhances the contrast and color restoration ability of images by applying Gaussian blur at multiple scales and combining the results in a weighted average manner. A typical MSR implementation uses fixed 3 scales and presets the Gaussian blur variances as [15, 80, 250], corresponding to small-scale details, medium-scale features, and large-scale illumination changes respectively. This MSR with fixed scales and preset variances shows good robustness in scenes with relatively uniform illumination distribution, but when facing non-uniform illumination, multi-light source interference, or dynamic illumination changes, it is difficult to adaptively adjust the parameters, resulting in poor enhancement effects. For example, in a scene where strong light and shadow coexist, small scales may amplify noise, and large scales may blur the boundaries, generating the Halo Effect or color distortion. In addition, the generality of fixed parameters is insufficient to meet the diverse requirements of different application scenarios (such as security monitoring, remote sensing images).

[0005] Some methods attempt to introduce adaptive mechanisms, such as adjusting Gaussian blur parameters based on the statistical characteristics of images (such as brightness histograms or local contrast), or combining machine learning techniques to predict the optimal scale configuration. However, these methods often have a high computational complexity or rely on specific training data, which limits their real-time performance and generality. Another adaptive image enhancement method analyzes the global characteristics of the input image and dynamically adjusts the Gaussian blur parameters to optimize the enhancement effect. This method relies on the global statistical characteristics of the image and requires traversing the pixel values of all pixel points and storing the calculated statistical characteristics. When the image scale is large, the computational complexity will increase sharply, affecting the processing performance and processing delay. Moreover, the existing technologies have a fixed number of scales, which limits their ability to model extreme light changes. The parameter adjustment depends on empirical rules or predefined ranges, making it difficult to fully adapt to the dynamically changing light environment.

[0006] Therefore, how to improve the adaptability of the MSR algorithm to complex light environments while maintaining its efficiency has become a key challenge in current research. Summary of the Invention

[0007] Aiming at the problem that existing image enhancement methods usually use a fixed number of scales and predefined parameters to process images in different environments, resulting in significant limitations when facing complex light environments, the present invention provides an adaptive image enhancement method and device based on dynamic adjustment of texture scales. The technical solutions are as follows:

[0008] On the one hand, an adaptive image enhancement method based on dynamic adjustment of texture scales is provided. The method includes the following steps:

[0009] S1. Perform light analysis on the input image to determine the light characteristics, specifically including:

[0010] S11. Perform low-pass filtering and high-pass filtering on each row of the image pixels using wavelet transform to obtain the low-pass component and high-pass component of the row filtering;

[0011] S12. Perform low-pass filtering and high-pass filtering on each column of the low-pass component and high-pass component of the row filtering respectively to obtain four first-level subband components: low-frequency component, horizontal high-frequency component, vertical high-frequency component, and diagonal high-frequency component;

[0012] S13. Calculate the energy of the four first-level subband components respectively to obtain the first-level low-frequency energy, first-level horizontal high-frequency energy, first-level vertical high-frequency energy, and first-level diagonal high-frequency energy;

[0013] S14. Given the wavelet decomposition level J, when J>1, repeat steps S11-S13 to calculate the second-level subband components and the energy of the second-level subband components until the J-level subband components and the energy of the J-level subband components are calculated;

[0014] S15. Calculate the detailed texture energy of the image based on the total energy of all high-frequency subbands, and calculate the detailed texture factor based on the detailed texture energy of the image;

[0015] S2. Adjust the number of MSR scales according to the illumination characteristics of the image, and dynamically adjust the standard deviation of the Gaussian function for each scale;

[0016] S3. Perform image enhancement processing based on the adjusted number of MSR scales and the standard deviation of the Gaussian function.

[0017] Optionally, in step S11, the scaling function used in the wavelet transform is φ(t), the wavelet basis function is ψ(t), and the corresponding relationship satisfies the two-scale equation, that is:

[0018]

[0019] where h[n] and g[n] respectively represent the low-pass filter coefficients and high-pass filter coefficients corresponding to the selected wavelet transform, and satisfy the orthogonal relationship with each other:

[0020] g[n] = (-1) n h[L - 1 - n]

[0021] where L represents the filter length.

[0022] Optionally, the scaling function, wavelet basis function, low-pass filter coefficients, and high-pass filter coefficients corresponding to the wavelet transform respectively satisfy:

[0023]

[0024] Optionally, in step S11, perform low-pass filtering and high-pass filtering on each row of the image pixels respectively to obtain the low-pass component L and high-pass component H of the row filtering:

[0025]

[0026] where L(x, n) and H(x, n) respectively represent the values of the x-th row and n-th column of the low-pass component L and high-pass component H; according to the downsampling coefficients of the high-pass filtering and low-pass filtering, the corresponding N1 scale is N / 2.

[0027] Optionally, in step S12, perform low-pass filtering and high-pass filtering on each column of the low-pass component L and high-pass component H of the row filtering respectively to obtain four first-level subband components: the low-frequency component LL1, the horizontal high-frequency component LH1, the vertical high-frequency component HL1, and the diagonal high-frequency component HH1:

[0028]

[0029]

[0030] Among them, according to the downsampling coefficients of high-pass filtering and low-pass filtering, the scale corresponding to M1 is M / 2.

[0031] Optionally, in the step S13, calculate the energies of four first-level subband components: the low-frequency component LL1, the horizontal high-frequency component LH1, the vertical high-frequency component HL1, and the diagonal high-frequency component HH1 respectively:

[0032]

[0033] Obtain the first-level low-frequency energy Horizontal high-frequency energy Vertical high-frequency energy And diagonal high-frequency energy

[0034] Optionally, in the step S14, given the wavelet decomposition level J≥1, when J>1, repeat the steps S11-S13 to calculate the second-level subband components and the energies of the second-level subband components until the J-level subband components and the energies of the J-level subband components are calculated. Among them, the scales M j and N j Are calculated as M / 2 j and N / 2 j , 1≤j≤J.

[0035] Optionally, in the step S15, according to the total energy of all high-frequency subbands, the detail texture energy E of the image texture Is calculated as:

[0036]

[0037] Among them, Are respectively the horizontal high-frequency energy, the vertical high-frequency energy, and the diagonal high-frequency energy of the j-th subband;

[0038] The detail texture factor C for measuring the details of the image is expressed as:

[0039]

[0040] If C is closer to 1, it means the texture of the image is more complex, and more attention needs to be paid to the image details in a complex light environment; if C is closer to 0, it means the texture of the image is simpler, and more attention needs to be paid to the illumination influence in a complex light environment.

[0041] Optionally, in the step S2, the number of MSR scales is calculated as:

[0042]

[0043] Among them, N minis the minimum scale number, N max is the maximum scale number, α is the adjustment coefficient of the scale size, C is the detail texture factor, represents rounding down;

[0044] The weighted calculation of the energy at the k-th scale is:

[0045]

[0046] where, w k is defined as w k = 0; The standard deviation of the Gaussian function at the k-th scale is calculated as:

[0047] σ k = σ min + w k ·(σ max - σ min )

[0048] wherein the N min , N max , α, σ min and σ max are set to preset values according to the usage scenario and the computing power of the device.

[0049] On the other hand, an adaptive image enhancement device based on dynamic adjustment of texture scale is provided for implementing the method described in any one of the above, and the device includes:

[0050] An illumination analysis module for performing illumination analysis on the input image to determine illumination characteristics, specifically including:

[0051] Performing low-pass filtering and high-pass filtering on each row of the image pixels respectively by using wavelet transform to obtain the low-pass component and the high-pass component of the row filtering;

[0052] Performing low-pass filtering and high-pass filtering on each column of the low-pass component and the high-pass component of the row filtering respectively to obtain four first-level sub-band components: a low-frequency component, a horizontal high-frequency component, a vertical high-frequency component, and a diagonal high-frequency component;

[0053] Calculating the energy of the four first-level sub-band components respectively to obtain the first-level low-frequency energy, the first-level horizontal high-frequency energy, the first-level vertical high-frequency energy, and the first-level diagonal high-frequency energy;

[0054] Given the wavelet decomposition level J, when J > 1, continue to calculate the second-level sub-band components and the energy of the second-level sub-band components until calculating the J-level sub-band components and the energy of the J-level sub-band components;

[0055] Calculating the detail texture energy of the image according to the total energy of all high-frequency sub-bands, and calculating the detail texture factor according to the detail texture energy of the image;

[0056] A parameter adjustment module, configured to adjust the number of MSR scales according to the illumination characteristics of an image, and dynamically adjust the standard deviation of the Gaussian function for each scale;

[0057] An MSR processing module, configured to perform image enhancement processing based on the adjusted number of MSR scales and the standard deviation of the Gaussian function.

[0058] On the other hand, an electronic device is provided, and the electronic device includes:

[0059] A processor;

[0060] A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are loaded and executed by the processor, the steps of the adaptive image enhancement method as described above are implemented.

[0061] On the other hand, a computer-readable storage medium is provided, in which program code is stored, and the program code can be called by a processor to execute the steps of the adaptive image enhancement method as described above.

[0062] The beneficial effects brought by the technical solution provided by the present invention at least include:

[0063] (1) Breaking through the limitation of fixed number of scales and providing higher flexibility. The present invention can flexibly adjust according to the actual needs of the image by adaptively selecting the number of scales. This flexibility is significantly better than the rigid design of the prior art.

[0064] (2) More accurate texture and illumination separation. The present invention combines the multi-scale analysis of wavelet decomposition to extract the texture features of the image, and based on this, independently assigns the Gaussian blur variance for each scale. This local adaptability ensures a more accurate separation of the texture and illumination components, significantly reducing artifacts.

[0065] (3) Enhanced robustness to complex illumination environments. The present invention can more robustly process complex illumination environments by dynamically adjusting the number of scales and the Gaussian blur variance. This adaptability makes it perform excellently under extreme conditions (such as night vision monitoring or medical imaging).

[0066] (4) Optimization of computational efficiency and adjustment on demand. The present invention determines the optimal number of scales through texture complexity analysis (such as wavelet subband energy ratio) to avoid redundancy. At the same time, the dynamic allocation of variance further optimizes the convolution efficiency of each scale. This adjustment on demand has significant advantages in real-time applications (such as video enhancement).

[0067] (5) Improvement in generality and scalability. The adaptive framework of the present invention does not rely on empirical parameters of specific scenarios, but adjusts parameters based on the intrinsic characteristics of images (such as the frequency domain characteristics of wavelet decomposition), having stronger generality. In addition, this method is easy to expand, and can combine machine learning to predict texture complexity to further improve accuracy.

[0068] (6) Realization of simplicity and efficiency. The present invention can extract texture features using simple and efficient wavelet decomposition and map them to the number of scales and the variance of Gaussian blur. This method has low computational overhead and is suitable for embedded systems or real-time processing, while maintaining high quality of the enhancement effect. Description of the Drawings

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0070] Figure 1 is a flowchart of an adaptive image enhancement method based on dynamic adjustment of texture scales provided by an embodiment of the present invention;

[0071] Figure 2 is a schematic structural diagram of an adaptive image enhancement device based on dynamic adjustment of texture scales provided by an embodiment of the present invention. Detailed Embodiments

[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions of the embodiments of the present invention in conjunction with the drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the described embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0073] In the image enhancement method based on the Retinex theory, assume that there are M and N pixel points in the width and height of a picture respectively. The pixel coordinates corresponding to any pixel point z are represented by (x, y), and the corresponding pixel value is represented by I(z) or I(x, y). From the perspective of imaging, the pixel points received by the observer are the convolution of the luminance image and the reflection image. The luminance L(z) represents the brightness of the image pixels, and the reflection image R(z) represents the color of the image. Then the corresponding convolution relationship satisfies:

[0074] I(z) = L(z) * R(z) (1)

[0075] The brightness is calculated as the ratio of the pixel value at that point to the average value of the surrounding pixel samples. The density of the center / surround function is inversely proportional to the square of the distance, F ∝ 1 / (x 2 +y 2 ), expressed as:

[0076]

[0077] Converting to the logarithmic domain gives the SSR equation for center / surround:

[0078] R = logL(z) = logI(z) - log[I(z)*F(z)] (3)

[0079] Select to use the Gaussian distribution function that satisfies the property of the center / surround function F ∝ 1 / (x 2 +y 2 ) as the center / surround function, expressed as:

[0080]

[0081] where σ is the standard deviation of the Gaussian function and C is the normalization coefficient of the center / surround function.

[0082] Based on the above theory, the present invention weights in the dimensions that can be adaptively and dynamically changed and the standard deviation of the Gaussian function on the basis of SSR, satisfying:

[0083]

[0084] where N is the number of scales when using MSR.

[0085] Specifically, the embodiment of the present invention provides an adaptive image enhancement method based on dynamic adjustment of texture scale, as Figure 1 shown. The processing flow of this method can include the following steps:

[0086] S1. Perform illumination analysis on the input image to determine the illumination characteristics.

[0087] The step S1 specifically includes:

[0088] S11. Use wavelet transform to perform low-pass filtering and high-pass filtering on each row of the image pixels respectively to obtain the low-pass component and high-pass component of the row filtering.

[0089] where the scaling function used for wavelet transform is φ(t), the wavelet basis function is ψ(t), and the corresponding relationship satisfies the two-scale equation, that is:

[0090]

[0091] Among them, h[n] and g[n] respectively represent the low-pass filter coefficients and high-pass filter coefficients corresponding to the selected wavelet transform, and satisfy the orthogonal relationship with each other:

[0092] g[n] = (-1) n h[L - 1 - n] (8)

[0093] Among them, L represents the filter length.

[0094] As an alternative implementation of the present invention, the wavelet transform can adopt Haar wavelet, Daubechies wavelet, Symlet wavelet, Coiflet wavelet, Bior wavelet, Morlet wavelet, etc. Among them, the Haar wavelet is a wavelet that is relatively easy to implement and has a low complexity. Preferably, taking the Haar wavelet transform as an example, the corresponding scaling function, wavelet basis function, low-pass filter coefficients, and high-pass filter coefficients respectively satisfy:

[0095]

[0096] Perform low-pass filtering and high-pass filtering on each row of the image pixels respectively to obtain the low-pass component L and high-pass component H of the row filtering:

[0097]

[0098] Among them, L(x, n) and H(x, n) respectively represent the values of the x-th row and n-th column of the low-pass component L and high-pass component H. According to the downsampling coefficients of the high-pass filtering and low-pass filtering, the corresponding N1 scale is N / 2.

[0099] S12. Perform low-pass filtering and high-pass filtering on each column of the low-pass component L and high-pass component H of the row filtering respectively to obtain four first-level sub-band components: low-frequency component LL1, horizontal high-frequency component LH1, vertical high-frequency component HL1, and diagonal high-frequency component HH1:

[0100]

[0101] Similarly, according to the downsampling coefficients of the high-pass filtering and low-pass filtering, the corresponding scale of M1 is M / 2.

[0102] S13. Calculate the energies of the four first-level sub-band components: low-frequency component LL1, horizontal high-frequency component LH1, vertical high-frequency component HL1, and diagonal high-frequency component HH1 respectively:

[0103]

[0104] Obtain the first-level low-frequency energy Horizontal high-frequency energy Vertical high-frequency energy and diagonal high-frequency energy

[0105] S14. Given a wavelet decomposition level J≥1, when J>1, take LL1 as I, and repeat steps S11 - S13 (formulas (9) - (18)) to calculate the second-level subband components and the energy of the second-level subband components until the J-level subband components and the energy of the J-level subband components are calculated. Among them, the scales M j and N j in the calculation of the j-th level subband are calculated as M / 2 j and N / 2 j , where 1≤j≤J.

[0106] S15. Calculate the detailed texture energy of the image based on the total energy of all high-frequency subbands, and calculate the detailed texture factor based on the detailed texture energy of the image.

[0107] Among them, the detailed texture energy E texture of the image is calculated as:

[0108]

[0109] Among them, are the horizontal high-frequency energy, vertical high-frequency energy, and diagonal high-frequency energy of the j-th subband respectively.

[0110] The detailed texture factor C that measures the details of the image is expressed as:

[0111]

[0112] If C is closer to 1, it means the texture of the image is more complex, and more attention needs to be paid to the image details in a complex light environment; if C is closer to 0, it means the texture of the image is simpler, and the overall chromaticity of the image is mainly affected by light, and more attention needs to be paid to the gain of the global light in a complex light environment.

[0113] S2. Adjust the number of MSR scales according to the lighting characteristics of the image, and dynamically adjust the standard deviation of the Gaussian function for each scale.

[0114] The number of MSR scales is calculated as:

[0115]

[0116] Among them, N min is the minimum number of scales, N max is the maximum number of scales, α is the adjustment coefficient of the scale size, C is the detailed texture factor, represents rounding down.

[0117] The weighted calculation of the energy of the k-th scale is:

[0118]

[0119] Among them, w k is defined as w k = 0; The standard deviation of the Gaussian function (Gaussian blur variance) at the k-th scale is calculated as:

[0120] σ k = σ min + w k ·(σ max - σ min ) (23)

[0121] Among them, N min , N max , α, σ min and σ max Set preset values according to the usage scenario and the computing power of the device used.

[0122] S3. Perform image enhancement processing based on the adjusted MSR scale number and the standard deviation of the Gaussian function.

[0123] Different from the traditional method that uses a fixed scale number, the present invention dynamically determines the required scale number according to the illumination characteristics of the input image. This adaptive mechanism can flexibly expand or reduce the scale according to the complexity of the illumination distribution, ensuring that the algorithm can effectively capture illumination changes and image details in different scenarios. Moreover, the present invention breaks through the limitation of the preset Gaussian blur variance in the traditional method and can adaptively adjust the Gaussian blur variance in each scale according to the local or global characteristics of the image, making the illumination estimation more accurate and optimizing the balance between detail retention and illumination smoothing.

[0124] By using wavelet transform and combining the adjustment of the adaptive scale number and the Gaussian blur variance, the present invention significantly improves the robustness of the traditional method under complex illumination conditions, such as scenarios where strong light and shadow coexist, multi-light source interference, or dynamic illumination changes, thereby overcoming the problems of artifacts or distortion that are prone to occur in the traditional method under extreme conditions. Moreover, the method of the present invention does not rely on empirical parameters of specific scenarios, but realizes the adaptive optimization of parameters through image content analysis, making it applicable to a variety of application fields (such as night vision monitoring, medical image processing, outdoor image enhancement, etc.) and having higher generality and practical value.

[0125] Correspondingly, an embodiment of the present invention also provides an adaptive image enhancement device based on dynamic adjustment of texture scales, as Figure 2 shown, the device includes:

[0126] An illumination analysis module 201, configured to perform illumination analysis on the input image to determine illumination characteristics, specifically including:

[0127] Perform low-pass filtering and high-pass filtering on each row of the image pixels using wavelet transform to obtain the low-pass component and high-pass component of the row filtering;

[0128] Perform low-pass filtering and high-pass filtering on each column of the low-pass component and high-pass component of the row filtering respectively to obtain four first-level sub-band components: low-frequency component, horizontal high-frequency component, vertical high-frequency component, and diagonal high-frequency component;

[0129] Calculate the energy of the four first-level sub-band components respectively to obtain the first-level low-frequency energy, first-level horizontal high-frequency energy, first-level vertical high-frequency energy, and first-level diagonal high-frequency energy;

[0130] Given the wavelet decomposition level J, when J>1, continue to calculate the second-level sub-band components and the energy of the second-level sub-band components until the J-level sub-band components and the energy of the J-level sub-band components are calculated;

[0131] Calculate the detailed texture energy of the image according to the total energy of all high-frequency sub-bands, and calculate the detailed texture factor according to the detailed texture energy of the image;

[0132] The parameter adjustment module 202 is used to adjust the number of MSR scales according to the illumination characteristics of the image and dynamically adjust the standard deviation of the Gaussian function for each scale;

[0133] The MSR processing module 203 is used to perform image enhancement processing based on the adjusted number of MSR scales and the standard deviation of the Gaussian function.

[0134] For the sake of convenience of description, Figure 2 only the main components of the device are shown. The device of this embodiment can be used to execute Figure 1 the technical solutions of the method embodiment shown, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0135] Compared with the prior art, the present invention has the following advantages:

[0136] (1) Break through the limitation of fixed number of scales and provide higher flexibility. The invention can flexibly adjust according to the actual needs of the image by adaptively selecting the number of scales. For example, reduce the number of scales to 2 in a scene with gentle illumination to improve efficiency, and increase it to 5 in a scene with complex illumination and texture to improve enhancement accuracy. This flexibility is significantly better than the rigid design of the prior art.

[0137] (2) More accurate texture and illumination separation. The present invention combines the multi-scale analysis of wavelet decomposition to extract the texture features of the image (such as the sub-band energies in the horizontal, vertical, and diagonal directions), and based on this, independently assigns Gaussian blur variances for each scale. For example, a small variance (such as 10 - 30) is used in the high-frequency region with high texture energy to preserve details, and a large variance (such as 150 - 250) is used in the low-frequency smooth region to optimize the illumination estimation. This local self-adaptability ensures a more accurate separation of the texture and illumination components, significantly reducing artifacts.

[0138] (3) Enhanced robustness to complex illumination environments. The present invention can more robustly handle complex illumination environments by dynamically adjusting the number of scales and Gaussian blur variances. For example, when multi-level illumination changes are detected in wavelet decomposition, the number of scales is increased and the variance allocation is optimized to ensure a balance between global illumination smoothness and local detail retention. This self-adaptability enables it to perform well under extreme conditions (such as night vision monitoring or medical imaging).

[0139] (4) Optimization of computational efficiency and on-demand adjustment. The present invention determines the optimal number of scales through texture complexity analysis (such as the wavelet sub-band energy ratio) to avoid redundancy. For example, if the low-frequency energy dominates, it can be reduced to 2 scales, reducing the computational complexity. At the same time, the dynamic allocation of variances further optimizes the convolution efficiency for each scale. This on-demand adjustment has significant advantages in real-time applications (such as video enhancement).

[0140] (5) Improvement in generality and scalability. The adaptive framework of the present invention does not rely on empirical parameters of specific scenarios, but adjusts parameters based on the intrinsic characteristics of the image (such as the frequency domain characteristics of wavelet decomposition), having stronger generality. For example, it can be applied to various fields such as night vision, remote sensing, and medical imaging. In addition, the method is easy to expand. For example, it can be combined with machine learning to predict texture complexity, further improving the accuracy.

[0141] (6) Simplicity and efficiency in implementation. The present invention can use simple and efficient Haar wavelets for decomposition, extract texture features and map them to the number of scales and Gaussian blur variances. This method has low computational overhead, is suitable for embedded systems or real-time processing, and at the same time maintains high-quality enhancement effects.

[0142] In an exemplary embodiment, the present invention also provides an electronic device, which includes:

[0143] A processor;

[0144] A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are loaded and executed by the processor, the steps of the adaptive image enhancement method as described above are implemented.

[0145] In an exemplary embodiment, the present invention further provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the steps of the adaptive image enhancement method as described above. For example, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0146] It should be noted that in this document, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or terminal device comprising the element.

[0147] References in the specification to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments", etc. indicate that the embodiment may include a particular feature, structure, or characteristic, but not every embodiment necessarily includes the particular feature, structure, or characteristic. Additionally, when combining embodiments to describe a particular feature, structure, or characteristic, implementing such feature, structure, or characteristic in combination with other embodiments (whether explicitly described or not) should be within the knowledge of those skilled in the relevant art.

[0148] It should be understood that in various embodiments of the present invention, the order of the above processes does not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0149] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other may be through some interfaces, and the indirect couplings or communication connections of the devices or units may be in electrical, mechanical, or other forms.

[0150] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0151] In addition, in each embodiment of the present invention, each functional unit may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit.

[0152] If the described function is implemented in the form of 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 present invention, in essence, or the part that contributes to the prior art, or a part of this 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 enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0153] The present invention covers any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of the present invention. For the public to have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention. However, those skilled in the art can fully understand the present invention without the description of these details. In addition, well-known methods, processes, procedures, components, and circuits, etc., are not described in detail to avoid unnecessary confusion to the essence of the present invention.

[0154] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. An adaptive image enhancement method based on dynamic adjustment of texture scale, characterized in that It includes the following steps: S1. Conduct a lighting analysis on the input image to determine the lighting characteristics, specifically including: S11. Use wavelet transform to perform low-pass filtering and high-pass filtering on each row of the image pixels respectively to obtain the low-pass component and high-pass component of the row filtering; S12. Perform low-pass filtering and high-pass filtering on each column of the low-pass component and high-pass component of the row filtering respectively to obtain four first-level subband components: low-frequency component, horizontal high-frequency component, vertical high-frequency component, and diagonal high-frequency component; S13. Calculate the energies of the four first-level subband components respectively to obtain the first-level low-frequency energy, first-level horizontal high-frequency energy, first-level vertical high-frequency energy, and first-level diagonal high-frequency energy; S14. Given the wavelet decomposition level J, when J > 1, repeat steps S11 - S13 to calculate the second-level subband components and the energies of the second-level subband components until the J-level subband components and the energies of the J-level subband components are calculated; S15. Calculate the detailed texture energy of the image according to the total energy of all high-frequency subbands, and calculate the detailed texture factor according to the detailed texture energy of the image; S2. Adjust the number of MSR scales according to the lighting characteristics of the image, and dynamically adjust the standard deviation of the Gaussian function for each scale; S3. Perform image enhancement processing based on the adjusted number of MSR scales and the standard deviation of the Gaussian function.

2. The adaptive image enhancement method according to claim 1, wherein In the step S11, the scale function used in the wavelet transform is φ(t), the wavelet basis function is ψ(t), and the corresponding relationship satisfies the two-scale equation, that is: Among them, h[n] and g[n] respectively represent the low-pass filter coefficients and high-pass filter coefficients corresponding to the selected wavelet transform, and satisfy the orthogonal relationship with each other: g[n] = (-1) n h[L - 1 - n] Among them, L represents the filter length.

3. The adaptive image enhancement method according to claim 2, wherein, The scale function, wavelet basis function, low-pass filter coefficients, and high-pass filter coefficients corresponding to the wavelet transform respectively satisfy:

4. The adaptive image enhancement method according to claim 1, wherein In the step S11, perform low-pass filtering and high-pass filtering on each row of the image pixels respectively to obtain the low-pass component L and high-pass component H of the row filtering: Among them, L(x,n) and H(x,n) respectively represent the values of the x-th row and n-th column of the low-pass component L and high-pass component H; according to the downsampling coefficients of the high-pass filtering and low-pass filtering, the corresponding N1 scale is N / 2.

5. The adaptive image enhancement method according to claim 4, wherein In the step S12, perform low-pass filtering and high-pass filtering on each column of the low-pass component L and high-pass component H of the row filtering respectively to obtain four first-level subband components: low-frequency component LL1, horizontal high-frequency component LH1, vertical high-frequency component HL1, and diagonal high-frequency component HH1: Among them, according to the downsampling coefficients of the high-pass filtering and low-pass filtering, the corresponding scale of M1 is M / 2.

6. The adaptive image enhancement method according to claim 5, wherein In the step S13, calculate the energies of the four first-level subband components: low-frequency component LL1, horizontal high-frequency component LH1, vertical high-frequency component HL1, and diagonal high-frequency component HH1 respectively: Obtain the first-level low-frequency energy Horizontal high-frequency energy Vertical high-frequency energy And diagonal high-frequency energy 7. The adaptive image enhancement method according to claim 6, wherein In the step S14, a wavelet decomposition level J≥1 is given. When J>1, steps S11 - S13 are repeated to calculate the second-level subband components and the energy of the second-level subband components until the J-level subband components and the energy of the J-level subband components are calculated. Among them, the scales M j and N j in the calculation process of the j-th level subband are calculated as M / 2 j and N / 2 j , where 1≤j≤J.

8. The adaptive image enhancement method according to claim 1, wherein In the step S15, according to the total energy of all high-frequency subbands, the detailed texture energy E of the image texture is calculated as follows: Among them, are respectively the horizontal high-frequency energy, vertical high-frequency energy, and diagonal high-frequency energy of the j-th subband; The detailed texture factor C for measuring the details of the image is expressed as: If C is closer to 1, it indicates that the texture of the image is more complex, and more attention needs to be paid to the details of the image in a complex lighting environment; if C is closer to 0, it indicates that the texture of the image is simpler, and more attention needs to be paid to the lighting impact in a complex lighting environment.

9. The adaptive image enhancement method according to claim 8, wherein In the step S2, the number of MSR scales is calculated as: Among them, N min is the minimum scale number, N max is the maximum scale number, α is the adjustment coefficient of the scale size, C is the detail texture factor, represents rounding down; The energy calculation at the k-th scale is weighted and calculated as follows: where, w k is defined as w k = 0; the standard deviation of the Gaussian function at the k-th scale is calculated as: σ k = σ min + w k · (σ max - σ min ) Wherein N min , N max , α, σ min and σ max Set preset values according to the usage scenario and the computing power of the device used.

10. An adaptive image enhancement device based on dynamic adjustment of texture scale, the device is used to implement the method described in any one of claims 1 to 9, characterized in that, The device includes: A lighting analysis module for performing lighting analysis on the input image to determine lighting characteristics, specifically including: Performing low-pass filtering and high-pass filtering on each row of the image pixels using wavelet transform to obtain the low-pass component and high-pass component of the row filtering; Performing low-pass filtering and high-pass filtering on each column of the low-pass component and high-pass component of the row filtering respectively to obtain four first-level sub-band components: low-frequency component, horizontal high-frequency component, vertical high-frequency component, and diagonal high-frequency component; Calculating the energy of the four first-level sub-band components respectively to obtain the first-level low-frequency energy, first-level horizontal high-frequency energy, first-level vertical high-frequency energy, and first-level diagonal high-frequency energy; Given the wavelet decomposition level J, when J>1, continue to calculate the energy of the second-level sub-band components and the second-level sub-band components until the energy of the J-level sub-band components and the J-level sub-band components is calculated; Calculating the detailed texture energy of the image according to the total energy of all high-frequency sub-bands, and calculating the detailed texture factor according to the detailed texture energy of the image; A parameter adjustment module for adjusting the number of MSR scales according to the lighting characteristics of the image and dynamically adjusting the standard deviation of the Gaussian function for each scale; An MSR processing module for performing image enhancement processing based on the adjusted number of MSR scales and the standard deviation of the Gaussian function.