Deep learning image quality enhancement method based on adaptive local brightness enhancement and contrast balance
By employing a deep learning method that adaptively enhances local brightness and balances contrast, the problem of brightness and detail preservation in partial discharge optical image processing by traditional algorithms is solved, achieving refined enhancement of image quality and improving the reliability of power equipment detection.
Patent Information
- Application Number
- CN202511082095.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-21
AI Technical Summary
Traditional image enhancement algorithms cannot effectively balance information preservation in extreme brightness areas and discharge morphology details when processing partial discharge optical images. This results in loss of details in the core discharge area or increased background noise, making it difficult to adapt to multi-scale discharge structures and the texture features of insulating materials, thus affecting the reliability of power equipment condition detection.
A deep learning-based image quality enhancement method with adaptive local brightness enhancement and contrast balancing is adopted. By analyzing the local brightness distribution through a sliding window and combining Laplacian pyramid decomposition and a deep learning model, the enhancement level of each region is dynamically adjusted to achieve adaptive local brightness control and precise contrast enhancement while preserving key details.
It significantly improves the quality of partial discharge optical images, ensures adaptive brightness balance in the discharge area and enhanced contrast in the non-discharge area, effectively preserves key information about the discharge morphology, and improves the accuracy and reliability of power equipment detection.
Smart Images

Figure QLYQS_5 
Figure SMS_197 
Figure SMS_512
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization. BACKGROUND
[0002] In the field of power equipment insulation state detection, partial discharge optical images (such as ultraviolet imaging, visible light discharge spot image) are an important basis for evaluating equipment defects. Due to the instantaneous strong light of the discharge area, the complex reflection environment of the equipment, the low-illumination detection scene (such as night patrol or the inside of a closed cavity), and the dynamic range limitation of the sensor, the typical problems of excessive saturation of the discharge spot area and fuzzy details of the non-discharge area often occur - the extremely high brightness of the discharge core area causes pixel value overflow, the surrounding discharge channel, weak fluorescent signal or insulation surface texture is difficult to distinguish due to insufficient local dark area contrast, which directly affects the discharge type recognition (such as corona discharge, surface discharge) and defect positioning accuracy.
[0003] Traditional image enhancement algorithms (such as histogram equalization, logarithmic transformation, gamma correction) have significant limitations when processing partial discharge images: global histogram equalization can amplify noise in non-discharge areas while excessively compressing the brightness dynamic range of discharge spots, resulting in blurred edges of discharge channels; Logarithmic / gamma correction based on grayscale mapping cannot adapt to the extreme local brightness difference of "strong spot-dark background" in discharge images, often resulting in loss of details in the discharge core area or enhancement of background noise. More importantly, these algorithms generally lack targeted processing of multi-scale discharge structures (such as the coexistence of micron-level discharge filaments and millimeter-level spots) and insulation material texture features in discharge images, and cannot enhance local contrast while preserving key details of discharge patterns (such as discharge branch angles and spot gradient distribution).
[0004] Under the technical demand of intelligent patrol and automatic defect diagnosis, how to adapt to the "strong local brightness difference-multi-feature scale coexistence" characteristics of partial discharge optical images, achieve adaptive regulation of discharge area brightness, precise enhancement of non-discharge area contrast, and avoid signal distortion caused by excessive processing, has become a key technology direction to improve the reliability of power equipment state detection. This requirement not only requires the algorithm to dynamically balance the information retention of extreme brightness areas, but also needs to combine discharge physical features (such as uniform spots of glow discharge and bright channels of arc discharge) to achieve semantic-level detail enhancement, providing high-quality image input for subsequent defect classification algorithms. SUMMARY
[0005] In order to overcome the above technical deficiencies, the present application provides an image quality enhancement method that realizes fine enhancement of image quality, preserves details, suppresses noise, and improves naturalness.
[0006] The technical solution adopted by this invention to overcome its technical problems is: A deep learning-based image quality enhancement method that adapts to local brightness enhancement and contrast equalization includes: S1. Acquire partial discharge optical images ; S2. Optical images of partial discharge Enhancement is performed to obtain an enhanced optical image of partial discharge. ; S3. Enhanced partial discharge optical image Calculate the brightness-enhanced image ; S4. Optical images of partial discharge Perform contrast enhancement to obtain the contrast-enhanced image. ; S5. Partial discharge optical image The input is fed into a deep learning model, and the output is an optimized image. ; S6. Enhance image brightness Image with enhanced contrast Optimized image Obtain the partial discharge optical image after image quality enhancement. .
[0007] Furthermore, step S2 includes the following steps: S2-1. Use size is The sliding window from the partial discharge optical image Extract The local region, the first Each local region is , ; S2-2. Through formula Calculation yields the first Local area Local brightness mean In the formula For the first Local area The Middle Line 1 The pixel values of the columns of pixels. , ; S2-3. Using the formula The optical image of partial discharge was calculated. average brightness In the formula Optical images of partial discharge the height of the partial discharge optical image, is the width of the partial discharge optical image , is the pixel value of the pixel point in the i-th row and j-th column of the partial discharge optical image , , ; S2-4. The standard deviation of the brightness of the partial discharge optical image is calculated by the formula ; ; S2-5. When , the i-th local region is determined to be a brightness too low region, wherein is an adjustable parameter, when , the i-th local region is determined to be a brightness moderate region, and when , the i-th local region is determined to be an overexposure region; S2-6. For the brightness too low region, the pixel value of the pixel point in the i-th row and j-th column of the i-th brightness too low region after linear enhancement is calculated by the formula , wherein, is a gain coefficient, , is the pixel value of the pixel point with the minimum brightness value in the i-th brightness too low region; S2-7. For the overexposure region, the pixel value of the pixel point in the i-th row and j-th column of the i-th overexposure region after attenuation is calculated by the formula , wherein, , is an attenuation coefficient, is the pixel value of the pixel point with the maximum brightness value in the i-th overexposure region; S2-8. For the brightness moderate region, the pixel value of the pixel point in the i-th row and j-th column of the i-th brightness moderate region is calculated by the formula ; S2-9. constructing row weight matrix of column , the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region is calculated by the formula , wherein, is the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region, is the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region, , wherein, is the value in the i-th row and the j-th column of the weight matrix, , , , the pixel value of each pixel point in the partial discharge optical image and constitute the enhanced partial discharge optical image . Preferably, the value in step S2-5 is 1.5-2.0.
[0008] Further, if the pixel value of the pixel point in the i-th row and the j-th column of the i-th brightness too low region after attenuation is greater than 255 in step S2-7, the minimum value of the pixel value of the pixel point in the i-th row and the j-th column of the i-th brightness too low region after attenuation is obtained by , wherein, is a soft cut-off threshold.
[0009] Further, step S3 comprises the following steps: S3-1. the local brightness mean value of the i-th local region in the enhanced partial discharge optical image is calculated by the formula ; S3-2. if the absolute value of the difference between the local brightness mean value and the local brightness mean value is greater than 5%, the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region is calculated by the formula , wherein, is the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region, is the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region, is the pixel value of the pixel point in the i-th row and the j-th column of the mutual overlapping part of each local region, is the value in the i-th row and the j-th column of the weight matrix, ,
[0010] For enhanced partial discharge optical images The average brightness , For enhanced partial discharge optical images The Line 1 The pixel values of the pixels in the column; S3-3. Optical images of partial discharge The pixel values of each corresponding pixel in the middle and Constructing a brightness-enhanced image .
[0011] Furthermore, step S4 includes the following steps: S4-1. Obtain the partial discharge optical image using the Gaussian pyramid algorithm. of Image of the Gaussian Pyramid ,in For the first Image of the Gaussian pyramid ; S4-2. For the first Image of the Gaussian Pyramid The upsampled Gaussian pyramid image is obtained by performing bilinear interpolation. Through formula Calculation yields the first Layered Laplace Pyramid Image ; S4-3. Through formula Calculation yields the first Layered Laplace Pyramid Image The Local area Local brightness mean In the formula For the first Layered Laplace Pyramid Image The Local area The Middle Line 1 The pixel values of the columns are obtained through the formula. The calculation yields the first... Layered Laplace Pyramid Image The Local area Local brightness standard deviation Through formula The contrast enhancement coefficient was calculated. In the formula The target standard deviation is set in advance. S4-4. When the local brightness standard deviation is less than a preset target standard deviation , the contrast enhancement coefficient is greater than 1, at this time, the pixel value of the pixel point in the i-th local region of the j-th layer Laplacian pyramid image is calculated by the formula When the local brightness standard deviation is greater than or equal to a preset target standard deviation , the contrast enhancement coefficient is 1, at this time, the pixel value of the pixel point in the i-th local region of the j-th layer Laplacian pyramid image remains unchanged, the pixel value of the pixel point in the i-th local region of the j-th layer Laplacian pyramid image , each contrast-adjusted pixel value constitutes the i-th local region of the j-th layer contrast-adjusted Laplacian pyramid image , each contrast-adjusted local region constitutes the j-th layer contrast-adjusted Gaussian pyramid image and the j-th layer contrast-adjusted Laplacian pyramid image . S4-5. Through the following formula S4-5. Through the following formula iterations are performed, to calculate the reconstructed image , wherein is an up-sampling operation, taking the reconstructed image as the contrast-enhanced image .
[0012] Further, the deep learning model in step S5 is a U-Net model.
[0013] Further, step S6 includes the following steps: S6-1. The brightness-enhanced image Convert to YUV color space to obtain Y channel images. U-channel image V channel image Image with enhanced contrast Convert to YUV color space to obtain Y channel images. U-channel image V channel image ; Optimized image Convert to YUV color space to obtain Y channel images. U-channel image V channel image ; S6-2. Image of the Y channel Y channel image Y channel image Calculate the local variance by calculating its variance separately. , Through formula Calculate the summation details of the Y channel In the formula Gaussian kernel; for U-channel images U-channel image U-channel image Calculate the local variance by calculating its variance separately. , Through formula Calculate the total detailed parameters of the U channel. ; For V channel images V channel image V channel image Calculate the local variance by calculating its variance separately. , Through formula Calculate the total detailed index of the V channel. ; S6-3. For the Y channel image Y channel image Y channel image Normalization operations are performed separately to obtain the normalized Y-channel image. , For U-channel images U-channel image U-channel image Normalization operations are performed separately to obtain the normalized Y-channel image. For V channel images V channel image V channel image Normalization operations are performed separately to obtain the normalized V-channel image. ; S6-4. Through formula The brightness enhancement weight of the Y channel was calculated. In the formula The detail suppression coefficient, , The normalization factor for the Y channel is determined by the formula. The luminance enhancement weight of the U channel was calculated. , The normalization factor for the U channel is determined by the formula. The luminance enhancement weight of the V channel was calculated. , This is the normalization factor for the V channel; S6-5. Through formula The deep learning weights of the Y channel are calculated. In the formula For detail enhancement factor, Through formula The deep learning weights of the U-channel are calculated. Through formula The deep learning weights of the V channel are calculated. ; S6-6. Through formula The contrast equalization weight of the Y channel was calculated. Through formula The contrast equalization weight of the U channel was calculated. Through formula The contrast equalization weights of the V channel were calculated. ; S6-7. Through formula The weights of the Y channel after Gaussian filtering are calculated. Through formula The weights of the U channel after Gaussian filtering are calculated. Through formula The weights of the V channel after Gaussian filtering are calculated. ; S6-8. Enhance the brightness of the image. The pixel value of the R channel and Multiplication enhances the brightness of the image. The pixel value of the G channel and Multiply and enhance the brightness of the image. The B channel is respectively with Multiply to obtain a weighted brightness-enhanced image Image with enhanced contrast the pixel value of the R channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the B channel of the image multiplied by the pixel value of the B channel of the image multiplied by the pixel value of the B channel of the image multiplied by the pixel value of the B channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the G channel of the image multiplied by the pixel value of the G channel of the image ; S6-9. The weighted luminance enhanced image , the contrast enhanced image , and the weighted optimized image are fused to obtain the image quality enhanced partial discharge optical image .
[0014] Further, the normalization factor of the Y channel is calculated by the formula , wherein is a coefficient; the normalization factor of the U channel is calculated by the formula ; and the normalization factor of the V channel is calculated by the formula .
[0015] Preferably, 0.000001.
[0016] The beneficial effects of the present application are: analyzing the brightness distribution of the local area of the discharge image, suppressing the brightness of the excessively saturated discharge core area to avoid pixel overflow, and implementing dynamic enhancement on the dark background area with low contrast to highlight the discharge channel and texture details; using Laplacian pyramid decomposition combined with local contrast evaluation to differentially enhance different characteristic structures such as discharge filaments and light spots at multiple scales, ensuring that the texture of micron-level discharge filaments and the gradient distribution of millimeter-level light spots are both retained; designing a deep learning auxiliary module based on a convolutional neural network, which is trained end-to-end in combination with discharge physical characteristics (such as the semantic features of uniform light spots in glow discharge and bright channels in arc discharge), and simultaneously realizes noise suppression and discharge pattern key detail recovery during the enhancement process. In addition, through a multi-level fusion mechanism, the weights of each module are dynamically adjusted according to the feature complexity of different regions in the discharge image — the brightness enhancement weight is reduced for the strong light spot core area to retain gradient information, and the contrast enhancement weight is increased for the dark background area to highlight weak discharge signals, avoiding signal distortion caused by excessive processing.
[0017] For the problem of coexistence of extreme brightness difference and multi-scale features in power equipment detection scenarios, adaptive dynamic balance of discharge area brightness and precise enhancement of non-discharge area contrast are realized; through deep learning optimization combined with discharge physical semantic features, key information for defect diagnosis such as discharge branch angle and light spot gradient distribution is intelligently retained during the enhancement process, breaking through the limitations of traditional algorithms based only on gray scale statistics; the end-to-end adaptive adjustment strategy can dynamically configure the cooperative weights of local brightness, contrast enhancement and deep learning optimization according to the real-time feedback of the discharge image, effectively solving the detection pain points of "strong light spot overflow - dark area blur". Practical application shows that this method significantly improves the quality of partial discharge optical images, provides high-quality image input for the automated diagnosis of power equipment insulation defects, and has important engineering application value in low-illumination complex scenes such as intelligent inspection and internal detection of closed cavities. DETAILED DESCRIPTION
[0018] The present application will be further described below.
[0019] An adaptive local brightness enhancement and contrast balancing deep learning image quality enhancement method, comprising: S1. Obtain a partial discharge optical image .
[0020] S2. Enhance the partial discharge optical image to obtain an enhanced partial discharge optical image .
[0021] S3. Calculate a brightness enhancement image from the enhanced partial discharge optical image .
[0022] S4. Contrast enhancement is performed on the partial discharge optical image to obtain a contrast-enhanced image . .
[0023] S5. The partial discharge optical image is input into a deep learning model to output an optimized image . .
[0024] S6. The image quality-enhanced partial discharge optical image is obtained using the brightness-enhanced image , the contrast-enhanced image , and the optimized image . .
[0025] The present application realizes optimization through three cores: first, local brightness adaptive enhancement, based on sliding window or superpixel segmentation analysis of local brightness distribution, overexposed area suppression, moderate area retention, avoiding over-enhancement or detail loss of global processing; second, contrast adaptive equalization, using Laplacian pyramid to decompose multi-scale images, enhancing contrast at each level for low-contrast areas and reconstructing to ensure natural balance of details and contrast; third, deep learning assisted optimization, extracting deep features through convolutional neural network (CNN), adaptively adjusting the enhancement degree of each area, and synchronously realizing denoising and detail recovery. In addition, through a multi-level fusion mechanism, the weights of each module are dynamically adjusted according to the local features of the image (such as focusing on deep learning optimization in detail-rich areas and focusing on brightness enhancement in dark areas), and an end-to-end adaptive strategy is used to realize real-time dynamic optimization. The innovation lies in breaking through the limitations of traditional global enhancement, combining local adaptive processing, deep learning empowerment and multi-algorithm fusion to improve image brightness and contrast while effectively preserving texture details and suppressing noise, with both accuracy and naturalness.
[0026] By combining adaptive local brightness and contrast optimization with a deep learning model, fine image quality enhancement is achieved, preserving details and suppressing noise while improving naturalness.
[0027] Fine adjustment is achieved by analyzing the brightness distribution characteristics of local areas of the image: first, the image is processed locally (using the sliding window method), the brightness distribution of each local area is calculated, and adaptive mapping is performed based on the brightness deviation: the brightness of the low-brightness area is enhanced to the global equilibrium level, the original value is maintained for the moderate-brightness area, and the brightness of the overexposed area is suppressed to avoid detail loss. Specifically, in one embodiment of the present application, step S2 includes the following steps: S2-1. A sliding window with a size of is used to process the partial discharge optical image Extract The local region, the first Each local region is , .
[0028] S2-2. Through formula Calculation yields the first Local area Local brightness mean In the formula For the first Local area The Middle Line 1 The pixel values of the columns of pixels. , .
[0029] S2-3. Using the formula The optical image of partial discharge was calculated. average brightness In the formula Optical images of partial discharge height, Optical images of partial discharge width, Optical images of partial discharge The Line 1 The pixel values of the columns of pixels. , .
[0030] S2-4. Using the formula The optical image of partial discharge was calculated. luminance standard deviation .
[0031] S2-5. When The time was determined to be the first Local area This is an area with insufficient brightness, among which As an adjustable parameter, when The time was determined to be the first Local area For areas with moderate brightness, when The time was determined to be the first Local area This is an overexposed area.
[0032] S2-6. For areas with excessively low brightness, use the formula... The calculation yields the first linear enhancement. The first area with insufficient brightness Line 1 Pixel values of the columns of pixels In the formula, This is the gain coefficient. , For the first In areas with excessively low brightness, the pixel value of the pixel with the lowest brightness value should be calculated to avoid a denominator of 0.
[0033] S2-7. For overexposed areas, use the formula... Calculate the attenuated first The first overexposed area Line 1 Pixel values of the columns of pixels In the formula, The attenuation coefficient is... , For the first The pixel value of the pixel with the highest brightness value in the overexposed area.
[0034] S2-8. For areas with moderate brightness, use the formula... Calculation yields the first The first area with moderate brightness Line 1 Pixel values of the columns of pixels .
[0035] S2-9. Construction OK Column weight matrix Through formula The first part of the overlapping portion of each local region was calculated. Line 1 Pixel values of the columns of pixels In the formula Weight matrix The first in Line 1 The value of the column, , Partial discharge optical images The pixel values of each corresponding pixel in the middle and Constructing an enhanced optical image of partial discharge .
[0036] In this embodiment, in steps S2-5 The value ranges from 1.5 to 2.0.
[0037] In one embodiment of the present invention, if the attenuated first... The first area with insufficient brightness Line 1 Pixel values of the columns of pixels If the value is greater than 255, then pass. Get pixel value and The minimum value is used as the decayed first value. The first area with insufficient brightness Line number The pixel values of the columns of pixels, where This is the soft truncation threshold.
[0038] In one embodiment of the present invention, step S3 includes the following steps: S3-1. Calculation using formula The enhanced partial discharge optical image was calculated. The first in Local area Local brightness mean .
[0039] S3-2. If the local brightness average Compared with the local brightness mean If the absolute value of the difference between them is greater than 5%, then it is determined by the formula. The first part of the overlapping portion of each local region was calculated. Line number Pixel values of the columns of pixels In the formula, For enhanced partial discharge optical images The average brightness , For enhanced partial discharge optical images The Line number The pixel value of the pixel in the column.
[0040] S3-3. Optical images of partial discharge The pixel values of each corresponding pixel in the middle and Constructing a brightness-enhanced image .
[0041] In one embodiment of the present invention, step S4 includes the following steps: S4-1. Obtain the partial discharge optical image using the Gaussian pyramid algorithm. of Image of the Gaussian Pyramid ,in For the first Image of the Gaussian pyramid .
[0042] S4-2. For the first Image of the Gaussian Pyramid The upsampled Gaussian pyramid image is obtained by performing bilinear interpolation. Through formula Calculation yields the first Layered Laplace Pyramid Image The image is decomposed into high-frequency information (detail information) and low-frequency information (general outline information) at different scales using Laplacian pyramid decomposition.
[0043] S4-3. Through formula Calculation yields the first Layered Laplace Pyramid Image The Local area Local brightness mean In the formula For the first Layered Laplace Pyramid Image The Local area The Middle Line 1 The pixel values of the columns are obtained through the formula. The calculation yields the first... Layered Laplace Pyramid Image The Local area Local brightness standard deviation Through formula The contrast enhancement coefficient was calculated. In the formula The target standard deviation is the preset value.
[0044] S4-4. Standard deviation of local luminance Less than the preset target standard deviation At that time, contrast enhancement coefficient If the value is greater than 1, then by using the formula... The calculation yielded the first [unit / item] after contrast adjustment. Layered Laplace Pyramid Image The Local area The Middle Line 1 Pixel values of the columns of pixels Local brightness standard deviation Greater than or equal to the preset target standard deviation At that time, contrast enhancement coefficient The value is 1, at which point the... Layered Laplace Pyramid Image The Local area The middle The row The pixel value of the pixel point of the column remains unchanged, and the first Layer Laplacian pyramid image The first Local area Each contrast-adjusted pixel value constitutes a contrast-adjusted first Layer Laplacian pyramid image The first Local area Each contrast-adjusted local area constitutes a contrast-adjusted first Layer Gaussian pyramid image And the contrast-adjusted first Layer Laplacian pyramid image When the local brightness standard deviation Is greater than or equal to the preset target standard deviation , the enhancement coefficient is 1, and the original contrast is maintained.
[0045] S4-5. Calculate the reconstructed image Through the following formula Times of iteration, the reconstructed image , wherein Is an up-sampling operation, and the reconstructed image Is taken as the contrast-enhanced image .
[0046] First, the local standard deviation, local gradient and other indicators are used to identify the area with insufficient contrast in the image, and then the Laplacian pyramid decomposition technology is used to decompose the image into a multi-scale multi-level structure. The adaptive contrast adjustment algorithm is applied to each level image to enhance the local contrast at different scales. Finally, the multi-level images are combined through the pyramid reconstruction technology, so that the enhanced image can improve the contrast while avoiding the distortion or artifacts caused by single-scale processing, ensuring the naturalness and integrity of the contrast enhancement effect.
[0047] In an embodiment of the present application, the deep learning model in step S5 is a U-Net model. The U-Net model includes two core functions: one is adaptive adjustment of brightness and contrast, which dynamically balances the enhancement degree of each region through deep feature extraction, avoiding excessive differences between different regions; the other is noise reduction and detail restoration, which uses a large amount of low-quality image data to train the model, synchronously suppresses noise and preserves texture details during the enhancement process, solves the limitations of traditional algorithms in complex scenes, and improves the naturalness and realism of image enhancement.
[0048] In one embodiment of the present invention, step S6 includes the following steps: S6-1. Enhance the brightness of the image. Convert to YUV color space to obtain Y channel images. U-channel image V channel image Image with enhanced contrast Convert to YUV color space to obtain Y channel images. U-channel image V channel image ; Optimized image Convert to YUV color space to obtain Y channel images. U-channel image V channel image .
[0049] S6-2. Image of the Y channel Y channel image Y channel image The local variance is obtained by calculating its variance separately. , Through formula Calculate the summation details of the Y channel In the formula Gaussian kernel; for U-channel images U-channel image U-channel image The local variance is obtained by calculating its variance separately. , Through formula Calculate the total detailed parameters of the U channel. ; For V channel images V channel image V channel image The local variance is obtained by calculating its variance separately. , Through formula Calculate the total detailed index of the V channel. .
[0050] S6-3. For the Y channel image Y channel image Y channel image Normalization operations are performed separately to obtain the normalized Y-channel image. , For U-channel images U-channel image U-channel image The normalization operation is performed respectively to obtain normalized Y channel image , V channel image , V channel image , V channel image The normalization operation is performed respectively to obtain normalized V channel image .
[0051] S6-4. The luminance enhancement weight of Y channel is calculated by formula , wherein is a detail suppression coefficient, , is a normalization factor of Y channel, calculated by formula The luminance enhancement weight of U channel is calculated by formula , is a normalization factor of U channel, calculated by formula The luminance enhancement weight of V channel is calculated by formula , is a normalization factor of V channel.
[0052] S6-5. The deep learning weight of Y channel is calculated by formula , wherein is a detail enhancement coefficient, The deep learning weight of U channel is calculated by formula The deep learning weight of V channel is calculated by formula .
[0053] S6-6. The contrast balance weight of Y channel is calculated by formula , The contrast balance weight of U channel is calculated by formula The contrast balance weight of V channel is calculated by formula .
[0054] S6-7. The weight of Y channel after Gaussian filtering is calculated by formula , The weight of U channel after Gaussian filtering is calculated by formula The weight of V channel after Gaussian filtering is calculated by formula .
[0055] S6-8. The luminance enhancement image The pixel value of the R channel and Multiplication enhances the brightness of the image. The pixel value of the G channel and Multiply and enhance the brightness of the image. The B channel is respectively with Multiply to obtain a weighted brightness-enhanced image Image with enhanced contrast The pixel value of the R channel and Multiplication enhances the contrast of the image. The pixel value of the G channel and Multiplication, image with enhanced contrast The B channel is respectively with Multiplying yields a weighted image with enhanced contrast. The optimized image The pixel value of the R channel and Multiply, and optimize the image The pixel value of the G channel and Multiply and optimize the image The B channel is respectively with Multiplication yields a weighted, optimized image. .
[0056] S6-9. Enhance the weighted brightness image Image with enhanced contrast Weighted and optimized images By fusing the images, a partial discharge optical image with enhanced image quality is obtained. .
[0057] In step S6-4, the formula is used. The normalization factor of the Y channel was calculated. In the formula For coefficients; through the formula The normalization factor of the U channel was calculated. ; through formula The normalization factor of the V channel was calculated. The system employs a global optimization algorithm to fuse images enhanced by brightness, balanced by contrast, and optimized by deep learning at multiple levels. It dynamically allocates weights for each module based on local image features—for example, reducing the weight of brightness enhancement in areas rich in detail and emphasizing deep learning optimization to preserve texture, while increasing the weight of brightness enhancement in dark areas to improve visibility. Simultaneously, the system adjusts the module weight coefficients in real time based on the image's global information and local features, ensuring a balance between brightness, contrast, and detail preservation, avoiding distortion caused by overprocessing, and achieving adaptive optimization for different scenes and lighting conditions.
[0058] In this embodiment, The value is 0.000001, to avoid the denominator being 0.
[0059] Finally, it should be noted that the above only for the preferred embodiments of the present application, and is not intended to limit the application, although the foregoing embodiments of the application has been described in detail, for those skilled in the art, it still can be modified, or part of the technical features of the equivalent replacement of the technical solutions described in the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application, should be included within the scope of the present application.
Claims
1. A deep learning-based image quality enhancement method that adaptively enhances local brightness and balances contrast, characterized in that, include: S1. Acquire partial discharge optical images ; S2. Optical images of partial discharge Enhancement is performed to obtain an enhanced optical image of partial discharge. ; S3. Enhanced partial discharge optical image Calculate the brightness-enhanced image ; S4. Optical images of partial discharge Perform contrast enhancement to obtain the contrast-enhanced image. ; S5. Partial discharge optical image The input is fed into a deep learning model, and the output is an optimized image. ; S6. Enhance image brightness Image with enhanced contrast Optimized image Obtain the partial discharge optical image after image quality enhancement. .
2. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 1, characterized in that, Step S2 includes the following steps: S2-1. Use size is The sliding window from the partial discharge optical image Extract The local region, the first Each local region is , ; S2-2. Through formula Calculation yields the first Local area Local brightness mean In the formula For the first Local area The Middle Line 1 The pixel values of the columns of pixels. , ; S2-3. Using the formula The optical image of partial discharge was calculated. average brightness In the formula Optical images of partial discharge height, Optical images of partial discharge width, Optical images of partial discharge The Line 1 The pixel values of the columns of pixels. , ; S2-4. Using the formula The optical image of partial discharge was calculated. luminance standard deviation ; S2-5. When The time was determined to be the first Local area This is an area with insufficient brightness, among which As an adjustable parameter, when The time was determined to be the first Local area For areas with moderate brightness, when The time was determined to be the first Local area This is an overexposed area; S2-6. For areas with excessively low brightness, use the formula... The calculation yields the first linear enhancement. The first area with insufficient brightness Line 1 Pixel values of the columns of pixels In the formula, This is the gain coefficient. , For the first The pixel value of the pixel with the lowest brightness value in a region with excessively low brightness; S2-7. For overexposed areas, use the formula... Calculate the attenuated first The first overexposed area Line 1 Pixel values of the columns of pixels In the formula, The attenuation coefficient is... , For the first The pixel value of the pixel with the highest brightness value in the overexposed area; S2-8. For areas with moderate brightness, use the formula... Calculation yields the first The first area with moderate brightness Line 1 Pixel values of the columns of pixels ; S2-9. Construction OK Column weight matrix Through formula The first part of the overlapping portion of each local region was calculated. Line 1 Pixel values of the columns of pixels In the formula Weight matrix The first in Line 1 The value of the column, , Partial discharge optical images The pixel values of each corresponding pixel in the middle and Constructing an enhanced optical image of partial discharge .
3. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 2, characterized in that: In steps S2-5 The value ranges from 1.5 to 2.
0.
4. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 2, characterized in that: In steps S2-7, if the attenuated first... The first area with insufficient brightness Line 1 Pixel values of the columns of pixels If the value is greater than 255, then pass. Get pixel value and The minimum value is used as the decayed first value. The first area with insufficient brightness Line 1 The pixel values of the columns of pixels, where This is the soft truncation threshold.
5. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 2, characterized in that, Step S3 includes the following steps: S3-1. Calculation using formula The enhanced partial discharge optical image was calculated. The first in Local area Local brightness mean ; S3-2. If the local brightness average Compared with the local brightness mean If the absolute value of the difference between them is greater than 5%, then it is determined by the formula. The first part of the overlapping portion of each local region was calculated. Line 1 Pixel values of the columns of pixels In the formula, For enhanced partial discharge optical images The average brightness , For enhanced partial discharge optical images The Line 1 The pixel values of the pixels in the column; S3-3. Optical images of partial discharge The pixel values of each corresponding pixel in the middle and Constructing a brightness-enhanced image .
6. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 2, characterized in that, Step S4 includes the following steps: S4-1. Obtain the partial discharge optical image using the Gaussian pyramid algorithm. of Image of the Gaussian Pyramid ,in For the first Image of the Gaussian pyramid ; S4-2. For the first Image of the Gaussian Pyramid The upsampled Gaussian pyramid image is obtained by performing bilinear interpolation. Through formula Calculation yields the first Layered Laplace Pyramid Image ; S4-3. Through formula Calculation yields the first Layered Laplace Pyramid Image The Local area Local brightness mean In the formula For the first Layered Laplace Pyramid Image The Local area The Middle Line 1 The pixel values of the columns are obtained through the formula. The calculation yields the first... Layered Laplace Pyramid Image The Local area Local brightness standard deviation Through formula The contrast enhancement coefficient was calculated. In the formula The target standard deviation is set in advance. S4-4. Standard deviation of local luminance Less than the preset target standard deviation At that time, contrast enhancement coefficient If the value is greater than 1, then by using the formula... The first result after contrast adjustment was calculated. Layered Laplace Pyramid Image The Local area The Middle Line 1 Pixel values of the columns of pixels Local brightness standard deviation Greater than or equal to the preset target standard deviation At that time, contrast enhancement coefficient The value is 1, at which point the... Layered Laplace Pyramid Image The Local area The Middle Line 1 The pixel values of the pixels in the column remain unchanged, the first Layered Laplace Pyramid Image The Local area Each pixel value after contrast adjustment constitutes the first pixel value after contrast adjustment. Layered Laplace Pyramid Image The Local area Each local area after contrast adjustment constitutes the first local area after contrast adjustment. Image of the Gaussian pyramid layer and the first after ratio adjustment Laplace Pyramid Image ; S4-5. Using the following formula conduct In the next iteration, the reconstructed image is calculated. In the formula For upsampling operations, the reconstructed image As a contrast-enhanced image .
7. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 1, characterized in that: The deep learning model in step S5 is the U-Net model.
8. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 1, characterized in that, Step S6 includes the following steps: S6-1. Enhance the brightness of the image. Convert to YUV color space to obtain Y channel images. U-channel image V channel image Image with enhanced contrast Convert to YUV color space to obtain Y channel images. U-channel image V channel image ; Optimized image Convert to YUV color space to obtain Y channel images. U-channel image V channel image ; S6-2. Image of the Y channel Y channel image Y channel image The local variance is obtained by calculating its variance separately. , Through formula Calculate the summation details of the Y channel In the formula For Gaussian kernel; For U-channel images U-channel image U-channel image The local variance is obtained by calculating its variance separately. , Through formula Calculate the total detailed parameters of the U channel. ; For V channel images V channel image V channel image The local variance is obtained by calculating its variance separately. , Through formula Calculate the total detailed index of the V channel. ; S6-3. For the Y channel image Y channel image Y channel image Normalization operations are performed separately to obtain the normalized Y-channel image. , For U-channel images U-channel image U-channel image Normalization operations are performed separately to obtain the normalized Y-channel image. For V channel images V channel image V channel image Normalization operations are performed separately to obtain the normalized V-channel image. ; S6-4. Through formula The luminance enhancement weight of the Y channel was calculated. In the formula The detail suppression coefficient, , The normalization factor for the Y channel is determined by the formula. The luminance enhancement weight of the U channel was calculated. , The normalization factor for the U channel is determined by the formula. The luminance enhancement weight of the V channel was calculated. , This is the normalization factor for the V channel; S6-5. Through formula The deep learning weights of the Y channel are calculated. In the formula For detail enhancement factor, Through formula The deep learning weights of the U-channel are calculated. Through formula The deep learning weights of the V channel are calculated. ; S6-6. Through formula The contrast equalization weight of the Y channel is calculated. Through formula The contrast equalization weight of the U channel was calculated. Through formula The contrast equalization weights of the V channel were calculated. ; S6-7. Through formula The weights of the Y channel after Gaussian filtering are calculated. Through formula The weights of the U channel after Gaussian filtering are calculated. Through formula The weights of the V channel after Gaussian filtering are calculated. ; S6-8. Enhance the brightness of the image. The pixel value of the R channel and Multiplication enhances the brightness of the image. The pixel value of the G channel and Multiply and enhance the brightness of the image. The B channel is respectively with Multiply to obtain a weighted brightness-enhanced image Image with enhanced contrast The pixel value of the R channel and Multiplication enhances the contrast of the image. The pixel value of the G channel and Multiplication, image with enhanced contrast The B channel is respectively with Multiplying yields a weighted image with enhanced contrast. The optimized image The pixel value of the R channel and Multiply, and optimize the image The pixel value of the G channel and Multiply and optimize the image The B channel is respectively with Multiplication yields a weighted, optimized image. ; S6-9. Enhance the weighted brightness image Image with enhanced contrast Weighted and optimized images By fusing the images, a partial discharge optical image with enhanced image quality is obtained. .
9. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 8, characterized in that: In step S6-4, the formula is used. The normalization factor of the Y channel was calculated. In the formula For coefficients; through the formula The normalization factor of the U channel was calculated. ; through formula The normalization factor of the V channel was calculated. .
10. The deep learning image quality enhancement method for adaptive local brightness enhancement and contrast equalization according to claim 9, characterized in that: The value is 0.000001.