A partial discharge defect detection method and system based on ultraviolet image recognition

CN122989620APending Publication Date: 2026-10-27GANSU SHINING SCI & TECH +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611165087.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]本申请公开了一种基于紫外图像识别的局部放电缺陷检测方法及系统,旨在解决现有技术中在强紫外背景下,自动增益控制模块无差别地大幅压缩全局信号动态范围,导致微弱局部放电紫外光斑在模数转换中因幅度低于量化阈值而丢失,从而无法有效检出早期放电缺陷的技术问题

Benefits of technology

[0068]本申请公开的基于紫外图像识别的局部放电缺陷检测方法,通过连续采集紫外图像并进行预处理,提取高亮区域的空间形态特征和时序动态变化特征,进而将区域分类为背景区域和候选放电区域。关键在于,本申请引入了差异化的增益控制策略,即根据背景区域确定全局增益上限值,根据候选放电区域确定目标增益下限值。当目标增益下限值高于全局增益上限值时,在执行全局增益控制的同时,计算二者差值作为局部补偿量,并与候选放电区域位置标记关联绑定。在后续图像采集的模数转换环节,依据该候选放电区域位置标记对对应像素执行差异化信号处理,施加与局部补偿量相对应的额外增益,从而得到各像素的数字量化值。最后,对数字量化值进行逆向映射及动态范围重构,并在重构图像的对应区域内执行缺陷判定。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989620A_ABST
    Figure CN122989620A_ABST
Patent Text Reader

Abstract

The application discloses a partial discharge defect detection method and system based on ultraviolet image recognition, and relates to the technical field of ultraviolet image recognition. The method comprises the following steps: collecting multiple ultraviolet images to form a digital image sequence; extracting spatial form features and time sequence dynamic change features of a highlight area, classifying the highlight area into a background area and a candidate discharge area according to the features, and generating corresponding position markers; determining a global gain upper limit value and a target gain lower limit value according to the two types of position markers, calculating a difference value as a local compensation amount when the target gain lower limit value is higher than the global gain upper limit value, and binding the local compensation amount with the position markers of the candidate discharge area; performing differential signal processing on corresponding pixels when analog-to-digital conversion is performed on subsequent collected ultraviolet images, reversely mapping digital quantization values obtained, and performing defect judgment in corresponding areas of a reconstructed image. The application can simultaneously suppress strong ultraviolet backgrounds and retain weak discharge signals, and improves detection sensitivity and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ultraviolet image recognition technology, and more specifically, to a method and system for detecting partial discharge defects based on ultraviolet image recognition. Background Technology

[0002] In the operation and maintenance of power equipment, partial discharge defect detection based on ultraviolet image recognition is an important means of capturing early and weak discharge signals. Existing technologies typically use solar-blind ultraviolet imagers to inspect equipment such as insulator strings in substations, and use an automatic gain control module inside the equipment to adjust the magnification factor according to the global brightness of the field of view, so that the discharge photon pulses in the digital image are significantly higher than the background noise, thus enabling them to be effectively detected by subsequent feature extraction algorithms.

[0003] However, during outdoor inspections in clear weather, metal accessories such as equalizing rings can create a large and stable slight reflection of the ultraviolet band under strong sunlight. When this large, stable, bright ultraviolet background and extremely weak early surface discharge spots on the insulator string surface coexist within the field of view, the automatic gain control module will detect that the global average photon count or peak brightness exceeds the limit. To protect the sensor from overexposure damage and prevent image distortion, the module will immediately execute a gain attenuation command, significantly reducing the global photoelectric amplification gain.

[0004] This indiscriminate compression method significantly reduces the analog voltage amplitude in the pixel region where the target weak discharge point is located. When entering the analog-to-digital converter (ADC), the voltage amplitude falls below or near the minimum effective quantization threshold. Most of the effective photon count information is directly truncated and lost during quantization, dissolved in the quantization noise. Existing conventional methods mainly rely on global statistical features for gain adjustment, lacking a mechanism to protect weak local signals. This makes it difficult to suppress strong backgrounds while preserving extremely weak signals, resulting in subsequent algorithms being unable to observe the weak discharge spot at the corresponding location in the digital image. Specifically, in outdoor substation UV inspection scenarios, when metal accessories such as equalizing rings reflect strong sunlight into the UV band, causing a sharp increase in background brightness, the automatic gain control indiscriminately and drastically compresses the dynamic range of the global signal. This causes the originally weak local discharge UV spot to be lost during analog-to-digital conversion because its amplitude falls below the quantization threshold, preventing early discharge defects from being detected by UV image recognition algorithms.

[0005] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0006] This application discloses a method and system for detecting partial discharge defects based on ultraviolet image recognition. It aims to solve the technical problem in the prior art that, under strong ultraviolet background, the automatic gain control module indiscriminately and significantly compresses the dynamic range of the global signal, causing the weak partial discharge ultraviolet spot to be lost in analog-to-digital conversion because the amplitude is lower than the quantization threshold, thus making it impossible to effectively detect early discharge defects.

[0007] The technical solution of this application is as follows:

[0008] In a first aspect, this application discloses a method for detecting partial discharge defects based on ultraviolet image recognition, comprising the following steps:

[0009] Multiple frames of ultraviolet images were continuously acquired, and after analog-to-digital conversion and preprocessing, an ultraviolet digital image sequence was formed.

[0010] High-brightness regions are extracted from the ultraviolet digital image sequence based on brightness thresholds, and the spatial morphological features and temporal dynamic change features of each high-brightness region are extracted.

[0011] Based on the spatial morphological characteristics and the temporal dynamic change characteristics, each bright area is classified into a background area and a candidate discharge area, and corresponding background area position markers and candidate discharge area position markers are generated respectively.

[0012] The global gain upper limit is determined based on the pixel brightness value of the area covered by the background region location marker, and the target gain lower limit is determined based on the pixel brightness value of the area covered by the candidate discharge region location marker. When the target gain lower limit is higher than the global gain upper limit, global gain control is performed based on the global gain upper limit, and the difference between the two is calculated as a local compensation amount. This local compensation amount is then associated and bound to the candidate discharge region location marker.

[0013] During the analog-to-digital conversion of the subsequently acquired ultraviolet images, differential signal processing is performed on the corresponding pixels based on the location marker of the candidate discharge region to obtain the digital quantization value of each pixel;

[0014] Based on the global gain upper limit and the local compensation amount, the digital quantization value is inversely mapped and its dynamic range is reconstructed to obtain the reconstructed image and its associated location marker information;

[0015] Using the location marker information as a constraint, defect determination is performed within the corresponding area of ​​the reconstructed image, and the detection result is output.

[0016] Through this technical solution, this application achieves effective protection of weak partial discharge signals under strong ultraviolet background by introducing local compensation and differentiated signal processing, avoiding signal loss due to gain attenuation during analog-to-digital conversion, thereby significantly improving the detection capability of early discharge defects.

[0017] Furthermore, in this method for detecting partial discharge defects based on ultraviolet image recognition, the brightness threshold is an adaptive brightness activation threshold.

[0018] The adaptive brightness activation threshold is dynamically set based on the background baseline and quantization noise margin of each pixel position in the ultraviolet digital image sequence.

[0019] This technical solution, through the introduction of an adaptive brightness activation threshold, makes the extraction of bright areas more accurate, effectively distinguishing between real bright areas and background noise, and providing a more reliable input for subsequent defect detection.

[0020] Furthermore, in this method for detecting partial discharge defects based on ultraviolet image recognition, the spatial morphological features include spatial area, contour perimeter, compactness, peak brightness, average brightness, and brightness energy centroid coordinates.

[0021] For each highlighted region, extract its spatial morphological features, specifically:

[0022] The total number of pixels contained in the highlighted area is counted as the spatial area, the outline perimeter of the highlighted area is obtained, and the compactness is calculated based on the spatial area and the outline perimeter.

[0023] Extract the maximum pixel brightness value within the highlighted area as the peak brightness, calculate the arithmetic mean of the brightness of all pixels within the highlighted area as the average brightness, and calculate the weighted average of the brightness value and pixel coordinates of each pixel within the highlighted area as the centroid coordinates of the brightness energy.

[0024] This technical solution extracts multi-dimensional spatial morphological features, enabling a more comprehensive and detailed description of the geometric and brightness distribution characteristics of bright areas, thus providing a richer and more accurate basis for subsequent region classification.

[0025] Based on this, the partial discharge defect detection method based on ultraviolet image recognition extracts the spatial morphological features and temporal dynamic change features of each bright area, including the following steps:

[0026] The brightness energy centroid coordinates of the bright area are used as the main matching basis for the same bright area between adjacent frames, and the area similarity and average brightness similarity of the bright area are used as matching verification conditions. Cross-frame correspondence between each bright area is established between adjacent frames, forming the evolution trajectory of each bright area between consecutive frames.

[0027] Within a set sliding time window, based on the evolution trajectory, the area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency of the bright region within the sliding time window are calculated as the time-series dynamic change characteristics.

[0028] This technical solution, by introducing temporal dynamic change features, can capture the dynamic behavior of bright areas in the time dimension, effectively distinguish between stable background reflection and transient discharge phenomena, and further improve the accuracy of area classification.

[0029] Furthermore, in this method for detecting partial discharge defects based on ultraviolet image recognition, each bright region is classified into background regions and candidate discharge regions according to the spatial morphological features and the temporal dynamic change features, including the following steps:

[0030] For each highlighted region, the following judgment is performed sequentially:

[0031] If the highlighted area meets all of the following conditions, then the highlighted area is identified as the background area:

[0032] The space area is greater than the preset upper limit of the point light source area, the compactness is less than the preset compactness threshold, the area fluctuation rate is lower than the preset area fluctuation rate threshold, the energy centroid displacement variance is lower than the preset displacement variance threshold, and the brightness gradient change rate is lower than the preset brightness change threshold.

[0033] Otherwise, if the highlighted area simultaneously meets all of the following conditions, then the highlighted area is determined to be the candidate discharge area:

[0034] The area of ​​the space is less than or equal to the upper limit of the preset point light source area, the rate of change of the brightness gradient exceeds the preset pulse judgment threshold, and the flicker frequency falls into the preset typical discharge frequency band.

[0035] Otherwise, the highlighted area will be classified as an unclassified area.

[0036] This technical solution, by setting clear judgment conditions, can accurately classify bright areas into background areas and candidate discharge areas, laying the foundation for subsequent local compensation and defect judgment, and effectively avoiding misjudgment and omission.

[0037] Based on the above, the partial discharge defect detection method based on ultraviolet image recognition further includes the following steps before generating the corresponding background region location markers and candidate discharge region location markers:

[0038] For a bright area that is identified as the background area and whose spatial area exceeds the preset upper limit of the point light source area, analyze the brightness fluctuation of each pixel in the bright area over a series of consecutive frames.

[0039] Based on the degree of brightness fluctuation, the internal pixels are divided into transient active pixels and stable background pixels; spatial clustering is determined for multiple pixels marked as transient active pixels to determine whether the transient active pixels form a clustered distribution in spatial location;

[0040] If the transiently active pixels do not form a clustered distribution, the current classification result for the highlighted area is maintained;

[0041] If the transient active pixels form a clustered distribution, it is further determined whether the spatial area of ​​the sub-region formed by the cluster falls within the preset discharge scale range;

[0042] If it does not fall into the category, the current classification result of the highlighted area will be maintained;

[0043] If it falls into the category, the sub-region is determined to be a suspected discharge region nested inside the highlighted region. The suspected discharge region is then logically separated from the highlighted region and assigned to the candidate discharge region position mark. A transition buffer zone is set around the periphery of the suspected discharge region in the separated highlighted region. The region after removing the suspected discharge region and the transition buffer zone is assigned to the background region position mark to update the background region position mark and the candidate discharge region position mark, and the position mark of the transition buffer zone is generated.

[0044] Through this technical solution, the identification and stripping mechanism of the nested discharge region can effectively handle weak discharge signals that may exist in a large background area under complex backgrounds, avoid misjudging the discharge signal as background, and further improve the precision and accuracy of detection.

[0045] More specifically, in some implementations, this method for detecting partial discharge defects based on ultraviolet image recognition distinguishes internal pixels into transiently active pixels and stable background pixels according to the degree of brightness fluctuation, including the following steps:

[0046] Calculate the brightness temporal variance and brightness gradient peak of each pixel within the bright area in a continuous multi-frame time series, and use them as the brightness temporal variance and brightness gradient peak.

[0047] The average brightness noise floor of the entire bright area is obtained by statistically analyzing the brightness time variance of each pixel.

[0048] The high-frequency fluctuation threshold is dynamically set based on the average brightness noise base.

[0049] Pixels whose brightness time variance or brightness gradient peak exceeds the high-frequency fluctuation threshold are marked as transient active pixels, and the remaining pixels not marked as transient active pixels are marked as stable background pixels.

[0050] This technical solution, through detailed analysis of pixel brightness fluctuations, can accurately distinguish between transiently active pixels and stable background pixels, providing a reliable pixel-level judgment basis for the identification of nested discharge regions.

[0051] Preferably, in this partial discharge defect detection method based on ultraviolet image recognition, differential signal processing is performed on the corresponding pixels according to the location marker of the candidate discharge region, including:

[0052] Before analog-to-digital conversion, an additional gain corresponding to the local compensation amount is applied to the image signal of the pixel.

[0053] This technical solution applies additional gain before analog-to-digital conversion, which can directly increase the amplitude of weak discharge signals and ensure that they are not truncated or lost during quantization, thereby effectively protecting the integrity of the signal.

[0054] Based on the above, this method for detecting partial discharge defects based on ultraviolet image recognition, after using the location marker information as a constraint to perform defect determination within the corresponding region of the reconstructed image and outputting the detection result, also includes the following steps:

[0055] If the detection result indicates that there is a defect in the area corresponding to the candidate discharge area location marker, then the local compensation amount for that area in subsequent acquisition frames will be increased.

[0056] If the detection result indicates that there is no defect in the area corresponding to the candidate discharge region location marker, then the local compensation amount for that area in subsequent acquisition frames is reduced.

[0057] Through this technical solution, the dynamic adjustment mechanism of local compensation enables the system to adaptively optimize the protection strength of the discharge area based on the detection results, thus achieving more intelligent and efficient defect detection.

[0058] Secondly, this application also discloses a partial discharge defect detection system based on ultraviolet image recognition, comprising:

[0059] The image acquisition module is used to continuously acquire multiple frames of ultraviolet images. The acquired image signals are converted from analog to digital and preprocessed to form an ultraviolet digital image sequence.

[0060] The feature extraction and tracking module is used to extract the bright areas from the ultraviolet digital image sequence based on the brightness threshold, and to extract the spatial morphological features and temporal dynamic change features of each bright area.

[0061] The region classification module is used to classify each bright region into a background region and a candidate discharge region based on the spatial morphological characteristics and the temporal dynamic change characteristics, and generate corresponding background region position markers and candidate discharge region position markers respectively.

[0062] The gain control module is used to determine the global gain upper limit value based on the pixel brightness value of the area covered by the background region location marker, and to determine the target gain lower limit value based on the pixel brightness value of the area covered by the candidate discharge region location marker; when the target gain lower limit value is higher than the global gain upper limit value, global gain control is performed with the global gain upper limit value, and the difference between the two is calculated as a local compensation amount, and the local compensation amount is associated and bound with the candidate discharge region location marker.

[0063] The differential signal protection module is used to perform differential signal processing on the corresponding pixels based on the location marker of the candidate discharge region during the analog-to-digital conversion of the subsequently acquired ultraviolet images, so as to obtain the digital quantization value of each pixel.

[0064] The image reconstruction module is used to perform inverse mapping and dynamic range reconstruction on the digital quantization value based on the global gain upper limit and the local compensation amount, so as to obtain the reconstructed image and its attached location marker information;

[0065] The defect identification module is used to perform defect determination within the corresponding area of ​​the reconstructed image, constrained by the location marker information, and output the detection results.

[0066] This application provides a partial discharge defect detection system based on ultraviolet image recognition. Through modular design, it achieves effective implementation of the above method and provides a complete solution for practical applications. It can effectively solve the technical problem in the prior art that under strong ultraviolet background, the automatic gain control module indiscriminately and significantly compresses the dynamic range of the global signal, causing the weak partial discharge ultraviolet spot to be lost in analog-to-digital conversion because the amplitude is lower than the quantization threshold, thus making it impossible to effectively detect early discharge defects.

[0067] Beneficial effects

[0068] This application discloses a partial discharge defect detection method based on ultraviolet image recognition. It continuously acquires and preprocesses ultraviolet images, extracting spatial morphological features and temporal dynamic change features of bright areas, and then classifies these areas into background areas and candidate discharge areas. The key aspect is the introduction of a differentiated gain control strategy: a global gain upper limit is determined based on the background area, and a target gain lower limit is determined based on the candidate discharge area. When the target gain lower limit is higher than the global gain upper limit, the difference between the two is calculated as a local compensation amount while performing global gain control, and this difference is associated with the candidate discharge area location marker. In the subsequent analog-to-digital conversion stage of image acquisition, differentiated signal processing is performed on the corresponding pixels based on the candidate discharge area location marker, applying an additional gain corresponding to the local compensation amount to obtain the digital quantization value of each pixel. Finally, the digital quantization values ​​are inversely mapped and dynamically reconstructed, and defect determination is performed within the corresponding area of ​​the reconstructed image.

[0069] This application applies local compensation and differentiated signal processing to candidate discharge regions, suppressing strong background while specifically enhancing the amplitude of weak discharge signals. This ensures effective quantization during analog-to-digital conversion, preventing signal information loss. Consequently, this application significantly improves the detection capability and accuracy of early-stage weak partial discharge defects in complex outdoor environments, providing more reliable technical support for early fault warning and maintenance of power equipment. Attached Figure Description

[0070] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0071] Figure 1 A flowchart illustrating a partial discharge defect detection method based on ultraviolet image recognition, provided as an embodiment of the present invention;

[0072] Figure 2 A flowchart illustrating the steps of classifying each bright region into a background region and a candidate discharge region, provided in an embodiment of the present invention;

[0073] Figure 3 This is a flowchart provided by an embodiment of the present invention before generating the corresponding background region location markers and candidate discharge region location markers;

[0074] Figure 4 A flowchart provided for an embodiment of the present invention, which distinguishes internal pixels into transient active pixels and stable background pixels based on the degree of brightness fluctuation;

[0075] Figure 5 This is a schematic diagram of a partial discharge defect detection system based on ultraviolet image recognition, provided in an embodiment of the present invention. Detailed Implementation

[0076] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0077] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0078] In the operation and maintenance of power equipment, partial discharge defect detection based on ultraviolet image recognition is an important means of capturing early, weak discharge signals. Traditional ultraviolet imagers typically use an automatic gain control (AGC) module to adjust the amplification factor based on the global brightness of the field of view, ensuring that the discharge photon pulses in the digital image are significantly higher than the background noise, thus enabling effective detection by subsequent feature extraction algorithms. However, during outdoor inspections in clear weather, when a large area of ​​stable, bright ultraviolet background (e.g., ultraviolet band reflection from strong sunlight by metal attachments such as equalization rings) and extremely weak early surface discharge spots on the insulator string surface coexist, the AGC module will detect that the global average photon count or peak brightness exceeds the limit. To protect the sensor from overexposure damage and prevent image distortion, the module immediately executes a gain attenuation command, significantly reducing the global photoelectric amplification gain. This indiscriminate compression method significantly reduces the analog voltage amplitude in the pixel region where the target weak discharge point is located. When entering the analog-to-digital converter (ADC), the voltage amplitude falls below or near the minimum effective quantization threshold. Most of the effective photon count information is directly truncated and lost during quantization, dissolved in the quantization noise. Existing conventional methods mainly rely on global statistical features for gain adjustment, lacking a mechanism to protect weak local signals. This makes it difficult to suppress strong backgrounds while preserving extremely weak signals, resulting in subsequent algorithms being unable to observe the weak discharge spot at the corresponding location in the digital image. Specifically, in outdoor substation UV inspection scenarios, when metal accessories such as equalizing rings reflect strong sunlight into the UV band, causing a sharp increase in background brightness, the automatic gain control indiscriminately and drastically compresses the dynamic range of the global signal. This causes the originally weak local discharge UV spot to be lost during analog-to-digital conversion because its amplitude falls below the quantization threshold, preventing early discharge defects from being detected by UV image recognition algorithms.

[0079] like Figure 1 As shown, this application proposes a method for detecting partial discharge defects based on ultraviolet image recognition, including the following steps:

[0080] S1. Multiple frames of ultraviolet images are continuously acquired, and after analog-to-digital conversion and preprocessing, an ultraviolet digital image sequence is formed.

[0081] S2. Extract the bright areas from the ultraviolet digital image sequence based on the brightness threshold, and extract the spatial morphological features and temporal dynamic change features of each bright area;

[0082] S3. Based on spatial morphological characteristics and temporal dynamic change characteristics, each bright area is classified into background area and candidate discharge area, and corresponding background area position markers and candidate discharge area position markers are generated respectively.

[0083] S4. Determine the global gain upper limit based on the pixel brightness value of the area covered by the background region location marker, and determine the target gain lower limit based on the pixel brightness value of the area covered by the candidate discharge region location marker; when the target gain lower limit is higher than the global gain upper limit, perform global gain control based on the global gain upper limit, and calculate the difference between the two as the local compensation amount, and associate and bind the local compensation amount with the candidate discharge region location marker.

[0084] S5. During the analog-to-digital conversion of the subsequently acquired ultraviolet images, differential signal processing is performed on the corresponding pixels based on the location markers of the candidate discharge regions to obtain the digital quantization values ​​of each pixel;

[0085] S6. Based on the global gain upper limit and the local compensation amount, the digital quantization value is reverse mapped and the dynamic range is reconstructed to obtain the reconstructed image and its attached position marker information;

[0086] S7. Using the location marker information as a constraint, perform defect determination within the corresponding region of the reconstructed image and output the detection results.

[0087] The ultraviolet image in step S1 refers to the image acquired by an ultraviolet imaging device, which reflects the radiation intensity distribution of an object in the ultraviolet band. Analog-to-digital conversion is the process of converting analog signals into digital signals and is a fundamental step in image processing. An ultraviolet digital image sequence refers to a series of digital ultraviolet images arranged in chronological order after analog-to-digital conversion and preprocessing.

[0088] The highlighted region in step S2 refers to the set of pixels in the image whose brightness value is higher than a certain threshold, usually representing a strong ultraviolet radiation source. Spatial morphological features describe the geometric and brightness distribution characteristics of the highlighted region in the image space, such as area, shape, and brightness peak. Temporal dynamic change features describe the changing pattern of the highlighted region over consecutive time frames, such as positional movement and brightness fluctuations.

[0089] In step S3, the background region refers to the non-discharge area in the image, typically caused by ambient light, device reflection, etc. The candidate discharge region refers to the area in the image where partial discharge may occur. Background region location markers and candidate discharge region location markers are used to identify the location information of these regions in the image.

[0090] The global gain upper limit in step S4 is the maximum allowable gain of the system globally, used to prevent overexposure. The target gain lower limit is the minimum gain requirement set for the candidate discharge region to ensure that its signal is not lost. The local compensation amount is the difference between the global gain control and the target gain lower limit, used to perform local gain compensation for the candidate discharge region.

[0091] The differential signal processing in step S5 refers to applying different signal processing strategies to pixels in different regions to protect local signals. The digital quantization value is the digital signal after analog-to-digital conversion.

[0092] Step S6, inverse mapping and dynamic range reconstruction, refers to the process of restoring the gain-adjusted digital quantization values ​​to their original dynamic range and then reconstructing the image. The reconstructed image is the image after dynamic range reconstruction, in which weak signals are effectively recovered. Location marker information is the region identification information attached to the reconstructed image.

[0093] The defect determination in step S7 is the process of determining whether a partial discharge defect exists based on the features in the reconstructed image.

[0094] In the embodiments of this application, multiple frames of ultraviolet images are first continuously acquired, and then converted into a sequence of ultraviolet digital images after analog-to-digital conversion and preprocessing. The acquisition of ultraviolet images can be achieved using a solar-blind ultraviolet imager, which can effectively filter out visible light and capture only the ultraviolet radiation. Analog-to-digital conversion converts the analog ultraviolet image signal into a digital signal; for example, a 12-bit or 14-bit analog-to-digital converter can be used to provide sufficient quantization accuracy. Preprocessing steps may include noise suppression, image correction, etc., for example, reducing image noise through median filtering or Gaussian filtering, or eliminating the inherent non-uniformity of the sensor through flat-field correction.

[0095] Next, highlight regions are extracted from the ultraviolet digital image sequence based on a brightness threshold, and the spatial morphological features and temporal dynamic change features of each highlight region are extracted. The brightness threshold can be set as a fixed threshold; for example, pixels with brightness values ​​higher than a preset constant are identified as highlight regions. Alternatively, the brightness threshold can be dynamically adjusted according to the overall brightness distribution of the image; for example, it can be set as the average brightness of the image plus a standard deviation. The extraction of spatial morphological features of each highlight region specifically involves: calculating the total number of pixels contained in the highlight region as the spatial area; obtaining the perimeter of the highlight region's outline using an edge detection algorithm (such as the Canny algorithm); and calculating the compactness based on the spatial area and outline perimeter. Furthermore, the maximum pixel brightness value within the highlight region can be extracted as the peak brightness; the arithmetic mean of the brightness values ​​of all pixels within the highlight region can be calculated as the average brightness; and the weighted average of the brightness values ​​and pixel coordinates of each pixel within the highlight region can be calculated as the brightness energy centroid coordinates. The extraction of temporal dynamic change features of each bright region includes the following steps: A centroid-based matching method is used, with the brightness-energy centroid coordinates of the same bright region between adjacent frames as the primary matching criterion. The area similarity and average brightness similarity of the bright regions are used as matching verification conditions to establish cross-frame correspondences between bright regions, forming the evolution trajectory of each bright region across consecutive frames. Within a set sliding time window, based on the evolution trajectory, the area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency of the bright region within the sliding time window are calculated as temporal dynamic change features.

[0096] Subsequently, based on spatial morphological characteristics and temporal dynamic change characteristics, each bright region is classified into background regions and candidate discharge regions, and corresponding background region location markers and candidate discharge region location markers are generated respectively. The classification process can be based on a series of preset rules. For example, if the bright region has a large spatial area, low compactness, low area fluctuation rate and low energy centroid displacement variance, and a low brightness gradient change rate, it may be identified as a background region. Conversely, if the bright region has a small spatial area, a high brightness gradient change rate, and a flicker frequency falling within the typical discharge frequency band, it may be identified as a candidate discharge region. These judgment conditions can be adjusted according to actual application scenarios and experience. The location markers can be generated using a binary mask image, where the background region and candidate discharge region are marked with different pixel values.

[0097] Furthermore, a global gain upper limit is determined based on the pixel brightness values ​​of the area covered by the background region location markers, and a target gain lower limit is determined based on the pixel brightness values ​​of the area covered by the candidate discharge region location markers. The global gain upper limit can be set based on the average or peak brightness of the background region, for example, by setting it to a multiple of the average brightness of the background region to ensure that the background region is not overexposed. The target gain lower limit can be set based on the minimum brightness requirement of the candidate discharge region, for example, by setting it to the minimum brightness value that ensures the weak discharge signal can still be effectively quantized after analog-to-digital conversion. When the target gain lower limit is higher than the global gain upper limit, global gain control is performed using the global gain upper limit, and the difference between the two is calculated as a local compensation amount, which is then associated with the candidate discharge region location markers. This means that when global gain is limited, additional local gain compensation is required for the candidate discharge region. The local compensation amount can be a gain factor or a brightness offset.

[0098] During the subsequent analog-to-digital conversion of the acquired ultraviolet images, differential signal processing is performed on the corresponding pixels based on the location markers of the candidate discharge regions to obtain the digital quantization values ​​of each pixel. This differential signal processing can be performed before analog-to-digital conversion; for example, by applying an additional gain corresponding to the local compensation amount to the pixel signals of the candidate discharge regions. This can be achieved by introducing a programmable gain amplifier into the analog signal chain, dynamically adjusting the amplification factor based on the location marker information.

[0099] Finally, based on the global gain upper limit and local compensation, the digital quantized values ​​are inversely mapped and reconstructed using dynamic range to obtain the reconstructed image and its associated location marker information. Inverse mapping restores the gain-adjusted digital quantized values ​​to their original physical brightness values, while dynamic range reconstruction remaps these brightness values ​​to a wider dynamic range to highlight weak signals. For example, gamma correction or logarithmic mapping can be used for dynamic range reconstruction. The reconstructed image will contain enhanced weak discharge signals. Using the location marker information as a constraint, defect detection is performed within the corresponding regions of the reconstructed image, and the detection results are output. Defect detection can employ image processing and pattern recognition algorithms; for example, by analyzing the brightness, shape, and temporal characteristics of candidate discharge regions in the reconstructed image, it can be determined whether partial discharge defects exist.

[0100] The core innovation of this application lies in introducing a differentiated processing mechanism for weak local discharge signals, building upon traditional global gain control. Traditional methods indiscriminately reduce global gain in strong backgrounds, leading to the loss of weak discharge signals during analog-to-digital conversion. This application classifies bright areas to identify potential candidate discharge regions and sets independent target gain lower limits for them. When global gain is limited, a local compensation amount is calculated and associated with the candidate discharge regions. During subsequent analog-to-digital conversion in image acquisition, differentiated signal processing is performed on the pixels in these regions, applying additional gain. This local compensation mechanism ensures that weak discharge signals are effectively amplified before analog-to-digital conversion, avoiding signal loss. Subsequently, through inverse mapping and dynamic range reconstruction, these enhanced signals are clearly presented in the reconstructed image, enabling the defect detection algorithm to accurately identify early local discharge defects.

[0101] In some embodiments of this application described above, the brightness threshold used to extract the bright areas from the ultraviolet digital image sequence can be set as an adaptive brightness activation threshold.

[0102] Specifically, the brightness threshold is an adaptive brightness activation threshold;

[0103] The adaptive brightness activation threshold is dynamically set based on the background baseline and quantization noise margin at each pixel position in the ultraviolet digital image sequence.

[0104] The aforementioned adaptive brightness activation threshold refers to a brightness judgment standard that can automatically adjust according to changes in image content and environment. Its setting is not fixed but dynamically calculated and adjusted based on the background baseline and quantization noise margin of each pixel location in the ultraviolet digital image sequence. The background baseline can be understood as the average or stable brightness level of a specific pixel location when there is no discharge signal; it reflects the influence of factors such as ambient light and sensor dark current on pixel brightness. The quantization noise margin represents the range of brightness fluctuations caused by noise introduction during digital image acquisition and quantization, ensuring sufficient robustness in distinguishing between real signals and noise. By comprehensively considering these two factors, a personalized brightness activation threshold can be set for each pixel location that can effectively distinguish between real bright areas and background noise.

[0105] The proposed solution sets an adaptive brightness activation threshold, dynamically adjusting it based on the background baseline and quantization noise margin at each pixel location. This effectively addresses complex situations in real-world detection environments, such as uneven background brightness and fluctuating noise levels. Traditional fixed brightness thresholds may lead to misjudgments (identifying noise as a bright area) or missed detections (submerging genuine bright areas in the background) when faced with these variations. The adaptive threshold, however, adjusts for the specific conditions of each pixel, ensuring accurate identification of potential discharge bright areas under varying background and noise levels. Specifically, when the background baseline or quantization noise margin at a pixel location is high, the corresponding adaptive brightness activation threshold is increased to avoid misjudging background or noise as a bright area; conversely, when the background baseline is low or the noise level is low, the threshold is decreased, thereby improving the detection sensitivity for weak discharge signals.

[0106] This application further proposes spatial morphological features including spatial area, outline perimeter, compactness, peak brightness, average brightness, and brightness energy centroid coordinates;

[0107] For each highlighted region, extract its spatial morphological features, specifically:

[0108] The total number of pixels contained in the highlighted area is used as the spatial area. The perimeter of the highlighted area is obtained, and the compactness is calculated based on the spatial area and the perimeter.

[0109] The maximum pixel brightness value within the highlighted area is extracted as the peak brightness. The arithmetic mean of the brightness of all pixels within the highlighted area is calculated as the average brightness. The weighted average of the brightness value and pixel coordinates of each pixel within the highlighted area is calculated as the brightness energy centroid coordinates.

[0110] Specifically, the spatial area refers to the total number of pixels contained in the highlighted area, which characterizes the physical size of the highlighted area. The contour perimeter refers to the boundary length of the highlighted area, providing external feature information about the area's shape. Compactness can be calculated using the spatial area and contour perimeter; compactness is an indicator of the complexity of the highlighted area's shape. For example, circular or near-circular areas typically have high compactness, while elongated or irregularly shaped areas have low compactness. Peak brightness refers to the maximum brightness value among all pixels within the highlighted area, reflecting the instantaneous intensity of the partial discharge signal. Average brightness is the arithmetic mean of the brightness values ​​of all pixels within the highlighted area, characterizing the overall brightness level of the highlighted area. The brightness energy centroid coordinates are the weighted average of the brightness value of each pixel within the highlighted area and its corresponding pixel coordinates; they represent the center position of the brightness distribution in the highlighted area and are crucial for subsequent highlighted area tracking and matching.

[0111] This application's solution provides multi-dimensional and refined discrimination criteria for subsequent region classification by defining and quantifying the spatial morphological features of bright areas. For example, spatial area, contour perimeter, and compactness can effectively distinguish point-like interference (such as reflected light spots) from diffuse background noise, or differentiate discharge phenomena at different scales. Peak brightness and average brightness directly reflect the intensity characteristics of ultraviolet signals, helping to identify the energy level of discharge pulses. The introduction of brightness-energy centroid coordinates makes it possible to accurately track the same bright area across consecutive frames, laying the foundation for extracting temporal dynamic change features. Thus, the comprehensive application of these spatial morphological features enables the system to more accurately capture and describe the physical manifestations of partial discharge, thereby improving the accuracy and reliability of defect detection.

[0112] This application further proposes the steps for extracting the spatial morphological features and temporal dynamic change features of each highlighted region, specifically including:

[0113] The brightness energy centroid coordinates of the bright area are used as the main matching basis for the same bright area between adjacent frames, and the area similarity and average brightness similarity of the bright area are used as matching verification conditions. Cross-frame correspondence of each bright area is established between adjacent frames, forming the evolution trajectory of each bright area between consecutive frames.

[0114] Within a set sliding time window, based on the evolution trajectory, the area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency of the bright region within the sliding time window are calculated as temporal dynamic change characteristics.

[0115] Specifically, the luminance energy centroid coordinates refer to the weighted average of the luminance value and pixel coordinates of each pixel within a bright area. This effectively reflects the luminance distribution center of the bright area and serves as the primary matching criterion, providing a stable and physically meaningful tracking point. Area similarity refers to the degree of area difference between two bright areas in adjacent frames, while average luminance similarity refers to the degree of average luminance difference between two bright areas in adjacent frames. Using area similarity and average luminance similarity as matching verification conditions aims to eliminate cases where centroid coordinates are close but the actual bright areas are different, thus improving the accuracy of cross-frame matching. Through these matching criteria and verification conditions, the same bright area can be identified and associated between continuously acquired ultraviolet image frames, thereby forming a continuous evolution trajectory of the bright area over time.

[0116] The sliding time window can be understood as a preset time length or frame range used for local dynamic analysis of the evolution trajectory of the bright region. For example, this window can be set to 5 frames, 10 frames, or longer, depending on the duration and rate of change of the discharge phenomenon. Within this sliding time window, various temporal dynamic change characteristics can be calculated based on the formed evolution trajectory. Area fluctuation rate refers to the drastic change in the area of ​​the bright region within the sliding time window, reflecting its dimensional stability. Energy centroid displacement variance refers to the dispersion of the position change of the brightness energy centroid of the bright region within the sliding time window, reflecting its spatial stability or mobility. Brightness gradient change rate refers to the rate at which the brightness within the bright region changes over time, capturing the characteristics of sudden brightness changes or attenuation. Flicker frequency refers to the frequency of periodic brightness changes in the bright region within the sliding time window, and is one of the important temporal characteristics of partial discharge phenomena. The calculation of these temporal dynamic change characteristics aims to quantify the dynamic behavior of the bright region from multiple dimensions, providing richer and more accurate criteria for subsequent region classification.

[0117] This application's solution effectively addresses the issues of inaccurate tracking and insufficient feature description that may exist in traditional methods when dealing with dynamic bright regions by introducing a refined cross-frame matching mechanism and multi-dimensional temporal dynamic feature calculation. Specifically, using the brightness-energy centroid coordinates as the primary matching basis enables stable tracking of the core position of the bright region, while area similarity and average brightness similarity serve as verification conditions, further ensuring the reliability of the matching and avoiding mismatches. Thus, the established evolution trajectory can truly reflect the continuous temporal changes of the bright region. Based on this, calculating the area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency within a set sliding time window allows for a comprehensive capture of the dynamic characteristics of the bright region. For example, partial discharge typically manifests as transient behaviors such as rapid brightness changes, position jumps, or flickering; these characteristics can be effectively quantified by the aforementioned temporal dynamic change features, thereby distinguishing them from stable background noise or slowly changing interference.

[0118] In some preferred embodiments, it is assumed that a series of ultraviolet image frames are continuously acquired. When a bright region is detected in a frame, its luminance energy centroid coordinates, spatial area, and average luminance are first calculated. In the next frame, the system searches for other bright regions whose luminance energy centroid coordinates are close to those of the original bright region within a certain spatial range. For these potential matches, the area similarity and average luminance similarity with the original bright region are further calculated. For example, if the centroid distance between two bright regions is less than a preset threshold, and the area similarity is higher than 80% and the average luminance similarity is higher than 70%, they are considered to be the same bright region in different frames, thus establishing a cross-frame correspondence. By performing this process on multiple consecutive frames, the evolution trajectory of the bright region can be formed.

[0119] Furthermore, a sliding time window is set, for example, 5 frames. When the length of the evolution trajectory reaches or exceeds 5 frames, the system calculates the area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency of the highlighted region based on the latest 5 frames of data. For example, the area fluctuation rate can be obtained by calculating the ratio of the standard deviation of the highlighted region area to the average area in these 5 frames; the energy centroid displacement variance can be obtained by calculating the sum of the variances of the centroid coordinates in the X and Y directions in these 5 frames; the brightness gradient change rate can be determined by analyzing the trend and amplitude of the average brightness change between consecutive frames; and the flicker frequency can be obtained by performing spectral analysis or peak counting on the brightness time series. These calculated temporal dynamic change characteristics are then used to determine whether the highlighted region belongs to the background region or the candidate discharge region.

[0120] like Figure 2 As shown, this application further proposes the following steps for classifying each bright region into background regions and candidate discharge regions based on spatial morphological characteristics and temporal dynamic change characteristics:

[0121] A1. For each highlighted area, perform the following checks in sequence:

[0122] A2. If the highlighted area meets all of the following conditions, then the highlighted area is determined to be the background area:

[0123] A31. The spatial area is greater than the preset upper limit of the point light source area, the compactness is less than the preset compactness threshold, the area fluctuation rate is lower than the preset area fluctuation rate threshold, the energy centroid displacement variance is lower than the preset displacement variance threshold, and the brightness gradient change rate is lower than the preset brightness change threshold.

[0124] A32. Otherwise, if the highlighted area simultaneously meets all of the following conditions, then the highlighted area is determined to be a candidate discharge area:

[0125] A321. The spatial area is less than or equal to the preset upper limit of the point light source area, the brightness gradient change rate exceeds the preset pulse judgment threshold, and the flicker frequency falls into the preset typical discharge frequency band.

[0126] A322. Otherwise, the highlighted area will be classified as an unclassified area.

[0127] The above determination process is performed on each highlighted area extracted from the ultraviolet digital image sequence, aiming to classify them through a series of logical judgments.

[0128] Step A1 involves sequentially performing the following checks: conditions are checked in a preset order. Once a classification condition is met, subsequent checks are stopped and the classification is completed. As a preferred implementation, when a highlighted area is determined to be a background area, it needs to meet multiple conditions simultaneously.

[0129] In step A31, a spatial area greater than the preset upper limit of the point light source area means that the physical size or number of pixels of the bright area exceeds the maximum area typically generated by a point light source (such as a distant stray light point). This helps to identify large-area stable background light spots. A compactness less than the preset compactness threshold measures the regularity of the bright area's shape; lower compactness usually indicates irregular or scattered shapes, which is consistent with the characteristics of some background interference. Area volatility lower than the preset area volatility threshold and energy centroid displacement variance lower than the preset displacement variance threshold together characterize the stability and positional invariance of the bright area over time; background areas typically exhibit lower volatility and displacement. A brightness gradient change rate lower than the preset brightness change threshold indicates that the brightness change in this area is gradual and does not possess the instantaneous pulse characteristics of a discharge event.

[0130] In step A321, when a bright area is identified as a candidate discharge region, it must also meet specific conditions. For example, a spatial area less than or equal to a preset upper limit for the area of ​​a point light source indicates that the area is small, consistent with the characteristic that partial discharge typically manifests as small-scale light spots. A brightness gradient change rate exceeding a preset pulse determination threshold is one of the key features for identifying discharge events, as partial discharge is usually accompanied by rapid increases and decreases in brightness, forming pulse signals. A flicker frequency falling within a preset typical discharge frequency band utilizes the characteristic that partial discharge events have a specific repetition frequency in time; analyzing the flicker frequency further confirms the nature of the discharge. Bright areas that do not meet any of the above classification conditions are classified as unclassified areas. This provides flexibility for potentially more complex analyses or manual verification, avoiding simple misjudgment or discarding.

[0131] This application's solution effectively addresses the problem of insufficient classification accuracy of bright regions in complex environments by introducing a multi-dimensional, multi-condition combined judgment logic. Specifically, by comprehensively considering the spatial morphological characteristics (such as spatial area and compactness) and temporal dynamic change characteristics (such as area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency) of bright regions, it can more comprehensively and accurately characterize the essential attributes of bright regions. For example, background regions often exhibit large spatial areas, low compactness, stable temporal dynamics (low fluctuation rate, low displacement variance), and gentle brightness changes; the combination of these characteristics allows them to be accurately identified and excluded. Conversely, partial discharge regions typically exhibit small spatial areas, drastic brightness pulse changes, and specific flicker frequencies; the combination of these characteristics allows them to be effectively distinguished from complex backgrounds. This mechanism based on multi-feature collaborative judgment significantly enhances the robustness and accuracy of classification, reducing the risk of false positives and false negatives.

[0132] In some preferred embodiments, a specific example is given below. Assume that during a single ultraviolet image sequence acquisition, the system detects two bright regions, A and B. For bright region A, after feature extraction, its spatial area is calculated to be much larger than the preset upper limit of the point light source area, indicating low compactness. Furthermore, in multiple consecutive frames, its area fluctuation rate, energy centroid displacement variance, and brightness gradient change rate are all lower than the corresponding preset thresholds. According to the above determination logic, since bright region A simultaneously meets all the determination conditions for background regions, it will be determined by the system as a background region, and a corresponding background region location marker will be generated. This may correspond to a stable, large-area reflected light spot or ambient light source. For bright region B, its spatial area is calculated to be less than or equal to the preset upper limit of the point light source area, its brightness gradient change rate significantly exceeds the preset pulse determination threshold, and its flicker frequency falls within the preset typical discharge frequency band. According to the above determination logic, since bright region B simultaneously meets all the determination conditions for candidate discharge regions, it will be determined by the system as a candidate discharge region, and a corresponding candidate discharge region location marker will be generated. This could correspond to a typical partial discharge event, such as a corona discharge or a surface discharge that produces an ultraviolet spot. Through this explicit classification mechanism, the system can effectively distinguish between bright region A (background) and bright region B (candidate discharge), providing an accurate basis for subsequent defect determination.

[0133] like Figure 3 As shown, this application further proposes the following steps before generating the corresponding background region location markers and candidate discharge region location markers:

[0134] B1. For bright areas that are identified as background areas and whose spatial area exceeds the preset upper limit of the point light source area, analyze the brightness fluctuation of each pixel in the bright area over a series of consecutive frames.

[0135] B2. Based on the degree of brightness fluctuation, internal pixels are divided into transient active pixels and stable background pixels; spatial clustering judgment is performed on multiple pixels marked as transient active pixels to determine whether the transient active pixels form a clustered distribution in spatial location;

[0136] B31. If transiently active pixels do not form a clustered distribution, then maintain the current classification result of the highlighted area;

[0137] B32. If transient active pixels form a clustered distribution, then it is further determined whether the spatial area of ​​the sub-region formed by the cluster falls within the preset discharge scale range;

[0138] B321. If it does not fall into the category, maintain the current classification result of the highlighted area;

[0139] B322. If it falls into the category, the sub-region is determined to be a suspected discharge region nested inside the highlighted region. The suspected discharge region is logically separated from the highlighted region and assigned to the candidate discharge region position mark. A transition buffer zone is set around the periphery of the suspected discharge region in the separated highlighted region. The region after removing the suspected discharge region and the transition buffer zone is assigned to the background region position mark to update the background region position mark and the candidate discharge region position mark, and generate the position mark of the transition buffer zone.

[0140] Step B1, analyzing the brightness fluctuation of each pixel within the highlighted area over a continuous multi-frame time series, can be understood as quantifying the brightness change of each pixel in the time dimension. For example, the fluctuation can be characterized by calculating the brightness temporal variance or brightness gradient peak of each pixel in a continuous multi-frame image.

[0141] In step B2, transient active pixels refer to those pixels whose brightness fluctuates significantly over time, exhibiting momentary high brightness or rapid changes, while stable background pixels refer to pixels with relatively stable brightness and small fluctuations. Performing spatial clustering judgment on transient active pixels aims to identify whether these active pixels form a continuous or dense region in space, which is typically achieved through connected component analysis, clustering algorithms, or morphological operations.

[0142] The preset discharge scale range in step B32 refers to the typical spatial size range that a partial discharge event may occupy in an image, determined based on experience or theory. Logical stripping refers to conceptually separating the suspected discharge region from its background region without altering the original image data and assigning it an independent classification label.

[0143] The transition buffer band in step B322 is set to provide an isolation area between the suspected electron discharge area and the remaining background area to avoid edge effects or signal overflow from interfering with subsequent processing.

[0144] This application's solution, through refined internal analysis of bright areas initially identified as background regions but with large spatial areas, effectively identifies and separates potentially nested sub-regions exhibiting discharge characteristics. Specifically, by analyzing the brightness fluctuations of pixels, stable and transiently active parts of the background region can be distinguished. Furthermore, spatial clustering judgment of transiently active pixels can differentiate random noise or isolated transient bright spots from genuine discharge phenomena with a certain spatial range. When the spatial area of ​​the clustered sub-regions conforms to a preset discharge scale range, the sub-region is reclassified as a suspected discharge region, thus avoiding overall misclassification due to its inclusion within a large background region. This logical separation and transition buffer approach ensures that suspected discharge regions can be independently assessed for subsequent defects, while maintaining the classification accuracy of the remaining background regions.

[0145] In some preferred embodiments, it is assumed that in a certain detection, a large reflective area is initially classified as a background area. However, in a localized area of ​​this reflective area, transient partial discharges occasionally occur due to minor defects within the device. In subsequent image sequence analysis, the brightness fluctuations of each pixel within this reflective area are analyzed. The results show that most pixels in the reflective area have stable brightness, but a small number of pixels exhibit significant pulse-like brightness fluctuations across multiple frames; these pixels are marked as transiently active pixels. Furthermore, spatial clustering of these transiently active pixels is assessed, revealing that they form a dense cluster of approximately 10x10 pixels in the upper left corner of the reflective area. The spatial area of ​​this cluster is determined to fall within a preset partial discharge scale range. At this point, the 10x10 pixel cluster is identified as a suspected discharge region nested within the reflective area and logically separated from the original background area, being included in the candidate discharge region location marker. Simultaneously, a 2-pixel-wide transition buffer band is set around the cluster to ensure the accuracy of subsequent processing. After removing the suspected discharge region and the transition buffer band, the original reflective area continues to be marked as a background area. In this way, even if a discharge event is obscured by a large reflective area, it can still be accurately identified and located.

[0146] like Figure 4 As shown, this application further proposes a specific method for distinguishing between the two, including the following steps:

[0147] C1. Calculate the luminance temporal variance and luminance gradient peak of each pixel within the bright area over a series of consecutive frames, and use them as the luminance temporal variance and luminance gradient peak.

[0148] C2. The average brightness noise floor of the entire bright area is obtained by statistically analyzing the brightness time variance of each pixel;

[0149] C3. Dynamically set the high-frequency fluctuation threshold based on the average brightness noise floor;

[0150] C4. Mark pixels whose brightness temporal variance or brightness gradient peak exceeds the high-frequency fluctuation threshold as transient active pixels, and mark the remaining pixels not marked as transient active pixels as stable background pixels.

[0151] In step C1, the brightness temporal variance refers to the dispersion of the brightness value of each pixel within a bright area over time in a series of consecutive image frames, calculated using statistical methods. The brightness gradient peak reflects the drastic change in pixel brightness over time, i.e., the magnitude of significant changes in brightness value within a short period. These two metrics are used together to quantify the degree of brightness fluctuation in a pixel.

[0152] In step C2, the average luminance noise base is obtained by statistically analyzing the temporal variance of the luminance of all pixels within the bright area, such as calculating its average or median, to obtain the overall noise level of that area. This base provides a reference for the subsequent dynamic setting of the threshold;

[0153] In step C3, the high-frequency fluctuation threshold is dynamically set based on the average brightness noise floor. For example, it can be set to a multiple of the average brightness noise floor, or adaptively adjusted using statistical methods (such as standard deviation). The purpose is to distinguish normal background noise fluctuations from significant brightness changes caused by transient events (such as discharge).

[0154] In step C4, when the brightness temporal variance or brightness gradient peak of a pixel exceeds the high-frequency fluctuation threshold, it indicates that the brightness fluctuation of the pixel is abnormally drastic, exhibiting transient activity characteristics, and is therefore marked as a transiently active pixel. Conversely, pixels with brightness fluctuations within the threshold range are considered stable background pixels, representing a relatively stable background portion within the region.

[0155] This application's solution, by introducing two quantitative indicators—brightness temporal variance and brightness gradient peak—can precisely capture the brightness variation characteristics of each pixel within a high-brightness region over time. By calculating the average brightness noise floor and dynamically setting a high-frequency fluctuation threshold, the judgment of pixel activity becomes adaptive, effectively distinguishing between drastic brightness fluctuations caused by transient events such as partial discharge and normal background noise. This distinction method, based on statistics and dynamic thresholds, avoids misjudgments or omissions that may arise from fixed thresholds, thereby improving the accuracy of transient active pixel identification.

[0156] In some embodiments described above in this application, differential signal processing is performed on corresponding pixels based on the location markers of candidate discharge regions to obtain digital quantization values ​​for each pixel. However, in its implementation, if the differential signal processing method is inappropriate, especially in complex scenarios where high-brightness backgrounds and weak discharge signals coexist, the weak discharge signals may be lost or submerged by noise during analog-to-digital conversion due to dynamic range compression, thereby affecting the sensitivity and accuracy of detection.

[0157] This application further proposes that the above-mentioned steps of performing differential signal processing on the corresponding pixels based on the candidate discharge region location markers include: applying an additional gain corresponding to the local compensation amount to the image signal of the pixel before analog-to-digital conversion.

[0158] Differential signal processing refers to applying an additional gain to the original analog image signal of pixels marked as candidate discharge regions before analog-to-digital conversion. This additional gain corresponds to a previously calculated local compensation amount. The local compensation amount reflects the difference between the target lower gain limit and the global upper gain limit, aiming to compensate for the dynamic range compression of the candidate discharge region signal that may be caused by global gain control. By applying this additional gain before analog-to-digital conversion, the amplitude of weak signals within the candidate discharge region can be effectively increased, allowing for more accurate quantization during analog-to-digital conversion and avoiding information loss due to insufficient quantization precision. For example, this additional gain can be implemented using an analog amplifier, whose gain coefficient can be dynamically adjusted according to the local compensation amount to ensure appropriate amplification of discharge signals of different intensities.

[0159] This application's solution addresses the problem of insufficient analog-to-digital conversion accuracy caused by dynamic range compression of weak discharge signals within the candidate discharge region under global gain control by applying an additional gain corresponding to the local compensation amount to the pixel image signal of the candidate discharge region before analog-to-digital conversion. Specifically, when global gain control is executed at the upper limit of the global gain, the signal in the candidate discharge region may be compressed overall. In this case, the calculated local compensation amount indicates the magnitude by which the candidate discharge region signal needs to be additionally boosted. Before analog-to-digital conversion, this local compensation amount is converted into an analog gain and applied to the corresponding pixel signal. This ensures that signals that might otherwise be lost or have low quantization accuracy after analog-to-digital conversion due to weakness are amplified to an appropriate magnitude before entering the converter, thereby fully utilizing the quantization range of the converter and ensuring the integrity and accuracy of weak signals.

[0160] In some preferred embodiments, suppose the ultraviolet image acquisition system is monitoring a power device in an environment with strong ultraviolet background radiation (e.g., reflections from sunlight or other nearby light sources), while the device may contain weak partial discharge phenomena. Under conventional global gain control, to avoid signal saturation in the background region, the system may set the overall gain at a low level. In this case, the amplitude of those already very weak partial discharge signals may not be accurately quantified during analog-to-digital conversion, or may even be drowned out by noise, leading to missed detection.

[0161] However, using the scheme of this application, after identifying candidate discharge regions and calculating the local compensation amount, the system applies an additional gain corresponding to the local compensation amount to the pixel signals of these candidate discharge regions before analog-to-digital conversion. For example, if the local compensation amount indicates that the signal needs to be boosted by a factor of 2, the analog amplifier circuit at the front end of the analog-to-digital converter will provide a factor of 2 for the signals of these specific pixels. In this way, even with a low global gain, the weak discharge signals in the candidate discharge regions can be effectively amplified, ensuring sufficient amplitude when entering the analog-to-digital converter for high-precision digitization. Finally, through subsequent inverse mapping and dynamic range reconstruction, these amplified weak discharge signals are clearly presented, significantly improving the detection capability of early, weak partial discharge defects.

[0162] This application further proposes that, after outputting the detection results, the following steps are also included:

[0163] If the detection result indicates that there is a defect in the area corresponding to the candidate discharge area location marker, then increase the local compensation amount of that area in subsequent acquisition frames;

[0164] If the detection result indicates that there is no defect in the area corresponding to the candidate discharge area location marker, then the local compensation amount for that area in subsequent acquisition frames is reduced.

[0165] When the detection result output by the defect determination module indicates that a defect exists in the area corresponding to a candidate discharge region location marker, it means that a partial discharge phenomenon has indeed been detected in that area. To better capture and analyze the discharge signal in this area during subsequent monitoring, the sensitivity of its signal processing needs to be improved. Therefore, the local compensation amount for this area in subsequent acquisition frames will be increased. Increasing the local compensation amount can be understood as applying an additional gain corresponding to the increased local compensation amount to the pixel signal of this area during subsequent analog-to-digital conversion, thereby enabling the discharge signal, which might otherwise be ignored due to weak signal strength, to be more clearly quantified and reconstructed. Conversely, if the detection result indicates that no defect exists in the area corresponding to a candidate discharge region location marker, it means that no partial discharge phenomenon was detected in this area, or the detected signal is insufficient to be identified as a defect. In this case, to avoid over-amplifying background noise or reduce the possibility of false alarms, the local compensation amount for this area in subsequent acquisition frames will be reduced. Reducing the local compensation amount can decrease the additional gain on the pixel signal of this area, thereby effectively suppressing the amplification of background noise and improving the robustness of detection.

[0166] This application's solution addresses the problem in basic schemes where local compensation may not adapt to dynamically changing discharge conditions by introducing a dynamic adjustment mechanism for local compensation based on detection results. Specifically, when a defect determination confirms a defect in a candidate discharge region, it indicates that the discharge signal in that region may require stronger gain for effective capture and analysis. By increasing the local compensation for that region in subsequent acquisition frames, more sufficient amplification and quantization of the signal in that region can be ensured, thereby improving the capture capability and signal-to-noise ratio of the discharge signal and avoiding missed detections due to weak signals. Conversely, when a defect determination indicates that a candidate discharge region is defect-free, it may mean that the current local compensation is too high, leading to excessive amplification of background noise, or that the discharge activity in that region has stopped or weakened. In this case, reducing the local compensation for that region in subsequent acquisition frames can effectively suppress the amplification of background noise, reduce the false alarm rate, and allow system resources to be more rationally allocated to other regions that may have discharge. This adaptive adjustment mechanism enables the system to dynamically optimize signal processing parameters according to the actual discharge conditions, thereby improving the overall detection accuracy and robustness.

[0167] As a specific implementation, suppose that during a certain monitoring period, the system detects a persistent partial discharge defect in candidate discharge region A through the defect determination module. According to the above scheme, the system will record this detection result and, during subsequent image acquisition and analog-to-digital conversion, increase the local compensation amount of the pixel corresponding to candidate discharge region A by a preset step size (e.g., 5%). In this way, in subsequent frames, the signal of region A will receive greater additional gain, allowing its weak discharge signal to be captured and quantified more clearly, thus facilitating more accurate analysis of discharge characteristics. Conversely, if no defect is detected in candidate discharge region B for several consecutive monitoring periods, the system will determine that there is currently no discharge activity in that region. In this case, to avoid unnecessary noise amplification, the system will reduce the local compensation amount of region B in subsequent acquisition frames (e.g., reduce it by 2%). This adjustment helps reduce the interference of background noise on the detection of this region, improves the signal-to-noise ratio of the detection, and optimizes the use of system resources. Through this dynamic feedback mechanism, the local compensation amount can be optimized in real time according to the actual discharge situation, ensuring sufficient gain when high sensitivity is required and avoiding excessive amplification of noise when not required, thereby significantly improving the adaptability and accuracy of partial discharge defect detection.

[0168] like Figure 5 As shown in the figure, a specific embodiment of this application also discloses a partial discharge defect detection system based on ultraviolet image recognition, comprising:

[0169] The image acquisition module is used to continuously acquire multiple frames of ultraviolet images. The acquired image signals are converted from analog to digital and preprocessed to form an ultraviolet digital image sequence.

[0170] The feature extraction and tracking module is used to extract bright regions from the ultraviolet digital image sequence based on the brightness threshold, and to extract the spatial morphological features and temporal dynamic change features of each bright region.

[0171] The region classification module is used to classify each bright region into background regions and candidate discharge regions based on spatial morphological features and temporal dynamic change features, and generate corresponding background region position markers and candidate discharge region position markers respectively.

[0172] The gain control module is used to determine the global gain upper limit based on the pixel brightness value of the area covered by the background region location marker, and to determine the target gain lower limit based on the pixel brightness value of the area covered by the candidate discharge region location marker. When the target gain lower limit is higher than the global gain upper limit, global gain control is performed with the global gain upper limit, and the difference between the two is calculated as a local compensation amount. The local compensation amount is then associated and bound with the candidate discharge region location marker.

[0173] The differential signal protection module is used to perform differential signal processing on the corresponding pixels based on the position markers of the candidate discharge areas during the analog-to-digital conversion of the subsequently acquired ultraviolet images, so as to obtain the digital quantization value of each pixel.

[0174] The image reconstruction module is used to perform inverse mapping and dynamic range reconstruction of digital quantization values ​​based on the global gain upper limit and local compensation amount, so as to obtain the reconstructed image and its attached position marker information;

[0175] The defect identification module is used to perform defect determination within the corresponding region of the reconstructed image, constrained by location marker information, and output the detection results.

[0176] The image acquisition module can consist of hardware components such as a solar-blind ultraviolet imager, an optical lens, an image sensor, and an analog-to-digital converter. This module is responsible for converting continuous analog ultraviolet image signals into digital signals and performing preliminary preprocessing, such as integrating hardware-level noise suppression circuitry or an image correction unit. As a preferred embodiment, the image acquisition module can be configured as a programmable gain amplifier to perform preliminary gain adjustment on the analog signal before analog-to-digital conversion.

[0177] The feature extraction and tracking module can be implemented using hardware platforms such as embedded processors, digital signal processors, or field-programmable gate arrays, and runs corresponding image processing algorithms. This module receives ultraviolet digital image sequences and, through software or hardware acceleration, quickly identifies bright regions and extracts their spatial morphological features (such as area, perimeter, and brightness distribution) and temporal dynamic change features (such as positional drift and brightness fluctuation). For example, a threshold-based segmentation algorithm can be used to extract bright regions, and image moments or connected component analysis can be used to calculate spatial morphological features. The extraction of temporal dynamic change features can be achieved through inter-frame differencing, optical flow methods, or target tracking algorithms.

[0178] The region classification module can be integrated with the feature extraction and tracking module in the same processing unit, or it can run as a separate software module on the main control unit. This module classifies highlighted regions according to preset classification rules or machine learning models. For example, algorithms such as decision trees, support vector machines, or neural networks can be used to distinguish highlighted regions into background regions and candidate discharge regions based on extracted spatial morphological features and temporal dynamic change features. The classification results are output in the form of location markers, which can be binary mask images or metadata containing region coordinates and category information.

[0179] The gain control module can be a standalone microcontroller or software logic integrated into the image processing unit. This module dynamically calculates the global upper limit and the target lower limit of gain based on the location marker information output by the region classification module. For example, the global upper limit of gain can be determined by statistically analyzing the brightness histogram of background region pixels, and the target lower limit of gain can be set by analyzing the brightness distribution of candidate discharge regions. When local compensation is required, this module calculates the necessary compensation amount and associates it with the corresponding candidate discharge region location markers for use by subsequent modules.

[0180] Differential signal protection modules are typically integrated into the front end of the analog-to-digital converter (ADC) of the image acquisition module, or function as a separate analog signal processing unit. This module receives local compensation and location marker information from the gain control module and applies additional gain to the analog pixel signal corresponding to the candidate discharge region before ADC conversion. For example, a programmable gain amplifier array or analog switch network can be used to differentially amplify specific pixel regions, ensuring that weak signals are not overwhelmed by quantization noise during digitization.

[0181] The image reconstruction module can be implemented using a high-performance processor or graphics processing unit. This module receives the digital quantized value output from the differential signal protection module and, in conjunction with the global gain cap and local compensation, performs inverse mapping and dynamic range reconstruction. For example, algorithms such as lookup tables, gamma correction, or logarithmic mapping can be used to restore the differentially processed digital quantized value to its original physical brightness range and perform dynamic range expansion to enhance the visibility of weak signals. The reconstructed image and its accompanying location marker information are then passed to the defect identification module.

[0182] The defect identification module can be a standalone software application running on the main control computer or an embedded system. This module uses location markers in the reconstructed image as constraints to perform defect detection within corresponding regions. For example, it can employ algorithms based on thresholding, pattern matching, texture analysis, or deep learning to analyze the features of candidate discharge regions in the reconstructed image and determine whether a local discharge defect exists. Finally, the module outputs detection results, such as information indicating the presence, location, and intensity of discharge.

[0183] The proposed partial discharge defect detection system based on ultraviolet image recognition, through its modular design, aims to address the problem that traditional ultraviolet imagers, when performing outdoor inspections in clear weather, suffer from early discharge defects when the automatic gain control module indiscriminately compresses the global signal dynamic range indiscriminately, causing the originally weak partial discharge ultraviolet spots to be lost during analog-to-digital conversion due to amplitude falling below the quantization threshold. Specifically, the image acquisition module acquires raw ultraviolet image data and performs preliminary digitization and preprocessing. The feature extraction and tracking module identifies bright regions in the image and analyzes their spatial and temporal dynamic characteristics. The region classification module intelligently classifies these bright regions into background and potential discharge regions using these features and generates corresponding labels. Based on these classification results, the gain control module performs global gain control while calculating and associating local compensation amounts for candidate discharge regions to ensure signal integrity. During the analog-to-digital conversion stage, the differential signal protection module performs special processing on the pixel signals of candidate discharge regions based on local compensation amounts to prevent weak signals from being truncated. Subsequently, the image reconstruction module uses the global gain upper limit and local compensation amounts to perform inverse mapping and dynamic range reconstruction of the digital quantization values, thereby recovering and enhancing the weak discharge signals. Finally, the defect identification module uses the location marker information in the reconstructed image as a basis to perform defect judgment on specific regions and output accurate detection results. Through the collaborative work of these modules, this system can effectively protect and highlight weak discharge signals, significantly improving the detection capability of early partial discharge defects in complex environments.

[0184] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for detecting partial discharge defects based on ultraviolet image recognition, characterized in that, Includes the following steps: Multiple frames of ultraviolet images were continuously acquired, and after analog-to-digital conversion and preprocessing, an ultraviolet digital image sequence was formed. High-brightness regions are extracted from the ultraviolet digital image sequence based on brightness thresholds, and the spatial morphological features and temporal dynamic change features of each high-brightness region are extracted. Based on the spatial morphological characteristics and the temporal dynamic change characteristics, each bright region is classified into a background region and a candidate discharge region, and corresponding background region position markers and candidate discharge region position markers are generated respectively. A global gain upper limit is determined based on the pixel brightness value of the area covered by the background region location marker, and a target gain lower limit is determined based on the pixel brightness value of the area covered by the candidate discharge region location marker. When the target gain lower limit is higher than the global gain upper limit, global gain control is performed based on the global gain upper limit, and the difference between the two is calculated as a local compensation amount. The local compensation amount is then associated and bound with the candidate discharge region location marker. During the analog-to-digital conversion of the subsequently acquired ultraviolet images, differential signal processing is performed on the corresponding pixels based on the location markers of the candidate discharge regions to obtain the digital quantization values ​​of each pixel. Based on the global gain upper limit and the local compensation amount, the digital quantization value is inversely mapped and dynamically reconstructed to obtain the reconstructed image and its associated location marker information; Using the location marker information as a constraint, defect determination is performed in the corresponding area of ​​the reconstructed image, and the detection result is output.

2. The partial discharge defect detection method based on ultraviolet image recognition according to claim 1, characterized in that, The brightness threshold is an adaptive brightness activation threshold; The adaptive brightness activation threshold is dynamically set based on the background baseline and quantization noise margin of each pixel position in the ultraviolet digital image sequence.

3. The partial discharge defect detection method based on ultraviolet image recognition according to claim 1, characterized in that, The spatial morphological features include spatial area, outline perimeter, compactness, peak brightness, average brightness, and brightness energy centroid coordinates; The extraction of spatial morphological features of each highlighted region specifically includes: The total number of pixels contained in the highlighted area is counted as the spatial area, the outline perimeter of the highlighted area is obtained, and the compactness is calculated based on the spatial area and the outline perimeter. The maximum pixel brightness value within the highlighted area is extracted as the peak brightness. The arithmetic mean of the brightness of all pixels within the highlighted area is calculated as the average brightness. The weighted average of the brightness value and pixel coordinates of each pixel within the highlighted area is calculated as the brightness energy centroid coordinates.

4. The partial discharge defect detection method based on ultraviolet image recognition according to claim 3, characterized in that, Extracting the temporal dynamic change features of each highlighted region includes the following steps: The brightness energy centroid coordinates of the bright area are used as the main matching basis for the same bright area between adjacent frames, and the area similarity and average brightness similarity of the bright area are used as matching verification conditions. Cross-frame correspondence between each bright area is established between adjacent frames, forming the evolution trajectory of each bright area between consecutive frames. Within a set sliding time window, based on the evolution trajectory, the area fluctuation rate, energy centroid displacement variance, brightness gradient change rate, and flicker frequency of the bright region within the sliding time window are calculated as the temporal dynamic change characteristics.

5. The partial discharge defect detection method based on ultraviolet image recognition according to claim 4, characterized in that, The step of classifying each bright region into background regions and candidate discharge regions based on the spatial morphological characteristics and the temporal dynamic change characteristics includes the following steps: For each highlighted region, the following determination is performed sequentially: If the highlighted area simultaneously meets all of the following conditions, then the highlighted area is determined to be the background area: The spatial area is greater than the preset upper limit of the point light source area, the compactness is less than the preset compactness threshold, the area fluctuation rate is lower than the preset area fluctuation rate threshold, the energy centroid displacement variance is lower than the preset displacement variance threshold, and the brightness gradient change rate is lower than the preset brightness change threshold. Otherwise, if the highlighted area simultaneously meets all of the following conditions, then the highlighted area is determined to be the candidate discharge area: The spatial area is less than or equal to the preset upper limit of the point light source area, the brightness gradient change rate exceeds the preset pulse judgment threshold, and the flicker frequency falls into the preset typical discharge frequency band. Otherwise, the highlighted area will be classified as an unclassified area.

6. The partial discharge defect detection method based on ultraviolet image recognition according to claim 5, characterized in that, Before generating the corresponding background region location markers and candidate discharge region location markers, the following steps are also included: For a bright area that is identified as the background area and whose spatial area exceeds the preset upper limit of the point light source area, analyze the brightness fluctuation of each pixel within the bright area over a series of consecutive frames. Based on the degree of brightness fluctuation, the internal pixels are divided into transient active pixels and stable background pixels; For multiple pixels marked as transient active pixels, a spatial clustering determination is performed to determine whether the transient active pixels form a clustered distribution in spatial location; If the transient active pixels do not form a clustered distribution, the current classification result of the highlighted area is maintained; If the transient active pixels form a clustered distribution, it is further determined whether the spatial area of ​​the clustered sub-region falls within the preset discharge scale range; If it does not fall into the category, the current classification result of the highlighted area is maintained; If it falls into the category, the sub-region is determined to be a suspected discharge region nested inside the highlighted region, and the suspected discharge region is logically separated from the highlighted region. The suspected discharge region is then assigned to the candidate discharge region position mark. A transition buffer zone is set around the periphery of the suspected discharge region in the separated highlighted region. The region after removing the suspected discharge region and the transition buffer zone is assigned to the background region position mark to update the background region position mark and the candidate discharge region position mark, and to generate the position mark of the transition buffer zone.

7. The partial discharge defect detection method based on ultraviolet image recognition according to claim 6, characterized in that, The step of classifying internal pixels into transiently active pixels and stable background pixels based on the degree of brightness fluctuation includes the following steps: Calculate the brightness temporal variance and brightness gradient peak value of each pixel within the bright area in a continuous multi-frame time series, and use them as the brightness temporal variance and the brightness gradient peak value. The average brightness noise floor of the entire bright area is obtained by statistically analyzing the brightness time variance of each pixel. The high-frequency fluctuation threshold is dynamically set based on the average brightness noise floor. Pixels whose brightness time variance or brightness gradient peak exceeds the high-frequency fluctuation threshold are marked as transient active pixels, and the remaining pixels not marked as transient active pixels are marked as stable background pixels.

8. The partial discharge defect detection method based on ultraviolet image recognition according to claim 1, characterized in that, The step of performing differential signal processing on the corresponding pixels based on the candidate discharge region location markers includes: Before analog-to-digital conversion, an additional gain corresponding to the local compensation amount is applied to the image signal of the pixel.

9. The partial discharge defect detection method based on ultraviolet image recognition according to claim 1, characterized in that, After performing defect determination within the corresponding region of the reconstructed image using the location marker information as a constraint and outputting the detection result, the method further includes the following steps: If the detection result indicates that there is a defect in the region corresponding to the candidate discharge region location marker, then the local compensation amount of the region in subsequent acquisition frames is increased. If the detection result indicates that there is no defect in the region corresponding to the candidate discharge region location marker, then the local compensation amount of the region in subsequent acquisition frames is reduced.

10. A partial discharge defect detection system based on ultraviolet image recognition, characterized in that, include: The image acquisition module is used to continuously acquire multiple frames of ultraviolet images. The acquired image signals are converted from analog to digital and preprocessed to form an ultraviolet digital image sequence. The feature extraction and tracking module is used to extract bright regions from the ultraviolet digital image sequence based on a brightness threshold, and to extract the spatial morphological features and temporal dynamic change features of each bright region. The region classification module is used to classify each bright region into a background region and a candidate discharge region according to the spatial morphological features and the temporal dynamic change features, and generate corresponding background region position markers and candidate discharge region position markers respectively. The gain control module is used to determine a global gain upper limit value based on the pixel brightness value of the area covered by the background region location marker, and to determine a target gain lower limit value based on the pixel brightness value of the area covered by the candidate discharge region location marker; when the target gain lower limit value is higher than the global gain upper limit value, global gain control is performed with the global gain upper limit value, and the difference between the two is calculated as a local compensation amount, and the local compensation amount is associated and bound with the candidate discharge region location marker; The differential signal protection module is used to perform differential signal processing on the corresponding pixels according to the candidate discharge region position markers during the analog-to-digital conversion of the subsequently acquired ultraviolet images, so as to obtain the digital quantization value of each pixel. The image reconstruction module is used to perform inverse mapping and dynamic range reconstruction on the digital quantization value according to the global gain upper limit and the local compensation amount to obtain the reconstructed image and its attached position marker information; The defect identification module is used to perform defect determination within the corresponding area of ​​the reconstructed image, constrained by the location marking information, and output the detection result.