Power grid inspection image-oriented illumination self-adaptive enhancement method, system and device
Patent Information
- Application Number
- CN202611151269.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-08-28
AI Technical Summary
然而,相关的图像增强方式大多采用固定的参数或单一的算法进行处理,面对不同时间段、不同天气下的复杂光照场景时,难以进行针对性的有效调整,容易出现增强图像亮度失真等情况,导致增强图像的质量较差
[0040] The aforementioned method, system, computer device, computer-readable storage medium, and computer program product for adaptive illumination enhancement of power grid inspection images acquire a power grid inspection image to be processed, perform illumination state recognition processing on the image to obtain illumination state features, and generate local and global enhancement parameters for the image. This facilitates accurate determination of the current true illumination distribution of the image and provides a basic local and global adjustment benchmark. Furthermore, by determining the enhancement intensity coefficient corresponding to the power grid inspection image based on the illumination state features, and based on the enhancement... The intensity coefficient is used to adjust the local enhancement parameters and the global enhancement parameters to obtain the target local enhancement parameters and the target global enhancement parameters of the power grid inspection image to be processed. This is beneficial for achieving differentiated and adaptive dynamic parameter control for images under different lighting conditions, avoiding over-enhancement or under-enhancement caused by using fixed parameters. Based on the target local enhancement parameters and the target global enhancement parameters, the power grid inspection image to be processed is enhanced to obtain the enhanced image corresponding to the power grid inspection image to be processed. This is beneficial for maintaining the consistency of global brightness and color while restoring details in local dark areas, thereby improving the quality of the enhanced image.
Smart Images

Figure CN122656949A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an adaptive illumination enhancement method, system, and device for power grid inspection images. Background Technology
[0002] With the continuous advancement of smart grid construction, the use of drones or inspection robots for power grid equipment inspection has become an important direction for power grid operation and maintenance development due to its safety and efficiency advantages. The quality of the inspection images directly affects the reliability of subsequent equipment defect identification and condition assessment.
[0003] Currently, during power grid inspections, due to the complex and variable outdoor lighting conditions, it is often necessary to enhance the acquired inspection images. However, most image enhancement methods use fixed parameters or a single algorithm, which makes it difficult to make targeted and effective adjustments when faced with complex lighting scenarios at different times and in different weather conditions. This can easily lead to issues such as brightness distortion in the enhanced image, resulting in poor image quality. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, system, computer device, computer-readable storage medium, and computer program product for adaptive illumination enhancement of power grid inspection images that can improve the quality of enhanced images, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides an adaptive illumination enhancement method for power grid inspection images. The method includes:
[0006] Acquire the power grid inspection images to be processed;
[0007] The power grid inspection image is processed for illumination status recognition to obtain the illumination status features of the power grid inspection image, and local enhancement parameters and global enhancement parameters of the power grid inspection image are generated.
[0008] Based on the illumination characteristics, the enhancement intensity coefficient corresponding to the power grid inspection image is determined;
[0009] Based on the enhancement intensity coefficient, the local enhancement parameters and the global enhancement parameters are adjusted to obtain the target local enhancement parameters and the target global enhancement parameters of the power grid inspection image;
[0010] Based on the target local enhancement parameters and the target global enhancement parameters, the power grid inspection image is enhanced to obtain the enhanced image corresponding to the power grid inspection image.
[0011] In one embodiment, the step of performing illumination state recognition processing on the power grid inspection image to obtain the illumination state features of the power grid inspection image includes:
[0012] The power grid inspection image is processed by region extraction to obtain the equipment target area and background area of the power grid inspection image;
[0013] Illumination feature recognition processing is performed on the target area of the device and the background area respectively to obtain the regional illumination features of the target area of the device and the background brightness interference features of the background area.
[0014] The illumination state characteristics are determined based on the regional illumination characteristics and the background brightness interference characteristics.
[0015] In one embodiment, the local enhancement parameters include a multiplicative adjustment map and an additive adjustment map, and the global enhancement parameters include a color transformation matrix and a brightness correction parameter;
[0016] The local enhancement parameters and global enhancement parameters for generating the power grid inspection image include:
[0017] Local feature extraction processing is performed on the power grid inspection image to obtain the multiplication adjustment map and the addition adjustment map;
[0018] Global feature extraction processing is performed on the power grid inspection image to obtain the color transformation matrix and the brightness correction parameters.
[0019] In one embodiment, adjusting the local enhancement parameters and the global enhancement parameters according to the enhancement intensity coefficient to obtain the target local enhancement parameters and target global enhancement parameters of the power grid inspection image includes:
[0020] Based on the enhancement intensity coefficient, the multiplication adjustment diagram is adjusted to obtain the target multiplication adjustment diagram, and based on the enhancement intensity coefficient, the addition adjustment diagram is adjusted to obtain the target addition adjustment diagram.
[0021] The target local enhancement parameters are determined based on the target multiplication adjustment diagram and the target addition adjustment diagram;
[0022] Based on the enhancement intensity coefficient, the brightness correction parameters are adjusted to obtain the target brightness correction parameters;
[0023] The target global enhancement parameters are determined based on the color transformation matrix and the target brightness correction parameters.
[0024] In one embodiment, the step of enhancing the power grid inspection image based on the target local enhancement parameters and the target global enhancement parameters to obtain an enhanced image corresponding to the power grid inspection image includes:
[0025] Based on the target multiplication adjustment map and the target addition adjustment map, the power grid inspection image is subjected to local pixel adjustment processing to obtain the local adjustment image corresponding to the power grid inspection image;
[0026] Based on the color transformation matrix, the local adjustment image is subjected to color correction processing to obtain the color-corrected image corresponding to the power grid inspection image;
[0027] Based on the target brightness correction parameters, the color-corrected image is subjected to brightness response correction processing to obtain the enhanced image.
[0028] In one embodiment, after enhancing the power grid inspection image according to the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image, the method further includes:
[0029] The enhanced image is subjected to defect detection processing to obtain the defect detection result of the enhanced image;
[0030] If the defect detection result does not meet the preset conditions, the enhancement intensity coefficient is adjusted based on the defect detection result, and the process jumps to the step of adjusting the local enhancement parameter and the global enhancement parameter based on the enhancement intensity coefficient, until the defect detection result meets the preset conditions.
[0031] Secondly, this application also provides an adaptive illumination enhancement system for power grid inspection images. The system includes:
[0032] The image acquisition module is used to acquire power grid inspection images to be processed.
[0033] The status recognition module is used to perform illumination status recognition processing on the power grid inspection image, obtain the illumination status features of the power grid inspection image, and generate local enhancement parameters and global enhancement parameters of the power grid inspection image.
[0034] The coefficient determination module is used to determine the enhancement intensity coefficient corresponding to the power grid inspection image based on the illumination state characteristics.
[0035] The parameter adjustment module is used to adjust the local enhancement parameters and the global enhancement parameters according to the enhancement intensity coefficient to obtain the target local enhancement parameters and the target global enhancement parameters of the power grid inspection image.
[0036] The image processing module is used to perform enhancement processing on the power grid inspection image according to the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image.
[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0039] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above aspects.
[0040] The aforementioned method, system, computer device, computer-readable storage medium, and computer program product for adaptive illumination enhancement of power grid inspection images acquire a power grid inspection image to be processed, perform illumination state recognition processing on the image to obtain illumination state features, and generate local and global enhancement parameters for the image. This facilitates accurate determination of the current true illumination distribution of the image and provides a basic local and global adjustment benchmark. Furthermore, by determining the enhancement intensity coefficient corresponding to the power grid inspection image based on the illumination state features, and based on the enhancement... The intensity coefficient is used to adjust the local enhancement parameters and the global enhancement parameters to obtain the target local enhancement parameters and the target global enhancement parameters of the power grid inspection image to be processed. This is beneficial for achieving differentiated and adaptive dynamic parameter control for images under different lighting conditions, avoiding over-enhancement or under-enhancement caused by using fixed parameters. Based on the target local enhancement parameters and the target global enhancement parameters, the power grid inspection image to be processed is enhanced to obtain the enhanced image corresponding to the power grid inspection image to be processed. This is beneficial for maintaining the consistency of global brightness and color while restoring details in local dark areas, thereby improving the quality of the enhanced image. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating an adaptive illumination enhancement method for power grid inspection images in one embodiment.
[0043] Figure 2 This is a schematic diagram of the overall structure in one embodiment;
[0044] Figure 3 This is a schematic diagram of a local branch structure in one embodiment;
[0045] Figure 4 This is a schematic diagram of the global branch structure in one embodiment;
[0046] Figure 5 This is a schematic diagram of the image reconstruction process in one embodiment;
[0047] Figure 6 This is a flowchart illustrating an adaptive illumination enhancement method for power grid inspection images in another embodiment.
[0048] Figure 7 This is a block diagram of an illumination adaptive enhancement system for power grid inspection images in one embodiment;
[0049] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0052] In one exemplary embodiment, such as Figure 1As shown, an adaptive illumination enhancement method for power grid inspection images is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc.; the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. In this embodiment, the method includes the following steps:
[0053] Step S101: Obtain the power grid inspection image to be processed;
[0054] Step S102: Perform illumination state recognition processing on the power grid inspection image to obtain the illumination state features of the power grid inspection image, and generate local enhancement parameters and global enhancement parameters of the power grid inspection image.
[0055] Step S103: Determine the enhancement intensity coefficient corresponding to the power grid inspection image based on the illumination status characteristics;
[0056] Step S104: Adjust the local enhancement parameters and global enhancement parameters according to the enhancement intensity coefficient to obtain the target local enhancement parameters and target global enhancement parameters of the power grid inspection image;
[0057] Step S105: Based on the target local enhancement parameters and the target global enhancement parameters, perform enhancement processing on the power grid inspection image to obtain the enhanced image corresponding to the power grid inspection image.
[0058] The power grid inspection images to be processed can be images of areas containing power grid equipment such as conductors, towers, insulators, fittings, switchgear, transformers, or cable terminals.
[0059] The illumination state recognition process can be a process of calculating the average brightness, dark area ratio, overexposure ratio, local contrast and sharpness of the image.
[0060] Among them, illumination state features can be feature data used to characterize the overall brightness of the image, the proportion of low-brightness areas, the proportion of high-brightness saturated areas, and the visibility of edge textures.
[0061] Among them, the local enhancement parameters can be a multiplicative adjustment map used to proportionally adjust the pixel brightness at different spatial locations, and an additive adjustment map used to offset compensation for local areas.
[0062] The global enhancement parameters can be color transformation matrices used for linear combination and color correction of different color channels, and gamma correction parameters used for nonlinear adjustment of the overall brightness response of the image.
[0063] The enhancement intensity coefficient can be a value between 0 and 1 that is dynamically generated based on the characteristics of the illumination state, and is used to control the magnitude of the enhancement.
[0064] Among them, the target local enhancement parameters can be multiplicative adjustment diagrams and additive adjustment diagrams after the enhancement intensity coefficient is adjusted.
[0065] The target global enhancement parameters can be the color transformation matrix and gamma correction parameters after the enhancement intensity coefficient has been adjusted.
[0066] The enhancement process can involve adjusting local pixels using local enhancement parameters of the target, performing global color and brightness correction using global enhancement parameters of the target, and finally obtaining pixel values within a preset range through numerical cropping.
[0067] An enhanced image can be an output image in which local details are restored while global color and brightness remain consistent.
[0068] Optionally, the terminal acquires a power grid inspection image to be processed; performs illumination state recognition processing on the power grid inspection image to be processed to obtain illumination state features of the power grid inspection image to be processed, and generates local enhancement parameters and global enhancement parameters of the power grid inspection image to be processed; determines the enhancement intensity coefficient corresponding to the power grid inspection image to be processed based on the illumination state features; adjusts the local enhancement parameters and global enhancement parameters based on the enhancement intensity coefficient to obtain target local enhancement parameters and target global enhancement parameters of the power grid inspection image to be processed; and performs enhancement processing on the power grid inspection image to be processed based on the target local enhancement parameters and target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image to be processed.
[0069] For example, the terminal acquires a power grid inspection image containing power grid equipment areas captured by the acquisition device; it performs a brightness space transformation on the power grid inspection image to extract data such as the average brightness, the proportion of dark areas, and the proportion of overexposure, as the illumination state features of the power grid inspection image to be processed; and it generates local enhancement parameters and global enhancement parameters of the power grid inspection image to be processed through local and global branches, respectively; based on the underexposure or overexposure situation reflected by the illumination state features, it calculates the enhancement intensity coefficient corresponding to the power grid inspection image to be processed; using the enhancement intensity coefficient, it performs scaling and other adjustment processing on the local enhancement parameters and global enhancement parameters, respectively, to obtain the target local enhancement parameters and target global enhancement parameters of the power grid inspection image to be processed; it uses the target local enhancement parameters to perform pixel-level local adjustments on the power grid inspection image to be processed, and uses the target global enhancement parameters to perform enhancement processing such as cross-channel color correction and brightness response correction, and finally outputs the enhanced image corresponding to the power grid inspection image to be processed.
[0070] In the aforementioned adaptive illumination enhancement method for power grid inspection images, the method acquires the power grid inspection image to be processed and performs illumination state recognition processing on it to obtain the illumination state features. This generates local and global enhancement parameters for the image, which helps to accurately determine the current real illumination distribution and provides a basic local and global adjustment benchmark. Furthermore, based on the illumination state features, the method determines the corresponding enhancement intensity coefficient of the power grid inspection image and adjusts the local and global enhancement parameters accordingly to obtain the target local and target global enhancement parameters. This facilitates differentiated and adaptive dynamic parameter control for images under different illumination conditions, avoiding over-enhancement or under-enhancement caused by fixed parameters. Finally, based on the target local and target global enhancement parameters, the method enhances the power grid inspection image to obtain the enhanced image. This helps to restore details in local dark areas while maintaining global brightness and color consistency, thereby improving the quality of the enhanced image.
[0071] In an exemplary embodiment, illumination status recognition processing is performed on a power grid inspection image to obtain illumination status features of the power grid inspection image, including: performing region extraction processing on the power grid inspection image to obtain the equipment target area and background area of the power grid inspection image; performing illumination feature recognition processing on the equipment target area and background area respectively to obtain the regional illumination features of the equipment target area and the background brightness interference features of the background area; and determining the illumination status features based on the regional illumination features and the background brightness interference features.
[0072] Among them, region extraction processing can be a process of dividing an image into regions with different attributes through methods such as target detection, coarse localization of device regions, extraction of salient regions or edge structure extraction.
[0073] The target area of the equipment can be an image area containing the main body of power grid equipment such as conductors, insulators, fittings, poles, switchgear, transformers or cable terminals.
[0074] The background area can be an image area that is not the device itself, such as the sky, vegetation, ground, buildings, or distant background.
[0075] Among them, illumination feature recognition processing can be a process of calculating data such as the average brightness, dark area ratio, overexposure ratio, edge contrast or sharpness within a specific area.
[0076] Among them, the regional illumination features can be feature vectors used to characterize the brightness, contrast, and texture visibility of the target area of the device.
[0077] Among them, background brightness interference features can be feature data used to characterize the degree of interference caused by the background area to the overall illumination judgment.
[0078] Optionally, the terminal performs region extraction processing on the power grid inspection image, dividing the image into equipment target areas containing devices such as conductors or insulators, and background areas containing non-equipment devices such as sky or vegetation, through methods such as target detection or edge structure extraction; it then performs illumination feature recognition processing on the equipment target areas and background areas respectively, calculating data such as the average brightness, dark area ratio, and contrast of the equipment target areas to obtain regional illumination features, and calculating the brightness distribution of the background areas to obtain background brightness interference features; based on the regional illumination features and background brightness interference features, it comprehensively evaluates the actual visibility requirements of the power grid equipment itself and determines the illumination status features.
[0079] The technical solution provided in this embodiment helps to avoid interference from the background sky or local strong reflective areas on the light judgment, thereby making the determined light state characteristics closer to the actual visibility requirements of the target area of the power grid equipment.
[0080] In an exemplary embodiment, the local enhancement parameters include a multiplicative adjustment map and an additive adjustment map, and the global enhancement parameters include a color transformation matrix and a brightness correction parameter. Generating the local and global enhancement parameters of the power grid inspection image includes: performing local feature extraction processing on the power grid inspection image to obtain a multiplicative adjustment map and an additive adjustment map; and performing global feature extraction processing on the power grid inspection image to obtain a color transformation matrix and a brightness correction parameter.
[0081] Local feature extraction can be a process that uses depthwise separable convolution, pixel enhancement modules, and illumination normalization units to extract local spatial and channel features.
[0082] The global feature extraction process can be a process of using a lightweight encoder to extract the overall illumination and color distribution information of the image, and then combining it with attention calculation to perform feature aggregation.
[0083] Among them, the brightness correction parameter can be a gamma correction parameter used to non-linearly adjust the overall brightness response curve of the image.
[0084] Optionally, the terminal performs local feature extraction processing on the power grid inspection image, using local branches to extract local spatial location information while keeping the input resolution unchanged, generating a multiplicative adjustment map for pixel-by-pixel proportional adjustment and an additive adjustment map for pixel-by-pixel bias compensation; and performs global feature extraction processing on the power grid inspection image, using global branches to extract the overall illumination and color distribution context information of the image, predicting the color transformation matrix for cross-channel linear combination and the brightness correction parameters for nonlinear brightness adjustment.
[0085] The technical solution provided in this embodiment is beneficial for targeted parameter prediction for local details and global color, thereby providing an accurate adjustment basis for subsequent collaborative enhancement.
[0086] In an exemplary embodiment, the local enhancement parameters and global enhancement parameters are adjusted according to the enhancement intensity coefficient to obtain the target local enhancement parameters and target global enhancement parameters of the power grid inspection image. This includes: adjusting the multiplicative adjustment map according to the enhancement intensity coefficient to obtain the target multiplicative adjustment map, and adjusting the additive adjustment map according to the enhancement intensity coefficient to obtain the target additive adjustment map; determining the target local enhancement parameters based on the target multiplicative adjustment map and the target additive adjustment map; adjusting the brightness correction parameters according to the enhancement intensity coefficient to obtain the target brightness correction parameters; and determining the target global enhancement parameters based on the color transformation matrix and the target brightness correction parameters.
[0087] The adjustment process can be a process of scaling or linearly mapping the initial enhancement parameters using the enhancement intensity coefficient.
[0088] The target multiplication adjustment diagram can be a multiplication diagram used to control the final local proportional gain after the enhancement intensity coefficient has been adjusted.
[0089] The target additive adjustment map can be an additive map used to control the final local brightness compensation after the enhancement intensity coefficient has been adjusted.
[0090] The target brightness correction parameter can be a gamma parameter used to control the final overall brightness response after the enhancement intensity coefficient is adjusted.
[0091] Optionally, the terminal performs proportional adjustment processing on the multiplicative adjustment map according to the enhancement intensity coefficient to obtain a target multiplicative adjustment map adapted to the current illumination conditions, and performs bias adjustment processing on the additive adjustment map according to the enhancement intensity coefficient to obtain a target additive adjustment map; the target local enhancement parameters are determined by combining the target multiplicative adjustment map and the target additive adjustment map; the brightness correction parameters are adjusted by the response curve according to the enhancement intensity coefficient to obtain the target brightness correction parameters; and the target global enhancement parameters are determined by combining the invariant color transformation matrix and the target brightness correction parameters.
[0092] The technical solution provided in this embodiment is beneficial for dynamically controlling the extent of local detail restoration and global brightness enhancement, thereby improving the stability and naturalness of image enhancement results under different lighting conditions.
[0093] In an exemplary embodiment, the power grid inspection image is enhanced according to the target local enhancement parameters and the target global enhancement parameters to obtain an enhanced image corresponding to the power grid inspection image. This includes: performing local pixel adjustment processing on the power grid inspection image according to the target multiplicative adjustment map and the target additive adjustment map to obtain a locally adjusted image corresponding to the power grid inspection image; performing color correction processing on the locally adjusted image according to the color transformation matrix to obtain a color-corrected image corresponding to the power grid inspection image; and performing brightness response correction processing on the color-corrected image according to the target brightness correction parameters to obtain an enhanced image.
[0094] Among them, local pixel adjustment processing can be a process of performing element-wise multiplication operation using the target multiplication adjustment map and performing bias addition processing in combination with the target addition adjustment map.
[0095] Among them, the locally adjusted image can be an image in which dark area details and local weak texture information have been initially restored.
[0096] Color correction processing can be a process of linearly combining pixel values of different color channels using a color transformation matrix.
[0097] Among them, a color-corrected image can be an image that maintains a consistent overall color distribution and eliminates color shifts.
[0098] Among them, the brightness response correction process can be a process of nonlinear mapping using the target brightness correction parameters, followed by nonnegative constraints and numerical clipping.
[0099] Optionally, the terminal performs local pixel adjustment processing on the power grid inspection image, such as pixel-by-pixel proportional gain and bias compensation, based on the target multiplicative adjustment map and the target additive adjustment map, to obtain a locally adjusted image with improved visibility of details in dark areas; based on the color transformation matrix, it performs color correction processing on the locally adjusted image, such as cross-channel linear combination, to obtain a color-corrected image with good color consistency; based on the target brightness correction parameters, it performs brightness response correction processing on the color-corrected image, such as nonlinear mapping, and limits it to a preset range through numerical cropping to obtain the final enhanced image.
[0100] The technical solution provided in this embodiment, by sequentially performing local pixel adjustment processing, color correction processing, and brightness response correction processing, helps to improve the visibility of dark areas while avoiding overall distortion and local artifacts.
[0101] In an exemplary embodiment, after enhancing the power grid inspection image according to the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image, the method further includes: performing defect detection processing on the enhanced image to obtain the defect detection result of the enhanced image; if the defect detection result does not meet the preset conditions, performing feedback adjustment processing on the enhancement intensity coefficient according to the defect detection result, and jumping to the step of adjusting the local enhancement parameters and global enhancement parameters according to the enhancement intensity coefficient, until the defect detection result meets the preset conditions.
[0102] Among them, defect detection processing can be a process of inputting enhanced images into target detection, defect recognition, or state assessment models for recognition.
[0103] Among them, the defect detection results can be detection output information that includes data such as target bounding box, category label, detection confidence, number of false detections or missed detections.
[0104] The preset conditions can be judgment criteria such as improved detection confidence, no increase in the number of false detections, no color distortion, or no aggravation of local overexposure.
[0105] The feedback adjustment process can be a process of reducing or increasing the enhancement strength coefficient or adjusting the global gamma parameters based on the defect detection results.
[0106] Optionally, after obtaining the enhanced image, the terminal performs defect detection processing on the enhanced image, inputs the enhanced image into a defect detection model, and obtains a defect detection result including detection confidence, false detection, and missed detection. If the defect detection result indicates an increase in false background detections or that the target is still not visible, thus failing to meet preset conditions, the terminal performs feedback adjustment processing, such as decreasing or increasing the enhancement intensity coefficient, based on the defect detection result. Then, it jumps to the step of adjusting local and global enhancement parameters based on the enhancement intensity coefficient, and re-executes image reconstruction until the defect detection result meets the preset conditions of increased confidence and no increase in false detections. For example, the terminal performs defect detection processing on the enhanced image to obtain a defect detection result. If the defect detection result does not meet preset conditions, the terminal performs feedback adjustment processing on the enhancement intensity coefficient based on the defect detection result, uses the adjusted enhancement intensity coefficient as the new enhancement intensity coefficient, and jumps to the step of adjusting local and global enhancement parameters based on the enhancement intensity coefficient until the obtained defect detection result meets the preset conditions.
[0107] The technical solution provided in this embodiment helps to form a closed loop between the image enhancement process and the power grid inspection defect detection task, thereby improving the quality of the enhanced image.
[0108] The following example illustrates the illumination adaptive enhancement method for power grid inspection images provided in this application.
[0109] In power transmission, substation, and distribution inspection scenarios, inspection images are typically acquired by drones, robots, fixed cameras, or mobile inspection terminals. Due to the complex inspection environment, the image acquisition process is easily affected by factors such as low light at night, backlighting, shadows, strong local reflections, underexposure, overexposure, and weather changes. This leads to problems such as uneven brightness, loss of detail, blurred edges, color shifts, and insufficient local contrast in target areas such as conductors, insulators, hardware, towers, and switchgear. These issues directly affect the accuracy of subsequent defect detection, target recognition, and condition assessment.
[0110] To improve the quality of inspection images, existing technologies typically employ image enhancement methods to preprocess the original images. Common methods mainly include traditional image enhancement methods, deep learning-based image enhancement methods, and enhancement methods based on attention mechanisms or learnable image signal processing flows.
[0111] Traditional image enhancement methods include global histogram equalization, contrast-limited adaptive histogram equalization, gamma correction, and Retinex enhancement. These methods typically enhance images based on grayscale distribution, local contrast, or brightness mapping, and are characterized by their simplicity and ease of deployment. Specifically, global histogram equalization improves overall contrast by redistributing the grayscale histogram of the entire image; contrast-limited adaptive histogram equalization improves local brightness through block processing and contrast limiting; gamma correction adjusts the overall brightness of the image through nonlinear mapping; and Retinex-like methods achieve low-light enhancement by estimating illumination and reflection components.
[0112] Deep learning-based image enhancement methods typically utilize convolutional neural networks to learn the mapping relationship between low-light images and normal-light images. For example, some methods directly output the enhanced image through an end-to-end network, while others achieve image restoration by decomposing illumination, reflection, or noise components. Compared to traditional methods, these methods have stronger nonlinear modeling capabilities and can improve the brightness, contrast, and detail of low-light images to a certain extent.
[0113] In recent years, low-light image enhancement methods based on attention mechanisms, Transformers (transformer / self-attention network models), or learnable image signal processing workflows have emerged. These methods enhance the image locally and globally by modeling the relationships between different regions of the image, or by using networks to predict color transformation matrices, local gain maps, bias maps, gamma correction parameters, etc. Compared to simple convolutional networks or traditional enhancement algorithms, these methods have certain advantages in terms of illumination adaptation, color correction, and global consistency.
[0114] The above methods can improve the visual quality of low-light or unevenly lit images to some extent. However, most existing methods are aimed at general natural image enhancement. The enhancement process mainly focuses on the visual effect of the image and lacks comprehensive adaptation to the equipment structure, defect identification requirements, real-time deployment at the edge, and downstream detection tasks in power grid inspection scenarios.
[0115] The shortcomings of existing technology:
[0116] (1) Insufficient ability to adapt to local light changes.
[0117] Power grid inspection images often exhibit simultaneous issues such as localized underexposure, localized overexposure, and uneven background brightness. Traditional global enhancement methods typically apply a uniform mapping relationship to the entire image, making it difficult to differentiate adjustments for different regions. This can easily lead to problems such as details remaining invisible in dark areas, further overexposure in bright areas, or overall brightness distortion.
[0118] (2) It can easily amplify noise or introduce artifacts.
[0119] In nighttime inspections, long-distance photography, or low-light imaging conditions, dark area images are often accompanied by random noise. Traditional methods such as histogram equalization and local contrast enhancement may amplify background noise while improving brightness and contrast, and produce oversharpening, color shifts, or local artifacts in areas such as conductor edges, insulator textures, and hardware outlines, affecting image authenticity and the stability of subsequent detection.
[0120] (3) Local detail restoration and global color correction are difficult to coordinate.
[0121] Some methods focus on local contrast enhancement, which can improve visibility in dark areas, but they easily disrupt overall brightness and color consistency. Other methods focus on global brightness or color mapping, which can improve the overall visual effect, but their ability to recover local weak texture defects such as conductor cracks, hardware corrosion, and minor damage to insulators is limited. Therefore, existing methods cannot simultaneously achieve both local detail enhancement and global color and brightness consistency.
[0122] (4) Lack of task adaptation for power grid inspection targets.
[0123] Most existing image enhancement methods are designed for general natural images or publicly available low-light image datasets, and typically use visual quality indicators as optimization targets. They lack adaptation mechanisms for target areas such as conductors, insulators, fittings, and towers in power grid inspection images. The enhancement result may appear brighter, but it may not necessarily improve the defect detection model's ability to identify small targets, weak texture defects, and low-contrast defects. In fact, it may even increase false detections due to noise enhancement or background texture enhancement.
[0124] (5) Enhanced intensity lacks adaptive control.
[0125] The lighting conditions in power grid inspection images vary considerably, including severely underexposed images, images with normal lighting, and images with localized overexposure. Existing methods, if using fixed parameters or fixed enhancement strategies, are prone to producing unstable results under different lighting conditions. For example, excessive enhancement of slightly dark images can cause color distortion, further enhancement of locally overexposed images can cause detail saturation, while insufficient enhancement of severely dark images cannot recover key defect details.
[0126] (6) Insufficient real-time deployment capability at the edge.
[0127] Power grid inspection scenarios typically require real-time or near-real-time processing via drones, inspection robots, edge computing nodes, or on-site monitoring terminals. Some deep learning augmentation methods have a large number of parameters and high computational complexity. When dealing with high-resolution inspection images, they may suffer from problems such as high inference latency, large memory consumption, and complex engineering deployment, making it difficult to meet the requirements of low latency, low power consumption, and stable operation in industrial settings.
[0128] (7) The enhancement process is disconnected from the downstream detection task.
[0129] Existing image enhancement methods are typically used as an independent preprocessing step, lacking a linkage mechanism between the enhancement model and the defect detection model. Whether the enhanced image truly improves detection confidence, reduces false negative rates, or decreases false positive rates is usually not assessed or addressed within the enhancement process. Therefore, current technologies struggle to guarantee that image enhancement results truly serve the task of defect identification during power grid inspections.
[0130] In summary, existing technologies cannot simultaneously meet the requirements of local detail restoration, global illumination correction, adaptive enhancement intensity, real-time deployment at the edge, and downstream defect detection in power grid inspection image processing. There is an urgent need for an illumination-adaptive image enhancement method for power grid inspection scenarios.
[0131] The technical problem to be solved in this embodiment is:
[0132] To address the problems of insufficient local illumination adaptation, noise amplification, color distortion, uncontrollable enhancement intensity, difficulty in edge deployment, and disconnect between enhancement results and downstream detection tasks in existing technologies for power grid inspection image enhancement, this application aims to provide an illumination-adaptive image enhancement method for power grid inspection scenarios to solve the following technical problems:
[0133] (1) Solve the problem of difficulty in coordinating local dark area detail restoration with global brightness and color correction.
[0134] Existing image enhancement methods typically focus on local contrast enhancement or global brightness mapping, making it difficult to simultaneously restore details of local weak texture defects and maintain the brightness and color consistency of the entire image. This application aims to achieve pixel-level enhancement of local dark areas, target edges, and fine defect textures, while maintaining the stability of the overall color and brightness distribution of the inspected image, avoiding the problems of effective local enhancement but overall distortion, or overall brightness improvement but local defects remaining invisible.
[0135] (2) Solve the problem of lack of adaptive control for enhancing intensity under complex lighting conditions.
[0136] Power grid inspection images may simultaneously exhibit conditions such as low nighttime illumination, localized shadows, strong reflections, backlighting, and localized overexposure. Existing fixed-parameter enhancement methods struggle to dynamically adjust enhancement intensity based on varying image illumination conditions, easily leading to over-enhancement, under-enhancement, or further saturation of details in overexposed areas. This application aims to adaptively adjust local and global enhancement parameters based on the illumination conditions of the input image, ensuring stable enhancement results under different lighting conditions.
[0137] (3) Solve the problems of noise amplification and artifact introduction in the process of low-light image enhancement.
[0138] In low-light inspection images, dark areas are often accompanied by noise, compression distortion, and texture blurring. Existing methods, while increasing brightness and contrast, may simultaneously amplify background noise or produce color shifts, edge oversharpening, and local artifacts in areas such as conductor edges, hardware outlines, and insulator textures. This application aims to improve the visibility of dark areas while suppressing noise enhancement and maintaining the naturalness of equipment structure edges and defect textures.
[0139] (4) Solve the problem of the disconnect between image enhancement methods and power grid defect detection tasks.
[0140] Existing image enhancement methods primarily aim to improve visual quality without fully considering whether the enhancement results are beneficial for downstream defect detection, target recognition, or condition assessment. While enhanced images may appear brighter, they do not necessarily improve the detection model's ability to identify defects such as conductor damage, insulator damage, hardware corrosion, and foreign object adhesion. This application aims to make the image enhancement process serve the task of power grid inspection defect identification, thereby improving the usability of enhanced images for downstream detection models.
[0141] (5) Solve the problems of model lightweighting and inference efficiency under real-time deployment conditions at the edge.
[0142] Power grid inspection images typically require real-time or near-real-time processing via drones, inspection robots, edge computing nodes, or on-site monitoring terminals. Existing deep learning augmentation methods suffer from high computational complexity, making it difficult to meet the low latency, low power consumption, and stable operation requirements of industrial environments. This application aims to reduce the number of model parameters and computational load while maintaining augmentation effectiveness, thereby improving inference efficiency and making it suitable for edge deployment and engineering applications.
[0143] (6) To address the problem of insufficient stability and generalization ability of enhanced results under different inspection scenarios.
[0144] The distribution of inspection images varies significantly under different voltage levels, equipment types, shooting angles, weather conditions, and lighting conditions. Existing enhancement methods, if relying on fixed parameters or specific training scenarios, are prone to unstable enhancement effects when applied across different scenarios. This application aims to improve the adaptability of image enhancement methods to various power grid inspection scenarios, enabling them to operate stably under conditions such as low light, weak light, local overexposure, and uneven lighting.
[0145] Overall technical concept:
[0146] This application provides an adaptive enhancement method for power grid inspection images. This method addresses common problems in power grid inspection images, such as local underexposure, local overexposure, strong reflections, shadow occlusion, weak detail contrast, and the susceptibility of downstream defect detection to illumination. It constructs an adaptive enhancement process consisting of illumination state assessment, local pixel-level enhancement, global color / brightness correction, image reconstruction, and downstream detection feedback control.
[0147] The basic idea of this application is as follows: First, the illumination status of the input power grid inspection image is evaluated to obtain illumination status features such as average brightness, proportion of dark areas, overexposure ratio, local contrast, and sharpness. Then, pixel-wise multiplicative and additive adjustment maps are generated through local branches to restore details in dark areas and local weak texture information. At the same time, the color transformation matrix and gamma correction parameters are predicted through global branches to achieve global color consistency and brightness correction. Subsequently, the local enhancement parameters and global enhancement parameters are fused to complete image reconstruction and obtain the enhanced inspection image. Finally, the enhanced image is input into the downstream defect detection model, and the enhancement intensity is adjusted based on the detection confidence, false detection, missed detection, or image quality indicators.
[0148] Unlike image enhancement methods that use only fixed parameters, this application coordinates the adjustment of local and global parameters to improve the visibility of details in dark areas while maintaining the stability of the overall brightness and color distribution of the image. Furthermore, unlike image enhancement methods that solely pursue visual effects, this application integrates with downstream defect detection tasks, enabling the enhancement results to serve target detection, defect identification, and condition assessment in power grid inspections.
[0149] In one alternative implementation, the local and global branches in this application can be implemented using a lightweight illumination-adaptive Transformer network, or other neural network structures with local parameter prediction and global ISP (Image Signal Processing) parameter prediction capabilities. The network can be initialized with pre-trained weights and deployed using frozen inference, local fine-tuning, or enhancement-detection joint optimization methods, depending on the actual power grid inspection scenario.
[0150] System overall structure:
[0151] like Figure 2 As shown, the system of this application mainly includes an input image acquisition module, an illumination state evaluation module, a local branch, a global branch, a parameter fusion and image reconstruction module, a downstream defect detection module, and a result feedback and enhancement control module.
[0152] in, Figure 2 This is a schematic diagram of the overall structure, which includes: input inspection image; illumination status evaluation module (outputting average brightness, proportion of dark areas, proportion of overexposure, local contrast, and sharpness); local branch (generating multiplicative graph M and additive graph A); global branch (predicting color transformation matrix W and gamma parameters). ); parameter fusion and image reconstruction module (fusion of local enhancement and global ISP parameter adjustment); enhanced image output; downstream defect detection module (target detection, defect identification or status assessment); result feedback and enhancement control (output detection confidence, false detection or false detection, intensity adjustment and feedback adjustment).
[0153] The input image acquisition module is used to acquire power grid inspection images to be processed. The inspection images can be collected by drones, inspection robots, fixed camera equipment or mobile inspection terminals. The image content includes power grid equipment such as conductors, towers, insulators, hardware, switchgear, transformers, and cable terminals.
[0154] The illumination state evaluation module is used to calculate the illumination state features of the input image, including but not limited to mean brightness, proportion of dark areas, proportion of overexposure, local contrast, and sharpness. Specifically, mean brightness characterizes the overall brightness of the image, proportion of dark areas characterizes the proportion of low-brightness regions in the image, proportion of overexposure characterizes the proportion of bright, saturated regions, local contrast characterizes the grayscale differences within a target area or local window, and sharpness characterizes the visibility of image edges and texture information.
[0155] The local branch is used to generate pixel-by-pixel local enhancement parameters based on the input image or its feature map, including a multiplicative adjustment map M and an additive adjustment map A. The multiplicative adjustment map is used to proportionally adjust the pixel brightness at different spatial locations and in different color channels, while the additive adjustment map is used to perform bias compensation on local areas, thereby achieving detail restoration in dark areas and local illumination correction.
[0156] The global branch is used to predict global ISP-related parameters based on the input image or its global features, including the color transformation matrix W and gamma correction parameters. The color transformation matrix is used to linearly combine and correct different color channels, while the gamma correction parameter is used to non-linearly adjust the overall brightness response of the image, thereby improving the overall brightness and color consistency of the image.
[0157] The parameter fusion and image reconstruction module is used to combine the M and A values output from the local branch with the W values output from the global branch. The images are then fused to generate an enhanced image. This module achieves adaptive enhancement of images in low light, weak light, with local shadows, and with uneven lighting through a combination of local pixel-level adjustment and global color / brightness adjustment.
[0158] The downstream defect detection module is used to perform target detection, defect identification, or condition assessment on the enhanced image. Detection targets include, but are not limited to, conductor damage, conductor strand breakage, insulator damage, hardware corrosion, foreign object adhesion, and abnormal equipment overheating.
[0159] The result feedback and enhancement control module is used to provide feedback control to the enhancement process based on downstream detection results or image quality evaluation results. For example, when the target detection confidence is improved after enhancement and the false detections do not increase, the current enhancement result is adopted; when enhancement leads to an increase in background false detections, local overexposure, or color distortion, the enhancement intensity is reduced or the image is reverted to the original image; when insufficient enhancement results in the target still being invisible, the local enhancement intensity is increased or the global gamma parameter is adjusted.
[0160] Lighting condition assessment module:
[0161] To avoid applying a fixed enhancement strategy to all inspected images, this application first evaluates the illumination state of the input image before enhancement. Let the input image be I. in After converting it to the brightness space, the illumination state vector is calculated:
[0162] .
[0163] in, Y r represents the average brightness of the image. d r represents the dark area ratio. o Indicates the overexposure ratio, C l S represents local contrast. c Indicates clarity.
[0164] The proportion of dark areas can be obtained statistically from low brightness thresholds, the proportion of overexposure can be obtained statistically from high brightness thresholds, local contrast can be calculated from the brightness variance within a local window, gradient magnitude, or edge response, and sharpness can be calculated from the image gradient, Laplacian response, or edge intensity.
[0165] In a preferred embodiment, the illumination status assessment is not based solely on statistical analysis of the entire image, but rather on a regionalized assessment combined with the target area of the power grid inspection. The system can first determine the target area R of the power grid equipment through target detection, coarse equipment area localization, salient area extraction, edge structure extraction, or by pre-setting the inspection area. eThe target area for power grid equipment includes, but is not limited to, equipment areas such as conductors, insulators, fittings, poles, switchgear, transformers, and cable terminals; meanwhile, non-equipment areas such as the sky, vegetation, ground, buildings, and distant backgrounds are defined as the background area R. b .
[0166] In determining the target area R of the equipment e and background area R b Then, the average brightness of the equipment area, the proportion of dark areas in the equipment area, the overexposure ratio of the equipment area, the edge contrast of the equipment, the sharpness of the equipment area, and the brightness interference level of the background area are calculated respectively. From this, the illumination state vector for the power grid equipment area can be obtained:
[0167] .
[0168] in, e r represents the average brightness of the device area. de Indicates the proportion of dark areas in the device area, r oe Indicates the overexposure ratio of the equipment area, C e S represents the local contrast of the device edge or device texture area. e Indicates the clarity of the device area, B i This indicates the degree to which the background area interferes with the determination of lighting conditions.
[0169] Compared to enhancement strategies that rely solely on statistics from the entire image, this regionalized evaluation method avoids interference from background sky, vegetation, ground, buildings, or localized areas with strong reflectivity, allowing the enhancement intensity to more closely match the actual visibility requirements of target areas such as power grid equipment like conductors, insulators, and fittings.
[0170] In one implementation, when the proportion of dark areas in the entire image is greater than a first threshold, or the proportion of dark areas in the device area r de Greater than the second threshold, or device edge contrast C e When the overexposure ratio r in the equipment area is less than the third threshold, the system initiates the enhancement process; oe Greater than the fourth threshold, or background brightness interference level B i When the brightness exceeds the fifth threshold, the system reduces the global brightness gain or enhances the intensity to prevent further saturation of overexposed areas or excessive enhancement of the background area. When the brightness, contrast, and sharpness of the device area meet the requirements, the system can directly output the original image or process it with a lower enhancement intensity.
[0171] In another implementation, the system can use the illumination state vector L of the entire image as a reference. s and the device area illumination state vector L e Together generate the strength coefficient ,in ∈[0,1]. When the device area is severely underexposed and the edge contrast is low, Choose a larger value to improve the visibility of details in the target area of the device; when the lighting in the device area is basically normal while the background area is dark, Choose a smaller value to avoid compromising the true brightness and color of the device area to enhance the background; when there is significant overexposure in the device area, Use a smaller value or a local overexposure suppression strategy to avoid further saturation of the bright areas.
[0172] Through the aforementioned illumination condition assessment, this application can dynamically determine the enhancement strategy based on the actual illumination conditions of different inspection images and the visibility requirements of the target area of the power grid equipment, avoiding the unstable effects of fixed enhancement methods in normal light images, severely dark light images, locally overexposed images, and complex background images. This module enables the subsequent local and global branch enhancement processes to focus more on the power grid equipment body area, thereby improving the applicability of the enhancement results to defect detection, target recognition, and condition assessment tasks.
[0173] Local branches:
[0174] like Figure 3 As shown, the local branch is used for pixel-level illumination correction and local detail enhancement. The input to this branch is the original image or image features extracted by shallow convolution, and the output is a multiplicative adjustment map M and an additive adjustment map A.
[0175] in, Figure 3 The content includes: input feature F, which, after being encoded by a 3×3 depthwise separable convolution, enters a pixel enhancement module (PEM) of number 3. This module contains sequentially connected PWConv (pointwise convolution), DWConv (depthwise convolution), and PWConv, as well as two independent 1×1 convolutions and I-Norm (illumination normalization). Simultaneously, the input feature F is fused with the features output from the pixel enhancement module through skip connections. The fused features are then reduced in dimensionality by a 3×3 convolution and divided into two branches. One branch is processed by ReLU (Rectified Linear Unit) to output a multiplication map M, whose range is [0, +]. Another branch, after being processed by Tanh (Hyperbolic Tangent), outputs an additive graph A, which has a range of [-1, 1]; where, the function is: pixel-level illumination correction and detail preservation.
[0176] The local branch first encodes the input features positionally using 3×3 depthwise separable convolutions to incorporate spatial location information while maintaining the input resolution. Subsequently, the input features are fed into multiple pixel enhancement modules. Each pixel enhancement module includes point convolutions, depthwise convolutions, point convolutions, independent 1×1 convolutions, and an illumination normalization unit. Point convolutions are used for channel feature fusion, depthwise convolutions are used to extract local spatial features, independent 1×1 convolutions are used to enhance feature expressiveness, and the illumination normalization unit is used to adjust the feature scale and bias according to the illumination distribution of low-level visual features.
[0177] In the pixel enhancement module, a skip connection is set between the input features and the module output, so that the module can enhance local illumination while preserving the original edge, texture and structural information, and avoid loss of details during the enhancement process.
[0178] After passing through multiple pixel enhancement modules, the local branch generates two output heads through convolutional layers. One output head generates a multiplicative adjustment map M through an activation function, which is used to perform pixel-by-pixel proportional adjustment on the input image; the other output head generates an additive adjustment map A through an activation function, which is used to perform pixel-by-pixel bias compensation on the input image.
[0179] In one implementation, the multiplication adjustment graph M can take values in the range [0, +]. Alternatively, it can be limited to a preset range using a bounded activation function or scale constraint to avoid over-enhancement of local areas. The value range of the additive adjustment map A can be [-1, 1], and it is used to compensate for the brightness of local dark areas, shadow areas, or weak texture areas.
[0180] By using local branches, this application can differentiate the lighting conditions at different locations in the image, so that the wire edges, insulator textures, hardware outlines and defect details can be more fully restored under low light conditions.
[0181] Global branch:
[0182] like Figure 4 As shown, the global branch is used to predict global color and brightness correction parameters. The input to this branch is the original image or image features, and the output is the color transformation matrix W and the gamma correction parameters. .
[0183] in, Figure 4The content includes: the input image / input features, which are processed by a lightweight encoder (containing two convolutional layers and downsampling for global feature extraction), and then split into two paths for K (Key) generation (depth convolutional positional encoding) and V (Value) generation (depth convolutional positional encoding); subsequently, the generated K and V, along with the global initialization query Q, are input into the Global Prediction Module (GPM) for attention calculation / feature aggregation; the aggregated features then enter the Feed-Forward Network (FFN), which ultimately outputs two branches: a 3×3 color transformation matrix W and a scalar gamma parameter. In addition, special initialization: W is the identity matrix. The value is 1, and the function of this structure is: global color correction and brightness adjustment.
[0184] The global branch first extracts global features of the image using a lightweight encoder. The lightweight encoder can consist of two or more convolutional layers. It reduces the resolution of the feature map by downsampling to reduce computation while expanding the receptive field to obtain information on the overall illumination and color distribution of the image.
[0185] Subsequently, the global prediction module generates key features K and value features V based on the encoded features, and introduces a global initialization query Q. The global initialization query Q is used to query the overall illumination and color states of the image, while K and V provide global contextual information for different spatial regions. Through attention calculation, query Q can aggregate information related to global color correction and brightness adjustment from the encoded features.
[0186] The aggregated features output by the global prediction module are further input into the feedforward network to obtain the color transformation matrix W and gamma correction parameters. The color transformation matrix W can be a 3×3 matrix used for cross-channel linear combination of the RGB (Red, Green, Blue) color channels; gamma correction parameters... These can be scalar or channel-level parameters used to control the overall brightness response curve of the image.
[0187] In a preferred embodiment, the color transformation matrix W is initialized as an identity matrix, and the gamma correction parameters... Initializing the model to 1 makes its initial state close to the identity mapping, thereby avoiding significant image distortion in the early stages of training or fine-tuning and improving system stability.
[0188] Through global branching, this application can dynamically predict global correction parameters based on the overall illumination and color state of different inspection images, thereby improving the overall brightness, color consistency and visual naturalness of the images.
[0189] Parameter fusion and image reconstruction module:
[0190] like Figure 5 As shown, the parameter fusion and image reconstruction module is used to combine the multiplication adjustment map M and addition adjustment map A from the local branch output with the color transformation matrix W and gamma correction parameters from the global branch output. The images are then fused to obtain the final enhanced image.
[0191] in, Figure 5 The content includes: Input image I in The multiplication image M and the addition image A are input into the local adjustment module for processing. After local adjustment, the data then enters the color transformation module for cross-channel linear combination controlled by W. The data undergoes non-negativity constraint processing and gamma correction in sequence. Finally, it enters the numerical clipping stage, where it is clipped to a legal (preset) range, and the enhanced image I is output. out .
[0192] Let the input image be I in The output enhanced image is I out First, the input image is locally adjusted using the multiplicative adjustment graph M and the additive adjustment graph A:
[0193] .
[0194] in, This indicates element-wise multiplication.
[0195] Then, the color transformation matrix W is used to perform cross-channel color correction on the locally adjusted image, and the gamma parameters are used. Perform brightness response correction to obtain an enhanced image:
[0196] .
[0197] Where x and y represent pixel positions, c i c j W represents the color channel. ci,cj This represents the channel transformation coefficients in the color transformation matrix W. max(·, 0) is used to ensure that the intermediate results are non-negative, and Clip(·, 0, 1) is used to limit the output pixel values to a legal range to avoid numerical overflow or overexposure.
[0198] In an alternative implementation, this application can also generate an enhancement intensity coefficient based on the illumination state vector. ,in ∈[0, 1]. The enhancement intensity coefficient is used to adjust local and global parameters:
[0199] M'=1+ (M-1);
[0200] A'= A;
[0201] =1+ ( -1);
[0202] Among them, M', A', 'Represents the adjusted multiplication graph, addition graph, and gamma parameters, respectively. When the image is only slightly underexposed, Choose a smaller value to avoid over-enhancement; when the image is severely underexposed, Take a larger value to enhance details in dark areas; when there are obvious overexposed areas in the image, you can reduce the value. Alternatively, a suppression strategy can be adopted for overexposed areas.
[0203] Through the above parameter fusion and image reconstruction process, this application can achieve unified modeling for local detail enhancement and global color and brightness correction.
[0204] Downstream detection linkage and feedback control module:
[0205] To ensure that the image enhancement results truly serve the task of identifying defects during power grid inspections, this application further includes a downstream detection linkage and feedback control module.
[0206] Enhanced Image I out After inputting the downstream defect detection model, the detection model outputs the target bounding box, category label, and detection confidence score. The system can compare the changes in detection results before and after enhancement, such as whether the target confidence score has improved, whether missed targets have been detected, whether false background detections have increased, and whether the bounding box position has stabilized.
[0207] When the enhanced detection confidence increases and the number of false positives does not increase, the system uses the current enhanced image as input for subsequent analysis; when the enhanced background false positives increase, color distortion becomes obvious, or local overexposure worsens, the system reduces the enhancement intensity coefficient. The image reconstruction is then re-executed. If, after enhancement, there are still undetected targets or details in dark areas that are not visible, the system can increase the local enhancement intensity or adjust the global gamma parameters.
[0208] In one implementation, the feedback control module can make judgments based on the following indicators:
[0209] .
[0210] Among them, C det N represents the target detection confidence level or defect detection recall metric. false R represents the number of false positives. over Q represents the proportion of overexposed areas. img Indicates image quality evaluation index, , , , This represents the weighting coefficient. The system can determine whether to adopt the current enhancement result or whether the enhancement parameters need to be adjusted based on the evaluation score S.
[0211] By linking enhancement and detection, this application can avoid the problem of decreased detection effect caused by simply pursuing visual brightening, and make the image enhancement process and the power grid inspection defect detection task form a closed loop.
[0212] Method and Flow:
[0213] like Figure 6 As shown, the method of this application includes the following steps:
[0214] in, Figure 6 The process includes: S1 acquiring the power grid inspection image to be processed; S2 calculating illumination characteristics (mean brightness, dark area ratio, overexposure ratio, local contrast, sharpness); S3 inputting the local branch to generate the multiplication graph M and the addition graph A; and S4 inputting the global branch to predict the color transformation matrix W and gamma parameters. S5 Reconstructs the image based on local and global parameters; S6 Outputs the enhanced image; S7 Inputs the enhanced image into the downstream defect detection model; S8 Performs feedback control or adjusts the enhancement intensity based on the detection results, and can also perform feedback adjustment.
[0215] S1, acquire the power grid inspection image to be processed.
[0216] Acquire power grid inspection images collected by drones, robots, fixed camera equipment, or mobile inspection terminals. The images include, but are not limited to, equipment areas such as conductors, towers, insulators, fittings, switchgear, transformers, and cable terminals.
[0217] S2, calculate the illumination state characteristics.
[0218] The input image undergoes luminance space transformation, and illumination state features such as mean luminance, dark area ratio, overexposure ratio, local contrast, and sharpness are calculated. Based on these illumination state features, the system determines whether the image needs enhancement and establishes the initial enhancement intensity.
[0219] S3, input local branches, generate local enhancement parameters.
[0220] The input image or its shallow features are input into the local branch, and multiplication adjustment map M and addition adjustment map A are generated through position encoding, pixel enhancement module, illumination normalization and skip connection.
[0221] S4, input the global branch, and generate global enhancement parameters.
[0222] The input image or its global features are fed into the global branch, which then predicts the color transformation matrix W and gamma correction parameters through a lightweight encoder, a global prediction module, and a feedforward network. .
[0223] S5 performs image reconstruction based on local and global parameters.
[0224] Local pixel-level adjustments are made to the input image using M and A, and W and Global color and brightness corrections are performed to obtain an enhanced image.
[0225] S6 outputs an enhanced image.
[0226] The reconstructed image is numerically cropped to obtain an enhanced image that conforms to the pixel value range, and then output to the subsequent modules.
[0227] S7 will enhance the image input downstream defect detection model.
[0228] The enhanced power grid inspection images are input into target detection, defect identification, or condition assessment models to obtain detection boxes, category labels, and detection confidence scores.
[0229] S8 allows for feedback control or intensity adjustment based on test results.
[0230] Based on the detection results before and after enhancement, the false detection rate, the missed detection rate, the overexposure ratio, and the image quality indicators, determine whether the current enhancement result meets the requirements. If it does, output the enhancement result and the detection result; if it does not, adjust the enhancement intensity coefficient or related enhancement parameters, and return to the previous steps to reconstruct the image.
[0231] Inference deployment strategy:
[0232] This application can be deployed in cloud servers, edge computing nodes, drone computing platforms, inspection robot computing units, or on-site monitoring terminals.
[0233] During the inference phase, the enhanced model can be set to inference mode and gradient calculation can be disabled to reduce memory usage and computational overhead. For devices equipped with GPUs (Graphics Processing Units), GPU-accelerated inference can be used; for edge or low-power devices, CPUs (Central Processing Units), NPUs (Neural Processing Units), or other embedded inference units can be deployed.
[0234] In one implementation, the enhanced model can employ a lightweight network structure with approximately 0.09M parameters, suitable for real-time or near-real-time processing at the edge. For different input resolutions and deployment platforms, the system can further improve inference efficiency through image scaling, batch inference, model quantization, half-precision inference, or network pruning.
[0235] When the pre-trained augmented model is only slightly different from the target power grid inspection scenario, direct inference can be performed by freezing weights. When there are significant differences in the target scenario, such as nighttime inspections, highly reflective scenarios, long-distance small target scenarios, or special equipment scenarios, some layers can be unfrozen for scenario fine-tuning. In a preferred embodiment, global branches related to volume brightness and color can be fine-tuned first, or the parameters of the last few layers can be fine-tuned to reduce training costs and the risk of overfitting.
[0236] Through the above deployment strategy, this application can reduce the computational load and deployment difficulty of the model while ensuring the enhancement effect, and meet the requirements of real-time performance, stability and engineering feasibility in power grid inspection scenarios.
[0237] The key points of this application mainly include the following aspects:
[0238] (1) An adaptive enhancement mechanism for illumination status of power grid inspection images.
[0239] This application does not employ a fixed enhancement strategy for all input images. Instead, it first assesses the lighting conditions of the power grid inspection images to be processed, obtaining lighting characteristics such as average brightness, proportion of dark areas, proportion of overexposure, local contrast, and sharpness. Based on these characteristics, it determines whether enhancement is needed and the enhancement intensity. This mechanism can adaptively adjust the enhancement strategy for different lighting conditions, such as low light at night, local shadows, backlighting, strong reflections, and local overexposure, avoiding the problems of insufficient enhancement, over-enhancement, or exacerbated overexposure caused by fixed-parameter enhancement methods.
[0240] (2) A dual-branch enhancement structure that combines local pixel-level enhancement with global ISP parameter correction.
[0241] This application constructs an enhanced structure in which local and global branches work together. Local branches are used to generate pixel-wise multiplicative adjustment maps M and additive adjustment maps A, performing local illumination compensation and detail restoration at different locations in the image; global branches are used to predict the color transformation matrix W and gamma correction parameters. This method performs global color consistency correction and brightness response adjustment on the entire image. Through the synergistic effect of local and global parameters, this application can simultaneously achieve dark area detail restoration, local weak texture enhancement, and global brightness / color stabilization.
[0242] (3) Image reconstruction method based on learnable ISP parameters.
[0243] This application decomposes the image enhancement process into interpretable steps such as local multiplicative adjustment, local additive compensation, color transformation, and gamma correction, instead of directly employing a black-box end-to-end mapping. Specifically, local pixel-level adjustments are performed on the input image using a multiplicative image M and an additive image A, followed by cross-channel color correction using a color transformation matrix W, and finally, gamma correction is applied using gamma parameters. Brightness response correction is performed, and the enhanced image is finally obtained through non-negative constraints and numerical cropping. This reconstruction method has good physical interpretability and enhancement controllability.
[0244] (4) Adaptive parameter control mechanism based on enhancement strength coefficient.
[0245] This application generates an enhancement intensity coefficient based on illumination characteristics and uses this coefficient to adjust the multiplicative adjustment map, the additive adjustment map, and the gamma correction parameters. For slightly underexposed images, the enhancement intensity is reduced to avoid color distortion and over-enhancement; for severely underexposed images, the enhancement intensity is increased to recover details in dark areas; for locally overexposed images, global brightness enhancement is suppressed or the enhancement intensity is reduced to prevent further saturation of bright areas. This mechanism improves the stability of enhancement results under different illumination conditions.
[0246] (5) Enhanced detection linkage mechanism for power grid defect detection tasks.
[0247] This application links image enhancement results with downstream defect detection tasks. The enhanced image can be input into target detection, defect recognition, or state assessment models, and the effectiveness of the current enhancement result is determined based on detection confidence, false positives, false negatives, detection box stability, overexposure ratio, and image quality indicators. When the detection effect is improved after enhancement and false positives do not increase, the current enhancement result is adopted; when enhancement leads to an increase in background false positives, color distortion, or local overexposure, the enhancement intensity is reduced or the original image is reverted; when insufficient enhancement results in the target still being invisible, the local enhancement intensity is increased or the global gamma parameter is adjusted. This mechanism enables the image enhancement process to serve the defect recognition task of power grid inspection, rather than simply pursuing visual brightening.
[0248] (6) Lightweight enhancement implementation method suitable for edge deployment.
[0249] This application employs a lightweight local-global dual-branch network structure to achieve image enhancement, and can combine half-precision inference, model quantization, image scaling, batch inference, and network pruning to reduce computational load and memory consumption, making it suitable for resource-constrained devices such as drones, inspection robots, edge computing nodes, mobile inspection terminals, or on-site monitoring terminals. In one embodiment, the number of enhancement model parameters can be approximately 0.09M, which can meet the real-time or near-real-time processing requirements of power grid inspection scenarios.
[0250] (7) Engineering deployment strategy that combines pre-training initialization, frozen inference and scenario fine-tuning.
[0251] This application can initialize the augmentation model with pre-trained weights and deploy it by selecting frozen inference, local fine-tuning, or augmentation-detection joint optimization methods according to the actual inspection scenario. When the target scenario is similar to the applicable scenario of the existing model, frozen inference can be used to quickly integrate it into the existing inspection system; when there are significant differences in the target scenario, the global branch, the last few layers, or the augmentation intensity control module can be fine-tuned based on a small number of power grid inspection images to improve the adaptability to nighttime inspections, strong reflections, long-distance small targets, and special equipment scenarios.
[0252] (8) Scalable combination of enhancement model and detection model.
[0253] This application is not limited to a single fixed network or detection model. Local branches can employ pixel enhancement modules, lightweight convolutional modules, or other structures capable of generating local adjustment maps; global branches can employ Transformer query mechanisms, lightweight encoders, or other structures capable of predicting global ISP parameters; downstream detection models can employ YOLO, Faster R-CNN, DETR, or other object detection and defect recognition models. This combination approach expands the applicability of this application to different power grid inspection tasks and different engineering systems.
[0254] Compared with existing image enhancement methods, this application has at least the following advantages:
[0255] 1. Achieve coordinated and unified enhancement of local details and global brightness and color correction:
[0256] Existing global enhancement methods typically apply a uniform mapping relationship to the entire image, which is difficult to adapt to situations where local dark areas, local shadows, local overexposure, and complex backgrounds coexist in power grid inspection images. Existing local enhancement methods can improve the visibility of some dark areas, but they are prone to causing inconsistent overall brightness, color shifts, or local artifacts.
[0257] This application generates pixel-by-pixel multiplicative and additive adjustment maps through local branches to perform differentiated illumination correction at different spatial locations in the image; simultaneously, it predicts the color transformation matrix and gamma correction parameters through global branches to correct the overall color and brightness response of the image. Therefore, this application can enhance details in local dark areas while maintaining color consistency and brightness stability of the entire image, avoiding the distortion problems caused by simple local or global enhancement.
[0258] 2. Capable of adaptive enhancement based on the lighting conditions of the inspection image:
[0259] Existing traditional methods such as global histogram equalization, contrast-limited adaptive histogram equalization, and gamma correction usually rely on manual parameter setting. These methods require repeated parameter adjustments under different inspection scenarios, shooting times, weather conditions, and equipment types, making it difficult to stably adapt to complex lighting changes.
[0260] This application calculates illumination characteristics such as average brightness, proportion of dark areas, proportion of overexposure, local contrast, and sharpness before image enhancement, and can determine whether to enhance and the enhancement intensity based on the illumination conditions. For severely underexposed images, the local enhancement intensity can be increased to restore details in dark areas; for slightly underexposed images, the enhancement intensity can be reduced to avoid over-enhancement; for locally overexposed images, global brightness enhancement can be suppressed or the enhancement intensity can be reduced to prevent further saturation of overexposed areas. Therefore, this application can better adapt to complex scenarios such as nighttime inspections, backlighting, shadow occlusion, strong reflections, and uneven local exposure.
[0261] 3. It can reduce the risk of noise amplification, color distortion, and local artifacts:
[0262] Traditional histogram equalization and local contrast enhancement methods, while improving brightness and contrast, tend to amplify noise in dark areas simultaneously, and may produce oversharpening, color shift, or block artifacts in areas such as conductor edges, insulator textures, and hardware outlines.
[0263] This application performs pixel-level adjustments to local regions using multiplicative and additive adjustment maps, and performs global color and brightness correction using a color transformation matrix and gamma parameters, thus constraining local enhancement and global correction. Simultaneously, this application combines enhancement intensity coefficients, non-negativity constraints, and numerical cropping mechanisms to limit abnormal gain and abnormal output values, thereby reducing excessive noise amplification, color distortion, and local artifacts, and improving the naturalness and stability of the enhanced image.
[0264] 4. Enhanced results are better suited for power grid inspection and defect detection tasks:
[0265] Existing image enhancement methods typically focus on visual effects. While the enhanced image may be brighter, it may not necessarily improve the downstream defect detection results. In fact, it may even increase false detections due to background texture enhancement, noise enhancement, or color distortion.
[0266] This application links the image enhancement process with the power grid inspection defect detection task. Enhanced images can be input into target detection, defect identification, or condition assessment models. The system determines the effectiveness of the enhancement result based on detection confidence, false positives, missed positives, overexposure ratio, and image quality indicators, and can adjust the enhancement intensity accordingly. Therefore, this application not only focuses on the visual quality of the enhanced image but also on the practical impact of the enhancement result on downstream identification tasks such as conductor damage, conductor strand breakage, insulator damage, hardware corrosion, foreign object adhesion, and equipment malfunctions, which helps improve the overall reliability of the inspection system.
[0267] 5. Possesses good lightweight deployment capabilities:
[0268] Power grid inspection scenarios typically require real-time or near-real-time processing via drones, inspection robots, edge computing nodes, or on-site monitoring terminals, placing high demands on model parameter count, computational load, memory usage, and inference latency. Some deep learning augmentation methods have large parameter counts and computational loads, making it difficult to meet the stable deployment requirements at the edge.
[0269] This application employs a lightweight local-global dual-branch structure to achieve image enhancement. In one implementation, the number of enhancement model parameters can be approximately 0.09M, reducing storage and computational overhead. The system can further improve inference efficiency by combining half-precision inference, model quantization, batch inference, image scaling, or network pruning. Therefore, this application is more suitable for engineering deployment in power grid inspection edge equipment.
[0270] 6. It has good engineering adaptability and scalability:
[0271] This application is not limited to a single fixed enhancement algorithm or a single network structure. Local branches can employ pixel enhancement modules, lightweight convolutional modules, or other network structures capable of generating local adjustment maps; global branches can employ Transformer query mechanisms, lightweight encoders, or other structures capable of predicting global ISP parameters; downstream detection modules can be connected to YOLO (a single-stage object detection algorithm), Faster R-CNN (a faster region convolutional neural network), DETR (Detection Transformer, a transformer-based object detection algorithm), or other object detection and defect recognition models.
[0272] Therefore, this application can be deployed as an independent image enhancement and preprocessing module, or it can be used in conjunction with the defect detection model as a front-end enhancement module of the detection system. It can also be locally fine-tuned or its parameters adjusted according to different power grid equipment, different inspection platforms and different lighting conditions, thus having good engineering scalability.
[0273] 7. It can reduce the cost of manual parameter tuning and scene migration:
[0274] Traditional image enhancement methods typically require manual adjustment of parameters based on the scene, such as block size, contrast limit threshold, and Gamma value. When the inspection scene changes, the parameters need to be readjusted or the effect needs to be re-evaluated.
[0275] This application utilizes illumination state assessment, enhancement intensity control, and local-global parameter prediction mechanisms to automatically adjust enhancement strategies based on the illumination characteristics of the input image, reducing the workload of manual parameter tuning. When migrating between different power grid inspection scenarios, it can be rapidly deployed using a frozen inference approach, or fine-tuned with a small amount of scenario data for some network layers, thus balancing versatility and specialization and reducing engineering implementation costs.
[0276] 8. Enhanced image enhancement interpretability:
[0277] Some end-to-end deep learning enhancement methods directly learn the black-box mapping between low-light images and normal-light images. The enhancement process lacks interpretability, making it difficult to determine how the model changes brightness, color, and local details.
[0278] This application decomposes the enhancement process into interpretable steps such as local multiplicative adjustment, local additive compensation, color transformation, and gamma correction. Specifically, the multiplicative adjustment diagram M represents the local proportional gain, the additive adjustment diagram A represents the local brightness compensation, the color transformation matrix W represents the correction relationship between color channels, and the gamma parameter... These parameters are used to represent the overall brightness response adjustment. All of the above parameters have clear physical or image processing meanings; therefore, this application offers better interpretability and controllability compared to pure black-box enhancement methods.
[0279] 9. Improves the stability of inspection image processing under complex lighting conditions:
[0280] Image quality fluctuates significantly in nighttime inspections, tunnel or cable trench inspections, inspections under strong backlight, scenes with shadow occlusion, and scenes with localized reflections. Existing fixed enhancement methods are prone to being effective in some scenarios but ineffective in others.
[0281] This application utilizes a mechanism of illumination state assessment, local-global collaborative enhancement, enhancement intensity control, and detection result feedback to dynamically adjust the enhancement strategy based on the image state and detection results. This improves the stability of image processing results under complex illumination conditions and reduces the risk of missed or false detections of defects caused by changes in illumination.
[0282] In summary, compared with existing image enhancement methods, this application can achieve local detail restoration, global brightness and color correction, adaptive control of enhancement intensity, linkage with downstream defect detection, and lightweight deployment at the edge in power grid inspection scenarios, and has good engineering application value.
[0283] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0284] Based on the same inventive concept, this application also provides an adaptive illumination enhancement system for power grid inspection images, which implements the aforementioned adaptive illumination enhancement method for power grid inspection images. The solution provided by this system is similar to the implementation described in the above method. Therefore, the specific limitations of one or more embodiments of the adaptive illumination enhancement system for power grid inspection images provided below can be found in the limitations of the adaptive illumination enhancement method for power grid inspection images described above, and will not be repeated here.
[0285] In one exemplary embodiment, such as Figure 7 As shown, an adaptive illumination enhancement system for power grid inspection images is provided. The adaptive illumination enhancement system 700 for power grid inspection images may include:
[0286] Image acquisition module 701 is used to acquire power grid inspection images to be processed;
[0287] The status recognition module 702 is used to perform illumination status recognition processing on the power grid inspection image, obtain the illumination status features of the power grid inspection image, and generate local enhancement parameters and global enhancement parameters of the power grid inspection image.
[0288] The coefficient determination module 703 is used to determine the enhancement intensity coefficient corresponding to the power grid inspection image based on the characteristics of the illumination state.
[0289] The parameter adjustment module 704 is used to adjust the local enhancement parameters and global enhancement parameters according to the enhancement intensity coefficient to obtain the target local enhancement parameters and target global enhancement parameters of the power grid inspection image.
[0290] The image processing module 705 is used to perform enhancement processing on the power grid inspection image based on the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image.
[0291] In an exemplary embodiment, the state recognition module 702 is further configured to perform region extraction processing on the power grid inspection image to obtain the equipment target area and background area of the power grid inspection image; perform illumination feature recognition processing on the equipment target area and background area respectively to obtain the regional illumination feature of the equipment target area and the background brightness interference feature of the background area; and determine the illumination state feature based on the regional illumination feature and the background brightness interference feature.
[0292] In an exemplary embodiment, the local enhancement parameters include a multiplicative adjustment map and an additive adjustment map, and the global enhancement parameters include a color transformation matrix and brightness correction parameters; the state recognition module 702 is further configured to perform local feature extraction processing on the power grid inspection image to obtain a multiplicative adjustment map and an additive adjustment map; and to perform global feature extraction processing on the power grid inspection image to obtain a color transformation matrix and brightness correction parameters.
[0293] In an exemplary embodiment, the parameter adjustment module 704 is further configured to: adjust the multiplicative adjustment map according to the enhancement intensity coefficient to obtain a target multiplicative adjustment map; adjust the additive adjustment map according to the enhancement intensity coefficient to obtain a target additive adjustment map; determine the target local enhancement parameters according to the target multiplicative adjustment map and the target additive adjustment map; adjust the brightness correction parameters according to the enhancement intensity coefficient to obtain target brightness correction parameters; and determine the target global enhancement parameters according to the color transformation matrix and the target brightness correction parameters.
[0294] In an exemplary embodiment, the image processing module 705 is further configured to perform local pixel adjustment processing on the power grid inspection image according to the target multiplicative adjustment map and the target additive adjustment map to obtain a locally adjusted image corresponding to the power grid inspection image; perform color correction processing on the locally adjusted image according to the color transformation matrix to obtain a color corrected image corresponding to the power grid inspection image; and perform brightness response correction processing on the color corrected image according to the target brightness correction parameters to obtain an enhanced image.
[0295] In an exemplary embodiment, the system 700 further includes: a coefficient processing module, used to perform defect detection processing on the enhanced image to obtain a defect detection result of the enhanced image; if the defect detection result does not meet the preset conditions, the enhancement intensity coefficient is adjusted according to the defect detection result, and the process jumps to the step of adjusting the local enhancement parameters and global enhancement parameters according to the enhancement intensity coefficient until the defect detection result meets the preset conditions.
[0296] The modules in the aforementioned adaptive illumination enhancement system for power grid inspection images can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0297] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an adaptive illumination enhancement method for power grid inspection images. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0298] Those skilled in the art will understand that Figure 8The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0299] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0300] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above-described method embodiments.
[0301] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0302] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0303] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0304] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for adaptive illumination enhancement of power grid inspection images, characterized in that, The method includes: Acquire the power grid inspection images to be processed; The power grid inspection image is processed for illumination status recognition to obtain the illumination status features of the power grid inspection image, and local enhancement parameters and global enhancement parameters of the power grid inspection image are generated. Based on the illumination characteristics, the enhancement intensity coefficient corresponding to the power grid inspection image is determined; Based on the enhancement intensity coefficient, the local enhancement parameters and the global enhancement parameters are adjusted to obtain the target local enhancement parameters and the target global enhancement parameters of the power grid inspection image; Based on the target local enhancement parameters and the target global enhancement parameters, the power grid inspection image is enhanced to obtain the enhanced image corresponding to the power grid inspection image.
2. The method according to claim 1, characterized in that, The step of performing illumination state recognition processing on the power grid inspection image to obtain the illumination state features of the power grid inspection image includes: The power grid inspection image is processed by region extraction to obtain the equipment target area and background area of the power grid inspection image; Illumination feature recognition processing is performed on the target area of the device and the background area respectively to obtain the regional illumination features of the target area of the device and the background brightness interference features of the background area. The illumination state characteristics are determined based on the regional illumination characteristics and the background brightness interference characteristics.
3. The method according to claim 1, characterized in that, The local enhancement parameters include multiplicative adjustment maps and additive adjustment maps, and the global enhancement parameters include color transformation matrices and brightness correction parameters; The local enhancement parameters and global enhancement parameters for generating the power grid inspection image include: Local feature extraction processing is performed on the power grid inspection image to obtain the multiplication adjustment map and the addition adjustment map; Global feature extraction processing is performed on the power grid inspection image to obtain the color transformation matrix and the brightness correction parameters.
4. The method according to claim 3, characterized in that, The step of adjusting the local enhancement parameters and the global enhancement parameters according to the enhancement intensity coefficient to obtain the target local enhancement parameters and target global enhancement parameters of the power grid inspection image includes: Based on the enhancement intensity coefficient, the multiplication adjustment diagram is adjusted to obtain the target multiplication adjustment diagram, and based on the enhancement intensity coefficient, the addition adjustment diagram is adjusted to obtain the target addition adjustment diagram. The target local enhancement parameters are determined based on the target multiplication adjustment diagram and the target addition adjustment diagram; Based on the enhancement intensity coefficient, the brightness correction parameters are adjusted to obtain the target brightness correction parameters; The target global enhancement parameters are determined based on the color transformation matrix and the target brightness correction parameters.
5. The method according to claim 4, characterized in that, The step of enhancing the power grid inspection image based on the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image includes: Based on the target multiplication adjustment map and the target addition adjustment map, the power grid inspection image is subjected to local pixel adjustment processing to obtain the local adjustment image corresponding to the power grid inspection image; Based on the color transformation matrix, the local adjustment image is subjected to color correction processing to obtain the color-corrected image corresponding to the power grid inspection image; Based on the target brightness correction parameters, the color-corrected image is subjected to brightness response correction processing to obtain the enhanced image.
6. The method according to claim 1, characterized in that, After enhancing the power grid inspection image according to the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image, the process further includes: The enhanced image is subjected to defect detection processing to obtain the defect detection result of the enhanced image; If the defect detection result does not meet the preset conditions, the enhancement intensity coefficient is adjusted based on the defect detection result, and the process jumps to the step of adjusting the local enhancement parameter and the global enhancement parameter based on the enhancement intensity coefficient, until the defect detection result meets the preset conditions.
7. An adaptive illumination enhancement system for power grid inspection images, characterized in that, The system includes: The image acquisition module is used to acquire power grid inspection images to be processed. The status recognition module is used to perform illumination status recognition processing on the power grid inspection image, obtain the illumination status features of the power grid inspection image, and generate local enhancement parameters and global enhancement parameters of the power grid inspection image. The coefficient determination module is used to determine the enhancement intensity coefficient corresponding to the power grid inspection image based on the illumination state characteristics. The parameter adjustment module is used to adjust the local enhancement parameters and the global enhancement parameters according to the enhancement intensity coefficient to obtain the target local enhancement parameters and the target global enhancement parameters of the power grid inspection image. The image processing module is used to perform enhancement processing on the power grid inspection image according to the target local enhancement parameters and the target global enhancement parameters to obtain the enhanced image corresponding to the power grid inspection image.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.