Circuit breaker conductive system image detection method
By detecting the incident angle of the light source in real time and analyzing the image light characteristics, the image detection method of the circuit breaker conductivity system solves the problem of brightness distribution imbalance caused by low-angle light, and improves the accuracy and stability of crack detection.
Patent Information
- Application Number
- CN202510330341.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing circuit breaker conductive system image detection technology cannot effectively deal with the problem of imbalance in brightness distribution caused by low-angle light, resulting in cracks being covered in highlight areas or misjudged in low-light areas, reducing the accuracy of crack recognition.
By detecting the incident angle of the light source in real time, we can judge whether the contact surface has specular reflection, and then divide the image into multiple areas evenly, analyze the lighting characteristic information of each area, evaluate the degree of uneven brightness distribution, and perform targeted processing measures for the high-brightness, normal and low-brightness areas according to different degrees.
It effectively solves the problem of unbalanced brightness distribution caused by low-angle light, improves the accuracy and stability of crack detection, reduces false and missed inspections, reduces maintenance costs, and improves the detection reliability of the automated patrol system.
Smart Images

Figure CN119863455A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of circuit breaker conductive systems, and in particular to an image detection method for circuit breaker conductive systems. Background Art
[0002] The circuit breaker conductive system is an important part of the circuit breaker for current transmission, including moving contacts, static contacts, conductive bridges, etc., to ensure stable current transmission and rapid disconnection under abnormal conditions. However, long-term operation may cause problems such as contact erosion, oxidation, and wear, affecting the safety and stability of the power system. Traditional detection methods mainly rely on manual inspection or electrical testing, which have problems such as low efficiency and insufficient accuracy, and are difficult to meet the needs of smart grids. Based on image detection, non-contact, high-precision automatic detection can be achieved through high-resolution imaging and computer vision technology. Using deep learning and pattern recognition, contact wear, welding defects, etc. can be accurately identified, improving detection efficiency and accuracy, reducing human misjudgment, and providing support for intelligent maintenance of power equipment.
[0003] Existing image detection technology for the conductive system of circuit breakers usually uses high-resolution industrial cameras or infrared thermal imaging equipment to collect images of the conductive system. First, high-definition images of key components such as contacts and conductive bridges inside the circuit breaker are obtained through multi-angle and high-precision shooting. Some systems also combine laser scanning or spectral analysis to enhance the recognizability of surface defects. Next, the image data is preprocessed, including denoising, contrast enhancement, edge detection, etc., to optimize detail features and improve recognition accuracy. Subsequently, computer vision technology and deep learning algorithms are used to analyze the image, and models such as convolutional neural networks (CNNs) are used to automatically extract features such as the degree of wear of contacts, oxidation areas, crack distribution, etc., and compare them with normal working condition images to identify abnormal conditions. Some advanced systems also have time series analysis functions, which can combine historical detection data to predict the degradation trend of the conductive system and achieve preventive maintenance. In addition, the detection results are usually presented in a visual form, such as defect annotation, 3D modeling, etc., to help maintenance personnel quickly locate faults and improve maintenance efficiency and equipment reliability.
[0004] The prior art has the following deficiencies: During the contact inspection process of the circuit breaker conductive system, when the industrial camera shoots the contact surface (such as silver-plated or polished copper alloy contacts) under a fixed light source, if the incident angle of the light source is low (such as less than 20°), the contact surface will produce specular reflection due to its high reflective characteristics, making the brightness of some areas much higher than the surrounding areas, while the areas not affected by the reflection are relatively dark, resulting in an imbalance in the overall brightness distribution of the image. This imbalance in brightness distribution is due to the pixel value of the highlight area approaching saturation, which submerges the crack details on the contact surface, while the crack edges of the low-brightness area become blurred due to insufficient brightness, and the contrast with the background is reduced, making the crack difficult to identify. The existing image detection technology for the conductive system of circuit breakers cannot perform different processing measures on the high-brightness area and the low-brightness area in the image based on the uneven brightness distribution caused by low-angle illumination in the collected image. Instead, it adopts a unified brightness enhancement or global contrast adjustment method. This method cannot effectively distinguish between the abnormal brightness area caused by light reflection and the real crack area, resulting in the crack being masked in the high-brightness area or being misjudged as other defects in the low-brightness area, reducing the accuracy of crack identification, which may lead to the failure to detect the extension of the contact crack in time, causing contact damage or even circuit breaker failure. At the same time, the increase in misjudgments may cause the maintenance team to make unnecessary repairs or replacements on normal contacts, increase maintenance costs, and reduce the detection reliability of the automated inspection system in the environment of highly reflective metal contacts, thereby affecting the actual application value of the intelligent detection system.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The object of the present invention is to provide an image detection method for a circuit breaker conductive system to solve the problems in the above-mentioned background technology.
[0007] In order to achieve the above object, the present invention provides the following technical solution: a circuit breaker conductive system image detection method, specifically comprising the following steps: Use an industrial camera to photograph the contact surface of the circuit breaker's conductive system under a fixed light source, detect the incident angle of the light source in real time, and determine whether mirror reflection occurs on the contact surface when the incident angle of the light source is lower than the set threshold. When the judgment result is that the contact surface generates a mirror reflection phenomenon, an image of the contact surface acquired by the industrial camera is extracted, and the image is evenly divided into a plurality of areas; Obtain and analyze the illumination feature information of each area in the image, evaluate the uneven brightness distribution of the contact surface image captured by the industrial camera due to low-angle illumination based on the analysis results, and divide each area in the image into highlight area, normal area and low-brightness area; Under different brightness distribution unevenness, corresponding processing measures are performed on the highlight area, normal area and low brightness area in the image respectively; Based on the processed image, cracks in the image are detected and the detection results are classified to determine the crack conditions on the contact surface, and the brightness processing and crack identification strategies are continuously optimized based on the detection results.
[0008] Preferably, the illumination feature information of each area in the image is obtained and analyzed, and the degree of uneven brightness distribution caused by low-angle illumination of the image of the contact surface captured by the industrial camera is evaluated based on the analysis result, and each area in the image is divided into a highlight area, a normal area and a low-brightness area, which specifically includes the following steps: Acquire the illumination feature information of each area in the image of the contact surface collected by the industrial camera, and perform preprocessing after acquisition; Extracting gradient entropy brightness information and contrast statistics from the preprocessed illumination feature information of each region, and analyzing them to generate brightness gradient balance index and contrast variation coefficient of each region respectively; A brightness distribution evaluation model is constructed based on the brightness gradient balance index and contrast variation coefficient of each region. The brightness distribution coefficient of each region is generated by weighted summation, and a comprehensive analysis is performed to generate the brightness distribution standard deviation. Determine a preset brightness distribution standard deviation threshold interval, and compare it with the generated brightness distribution standard deviation after determination, evaluate the brightness distribution unevenness of the contact surface image captured by the industrial camera due to low-angle illumination according to the comparison result, and divide it into low unevenness, medium unevenness and high unevenness; A preset brightness distribution coefficient threshold interval is determined, and after determination, it is compared with the generated brightness distribution coefficients of each area, and each area in the image is divided into a highlight area, a normal area and a low brightness area according to the comparison result.
[0009] Preferably, the logic for obtaining the brightness gradient balance index of each region is as follows: Gradient entropy brightness information is extracted from the preprocessed illumination feature information of each area, including the brightness gradient value, brightness entropy value and average brightness value of each pixel point in each area of the contact surface image collected by the industrial camera, and calibrated as , and , The image of the contact surface captured by the industrial camera Region The brightness gradient value of each pixel, The image of the contact surface captured by the industrial camera Region The brightness entropy value of each pixel is The image of the contact surface captured by the industrial camera The average brightness value of the area, , , and are all positive integers; Calculate the brightness gradient balance index of each area. The specific calculation formula is as follows: In the formula, For the Brightness gradient balance index of a region.
[0010] Preferably, the logic for obtaining the contrast variation coefficient of each region is as follows: Contrast statistics are extracted from the preprocessed illumination feature information of each region, including the local contrast value, neighborhood contrast mean square error, and local contrast mean of each region in the image of the contact surface captured by the industrial camera, and are calibrated as , and , The image of the contact surface captured by the industrial camera The local contrast value of the region, The image of the contact surface captured by the industrial camera The mean square error of the neighborhood contrast of the region, The image of the contact surface captured by the industrial camera The local contrast mean of the region, , is a positive integer; Calculate the contrast coefficient of variation of each area. The specific calculation formula is as follows: In the formula, For the The contrast coefficient of variation of the region.
[0011] Preferably, the brightness gradient balance index of each region is generated and the contrast coefficient of variation A brightness distribution evaluation model is constructed to generate the brightness distribution coefficient of each area through weighted summation. The specific calculation formula is as follows: In the formula, For the The brightness distribution coefficient of the area, and They are the brightness gradient balance index of each area and contrast coefficient of variation The non-zero weight coefficient of ; Brightness distribution coefficient for each area Perform comprehensive analysis to generate brightness distribution standard deviation , according to the formula: .
[0012] Preferably, a preset brightness distribution standard deviation threshold interval is determined , and after determination, the standard deviation of the generated brightness distribution The comparison is performed, and the uneven brightness distribution of the contact surface images captured by the industrial camera due to low-angle illumination is evaluated based on the comparison results, and the uneven brightness distribution is divided into low unevenness, medium unevenness and high unevenness. The specific comparison analysis is as follows: like ,The image of the contact surface captured by the industrial camera has a low uneven brightness distribution due to low angle illumination; like ,The image of the contact surface captured by the industrial camera has a medium uneven brightness distribution due to low-angle illumination; like ,The image of the contact surface captured by the industrial camera has a high uneven brightness distribution due to ,low-angle illumination.
[0013] Preferably, a preset brightness distribution coefficient threshold interval is determined , and after determination, the brightness distribution coefficient of each area generated Compare and divide each area in the image into highlight area, normal area and low-brightness area according to the comparison results. The specific comparison analysis and division are as follows: like , divide the area in the image into a low-brightness area; like , divide the area in the image into a normal area; like , and divide the area in the image into a highlight area.
[0014] Preferably, in the case of different degrees of uneven brightness distribution, corresponding processing measures are respectively performed on the highlight area, normal area and low brightness area in the image, specifically: When the unevenness of brightness distribution is low, the processing measures performed on the highlight area in the image are: brightness suppression processing is performed on the area to reduce the overexposure effect by contrast adjustment; the processing measures performed on the normal area in the image are: original brightness is maintained without additional processing to retain the crack details in the area; the processing measures performed on the low-brightness area in the image are: brightness enhancement processing is performed on the area to improve pixel contrast; When the unevenness of brightness distribution is medium, the processing measures performed on the highlight area in the image are as follows: dynamic brightness compensation is performed on the area, the overexposure effect is reduced through adaptive brightness adjustment, and the edge detection effect is optimized to ensure that the crack features are not blocked by overexposure; the processing measures performed on the normal area in the image are as follows: the current brightness level is maintained, and the contrast is dynamically adjusted according to the overall brightness distribution; the processing measures performed on the low-brightness area in the image are as follows: adaptive contrast enhancement is performed on the area, dark details are optimized through nonlinear brightness mapping, and the recognizability of the crack edge is improved; When the degree of uneven brightness distribution is highly uneven, the processing measures performed on the highlight area in the image are as follows: forced brightness balance processing is performed on the area, and the saturation of the highlight area is reduced through high dynamic range mapping; the processing measures performed on the normal area in the image are as follows: dynamic contrast adjustment is performed on the area, and the overall image quality is optimized through balanced brightness distribution; the processing measures performed on the low-brightness area in the image are as follows: enhanced brightness boost processing is performed on the area, combined with contrast stretching and edge-preserving filtering, to ensure clear identification of crack features in dark areas.
[0015] In the above technical solution, the technical effects and advantages provided by the present invention are: 1. The present invention can effectively solve the problem of unbalanced brightness distribution caused by low-angle illumination, and ensure the accuracy and stability of crack detection. Compared with the prior art, the present invention first detects the incident angle of the light source in real time, and judges whether there is specular reflection on the contact surface in combination with image features, thereby avoiding the problem of misjudgment caused by changes in illumination angle from the root. Secondly, the present invention introduces gradient entropy brightness information and contrast statistical information, and calculates the brightness gradient balance index and contrast variation coefficient based on mathematical modeling, and accurately evaluates the degree of uneven brightness distribution in the image caused by low-angle illumination through these quantitative parameters. This method based on multi-parameter comprehensive evaluation is more accurate than the traditional fixed threshold or global equalization processing method, and can effectively distinguish the abnormal area caused by illumination reflection from the real crack area, thereby improving the reliability of crack detection. In addition, the present invention establishes a brightness distribution evaluation model in the image analysis process, and classifies each area in the image by calculating the brightness distribution standard deviation and the brightness distribution coefficient, and combining the set threshold range, so that the highlight area, normal area and low-brightness area can be targeted for brightness optimization, rather than the traditional unified enhancement or global adjustment method, avoiding the problem of over-compensation or under-compensation.
[0016] 2. The present invention can dynamically adjust the brightness processing mode of the highlight area, normal area and low-brightness area in the image according to the degree of uneven brightness distribution. When the degree of uneven brightness distribution is low, only the low-brightness area is locally enhanced to ensure the clarity of the crack features in the dark area without excessively changing the brightness distribution of the normal area. When the degree of uneven brightness distribution is medium, dynamic brightness compensation is used to reduce the overexposure effect of the highlight area, and the visibility of the crack in the low-brightness area is optimized in combination with nonlinear brightness mapping. When the degree of uneven brightness distribution is high, high dynamic range mapping is used to force brightness balance in the highlight area, and enhanced brightness enhancement processing is performed on the low-brightness area, combined with contrast stretching and edge-preserving filtering to ensure that the crack features can still be accurately presented in strong light or dark areas. Different from the method of using a fixed threshold for brightness compensation in the prior art, the present invention can perform adaptive adjustments for different brightness distribution conditions to ensure that the crack features can maintain stable visibility in both the highlight area and the shadow area of the highly reflective metal contact, thereby reducing false detection and missed detection, and improving the accuracy and adaptability of crack detection.
[0017] 3. The present invention also provides a closed-loop optimization mechanism for crack detection, which can continuously optimize the brightness processing strategy and crack identification method based on the crack detection results. Specifically, the present invention realizes accurate identification of cracks through a crack detection algorithm based on deep learning, combined with edge detection and feature matching methods, and classifies the severity of cracks in combination with a classification algorithm, thereby improving the intelligent level of detection. At the same time, in order to further improve the stability of the detection system, the present invention dynamically adjusts the brightness processing parameters according to the accuracy, false detection rate and missed detection rate of crack identification through an adaptive brightness optimization mechanism to ensure that high-precision crack detection capabilities can be maintained under different environments. In addition, the present invention also introduces an active learning mechanism to automatically update false detection and missed detection data samples during the detection process, and optimizes the crack identification model through training, so that the system has the ability to continuously learn and optimize. Compared with the traditional static brightness processing method, the present invention enables the detection system to adapt to environmental changes by continuously adjusting the brightness compensation and crack detection strategy, improves the long-term stability and intelligence level of the detection system, and ensures that the crack detection of the contacts of the circuit breaker conductive system can maintain high accuracy and high reliability under various lighting conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0019] Figure 1The figure is a flow chart of the circuit breaker conductive system image detection method of the present invention. DETAILED DESCRIPTION
[0020] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art.
[0021] The present invention provides Figure 1 The circuit breaker conductive system image detection method shown in the figure specifically comprises the following steps: Use an industrial camera to photograph the contact surface of the circuit breaker's conductive system under a fixed light source, detect the incident angle of the light source in real time, and determine whether mirror reflection occurs on the contact surface when the incident angle of the light source is lower than the set threshold. By collecting image data taken by industrial cameras in real time, combined with illumination angle calculation, pixel brightness distribution analysis and contrast detection, it is possible to determine whether the light source is in a low-incident-angle state and whether the contact surface produces specular reflection. First, the theoretical incident angle of the light source is calculated based on the shooting parameters of the industrial camera (such as light source position, camera angle, etc.), and compared with the set low-incident-angle threshold to determine whether the light source is in a low-angle state. Secondly, the collected image is analyzed at the pixel level to calculate the local brightness gradient change rate, pixel saturation and illumination contrast of the image. If the pixel brightness in a certain area changes dramatically and the brightness value is close to saturation, and the brightness ratio of the highlight area to the low-brightness area exceeds the set threshold, it can be determined that there is specular reflection in the area. In addition, the multi-frame image illumination change comparison method can be used to capture multiple fine-tuned angle images to verify whether the brightness of a specific area changes with the shooting angle, thereby further confirming the existence of specular reflection.
[0022] The purpose of this is to ensure that subsequent image brightness optimization and crack detection are more accurate and avoid misjudgment or missed detection due to abnormal lighting. Since mirror reflection will cause overexposure in some areas of the image, causing crack features to disappear, and low-brightness areas will have reduced contrast, making cracks difficult to distinguish. Therefore, if the brightness adjustment and crack detection stages are entered directly without detecting abnormal lighting, it may cause high-brightness areas to be misjudged as normal surfaces, or shadows in low-brightness areas to be mistaken for cracks. Traditional global brightness enhancement methods cannot distinguish between mirror reflection areas, which can easily lead to excessive brightness adjustment in normal areas, further affecting crack detection accuracy. By detecting the lighting angle in advance and determining whether there is mirror reflection in image preprocessing, differentiated brightness optimization strategies can be adopted for different areas to ensure that crack features are not masked by brightness adjustment, thereby improving the accuracy and stability of crack recognition and enhancing the system's ability to adapt to different lighting environments.
[0023] When the judgment result is that the contact surface generates a mirror reflection phenomenon, an image of the contact surface acquired by the industrial camera is extracted, and the image is evenly divided into a plurality of areas; After determining that the contact surface has a mirror reflection phenomenon, the required image data can be extracted through the real-time image caching mechanism or image stream processing method of the industrial camera to ensure that subsequent processing can be analyzed based on high-quality original images. The specific implementation methods include: 1) Real-time image buffering, that is, during the acquisition process of the industrial camera, the image frames within a certain time window are continuously stored, and when the mirror reflection phenomenon is detected, the latest complete image frame is extracted from the buffer; 2) Triggered image acquisition, that is, after the mirror reflection is confirmed, the industrial camera is triggered to perform a high-precision static shooting, and the frame image is extracted synchronously for processing; 3) Image quality screening, when extracting images, the images with the best clarity and the most obvious reflection characteristics can be automatically screened through brightness histogram analysis, contrast calculation, etc., to ensure the accuracy of subsequent area division and brightness compensation.
[0024] After extracting the image of the contact surface, the image can be divided into multiple uniform regions through three methods: grid division, segmentation algorithm, and adaptive region adjustment, so as to facilitate subsequent brightness analysis and compensation processing. 1) Fixed grid division: The image is evenly divided according to an N×M grid (for example, 10×10, 20×20), and each sub-region is of the same size, which is suitable for the case of uniform illumination distribution; 2) Region division based on edge detection: The contact boundary and key area are detected by Sobel or Canny operator, and the region of interest (ROI) is adaptively divided to focus on analyzing the possible location of cracks; 3) Brightness adaptive division: The brightness distribution of the entire image is calculated, and the image is divided into regions with similar brightness characteristics according to the brightness gradient change to ensure that the brightness analysis of each region is more accurate. In addition, in the process of region division, the boundaries can be further smoothed by local mean filtering to make the brightness transition of adjacent regions more natural, thereby improving the effect of subsequent brightness compensation.
[0025] The purpose of image extraction is to ensure that all subsequent processing steps are based on high-quality, most representative images, rather than directly processing all real-time image streams, thereby improving computational efficiency and reducing misjudgments. If random frames or low-quality images are used instead of specialized image extraction, the accuracy of regional division and brightness analysis may be reduced, affecting the accuracy of crack identification. The purpose of regional division is to make brightness compensation more accurate and avoid uniform adjustment of the entire image, which may result in over-correction of some areas and under-correction of some areas. Traditional global adjustment methods (such as global histogram equalization) are prone to causing excessive changes in the overall contrast of the image, resulting in loss of details in the highlight area, or excessive enhancement of crack features in the low-brightness area, resulting in pseudo-cracks. Through regional division processing, targeted optimization of different brightness feature areas can be ensured, making brightness compensation more intelligent, improving the accuracy and reliability of crack detection, and improving the inspection stability of the circuit breaker conductive system.
[0026] Obtain and analyze the illumination feature information of each area in the image, evaluate the uneven brightness distribution of the contact surface image captured by the industrial camera due to low-angle illumination based on the analysis results, and divide each area in the image into highlight area, normal area and low-brightness area; In this embodiment, the illumination feature information of each area in the image is obtained and analyzed, and the degree of uneven brightness distribution caused by low-angle illumination of the image of the contact surface captured by the industrial camera is evaluated based on the analysis results, and each area in the image is divided into a highlight area, a normal area, and a low-brightness area, which specifically includes the following steps: Acquire the illumination feature information of each area in the image of the contact surface collected by the industrial camera, and perform preprocessing after acquisition; The illumination feature information of each area in the contact surface image collected by the industrial camera can be obtained through three methods: real-time image acquisition, region segmentation, and illumination feature extraction. First, the real-time frame buffer of the industrial camera is used to extract high-resolution images from the image stream, and the area where the contact surface is located is determined by image coordinate mapping. Secondly, the adaptive region segmentation method is used to divide the image into multiple uniform areas or divide the ROI (region of interest) based on image edge detection to ensure that the illumination features of different areas can be calculated independently. Then, the gradient entropy brightness information and contrast statistics are extracted in each area, and the brightness gradient, pixel brightness histogram distribution, contrast features, and local brightness mean of the area are calculated respectively. Finally, the illumination feature information of each area is stored in the data matrix for subsequent calculation of the degree of uneven brightness distribution to ensure that the illumination features can be quantitatively analyzed.
[0027] The purpose of preprocessing is to enhance image quality, reduce noise interference, and improve the accuracy of illumination feature information, so as to ensure that stable data can be obtained when calculating the uneven distribution of brightness in the subsequent step. First, noise removal is required, and an adaptive filtering algorithm (such as bilateral filtering or non-local mean filtering) is used to remove sensor noise while retaining edge information. Secondly, brightness normalization is performed, and the brightness of each region is adjusted by histogram stretching or gamma correction, so that the illumination features of different regions can be compared at the same scale. In addition, contrast enhancement is required, and the visibility of low-brightness regions is improved by local contrast stretching or multi-scale adaptive enhancement, so that the illumination features of all regions can fully reflect their actual conditions. Finally, edge-preserving smoothing (such as guided filtering) is used to reduce artifacts caused by over-enhancement, so as to ensure that the illumination feature information can accurately reflect the brightness and contrast distribution characteristics of each region, and provide high-quality input data for subsequent analysis.
[0028] Extracting gradient entropy brightness information and contrast statistics from the preprocessed illumination feature information of each region, and analyzing them to generate brightness gradient balance index and contrast variation coefficient of each region respectively; Gradient entropy brightness information and contrast statistics can be extracted by regional feature decomposition, statistical analysis and spatial transformation, and automatic calculation can be realized on the software. First, in each preprocessed area, the brightness distribution of the pixel points is statistically analyzed, and the local brightness gradient value of each pixel point is calculated. The Sobel operator or Laplace transform can be used to calculate the spatial gradient of the image to extract the directional information of the brightness change between pixels. At the same time, based on the probability distribution of the pixel brightness histogram, the local brightness entropy value of the area is calculated, and the Shannon entropy calculation formula is used to evaluate the complexity of the brightness information in the area to form the gradient entropy brightness information. For contrast statistics, the local contrast value can be extracted in each area, the maximum brightness value and the minimum brightness value of the area are calculated, and the normalized contrast metric is constructed according to their ratio. In addition, the mean square error of the contrast of the area is calculated, and the contrast stability within the area is measured by statistically analyzing the changing trend of the contrast between pixels. Finally, the extracted gradient entropy brightness information and contrast statistics are stored in a matrix structure for brightness distribution evaluation and regional classification in subsequent steps.
[0029] A brightness distribution evaluation model is constructed based on the brightness gradient balance index and contrast variation coefficient of each region. The brightness distribution coefficient of each region is generated by weighted summation, and a comprehensive analysis is performed to generate the brightness distribution standard deviation. Determine a preset brightness distribution standard deviation threshold interval, and compare it with the generated brightness distribution standard deviation after determination, evaluate the brightness distribution unevenness of the contact surface image captured by the industrial camera due to low-angle illumination according to the comparison result, and divide it into low unevenness, medium unevenness and high unevenness; The preset threshold interval of the standard deviation of brightness distribution can be determined by means of historical data statistical analysis, machine learning modeling and adaptive threshold optimization, and can be automatically calculated on the software. First, based on a large number of collected industrial camera contact surface images, the brightness distribution coefficient of each area is extracted, and the standard deviation of the brightness distribution is calculated. The mean and variance of the standard deviation of brightness distribution are obtained by statistical analysis to construct the basic threshold range. Secondly, cluster analysis methods (such as K-means clustering or Gaussian mixture model GMM) are used to divide the historical data of the standard deviation of brightness distribution into different categories, and the threshold intervals corresponding to low unevenness, medium unevenness and high unevenness are determined. In addition, combined with supervised learning methods, the labeled brightness balance samples are used to automatically predict and optimize the reasonable threshold interval by training regression models (such as support vector regression SVR or random forest regression) to improve adaptability. Finally, through the adaptive threshold optimization algorithm, the preset brightness distribution standard deviation threshold is dynamically adjusted based on the latest collected contact surface image data to ensure that the degree of brightness distribution unevenness can be accurately identified under different lighting conditions and working conditions, and provide a stable reference standard for subsequent image area classification.
[0030] A preset brightness distribution coefficient threshold interval is determined, and after determination, it is compared with the generated brightness distribution coefficients of each area, and each area in the image is divided into a highlight area, a normal area and a low brightness area according to the comparison result.
[0031] The preset threshold interval of brightness distribution coefficient can be determined by statistical analysis, machine learning modeling and dynamic adaptive adjustment, and can be automatically calculated on the software. First, based on a large amount of collected industrial camera contact surface image data, the brightness distribution coefficient of each area is extracted, and statistical analysis is performed on it to calculate the mean, standard deviation and distribution range of the brightness distribution coefficient, so as to construct a preliminary threshold interval. Secondly, a clustering algorithm (such as K-means clustering or density clustering DBSCAN) is used to divide the sample data into multiple brightness feature categories to determine the brightness distribution coefficient range corresponding to the highlight area, normal area and low brightness area. In order to enhance the adaptability of threshold setting, the supervised learning method can be combined to train the classification model (such as decision tree, random forest or neural network) using the labeled image samples to predict the reasonable threshold interval of brightness distribution coefficient based on different lighting environments and contact surface conditions. In addition, a dynamic adaptive optimization strategy is adopted to adjust the threshold interval in real time based on the currently detected brightness distribution data, so that it can adapt to different detection environments, ensure that the division of highlight area, normal area and low brightness area is more accurate, and finally improve the reliability of brightness compensation and crack detection.
[0032] In this embodiment, the logic for obtaining the brightness gradient balance index of each area is as follows: Gradient entropy brightness information is extracted from the preprocessed illumination feature information of each area, including the brightness gradient value, brightness entropy value and average brightness value of each pixel point in each area of the contact surface image collected by the industrial camera, and calibrated as , and , The image of the contact surface captured by the industrial camera Region The brightness gradient value of each pixel, The image of the contact surface captured by the industrial camera Region The brightness entropy value of each pixel is The image of the contact surface captured by the industrial camera The average brightness value of the area, , , and are all positive integers; The brightness gradient value, brightness entropy value and average brightness value of each pixel point in each area of the contact surface image collected by the industrial camera can be obtained by gradient calculation, information entropy analysis and local mean calculation, and the calculation can be automatically performed in the software system. First, for the brightness gradient value, the brightness gradient of each pixel point can be calculated by edge detection operators (such as Sobel operator, Prewitt operator or Laplace transform). This process calculates the brightness change degree of the pixel point in the horizontal direction, vertical direction or second-order derivative direction to quantify the brightness gradient amplitude and direction of the pixel, and obtains the brightness gradient value of each pixel point. Secondly, for the brightness entropy value, the Shannon entropy calculation method can be used. This method is based on the local brightness distribution of the pixel point, the probability distribution of the pixel gray value in its neighborhood window, and the information entropy is calculated to measure the brightness complexity of the pixel point in its area. The larger the entropy value, the more complex the brightness information of the pixel, and the lower the entropy value, the simpler the brightness change, which is usually used to distinguish uniform areas from high-detail areas. Finally, for the average brightness value of each area, the local mean calculation can be used to calculate the average brightness value of all pixels in each area of the image, that is, the grayscale values of all pixels in the area are summed and averaged to measure the overall brightness level of the area and avoid the impact of abnormal brightness of a single pixel on the entire area. These data are calculated in real time by the software system and stored in a matrix data structure to support subsequent brightness distribution evaluation, brightness compensation and crack detection algorithms, thereby ensuring that the brightness balance of the image can be accurately analyzed under low-angle lighting conditions.
[0033] Calculate the brightness gradient balance index of each area. The specific calculation formula is as follows: In the formula, For the Brightness gradient balance index of a region.
[0034] The brightness gradient balance index The calculation formula is based on a comprehensive analysis of the pixel brightness gradient change, brightness entropy distribution, and regional average brightness to quantify the brightness balance of the image under low-angle lighting conditions, thereby accurately evaluating the impact of uneven lighting on image quality. In the formula, It is used to measure the brightness gradient change of each pixel in the area. Compared with traditional linear or quadratic operations, the 1.5 power can more sensitively amplify moderate gradient changes without excessively affecting extreme values, thus improving adaptability to complex lighting environments. The influence of brightness entropy is introduced. It reflects the complexity of the brightness information of the pixel in the area. When the brightness information is rich, the exponential weight of this item increases, making its contribution greater, thus highlighting the area with more complex brightness distribution. Used to normalize the entire calculation process, where The excessive influence of high brightness gradient values is suppressed by logarithmic operation, making the calculation more stable. The relationship between gradient change and brightness entropy is further balanced, so that the brightness balance index can maintain a reasonable value range under different lighting environments. Finally, the formula averages the contribution of all pixels in the area to ensure that the calculation result can represent the brightness balance of the entire area, making it suitable for uneven illumination detection of highly reflective metal contacts and improving the reliability of brightness compensation and subsequent crack detection.
[0035] No. Brightness gradient balance index of the region The size of directly reflects the degree of pixel brightness balance in the area, and can be used to evaluate the uneven brightness distribution of the contact surface image captured by the industrial camera under low-angle lighting conditions. When the value is small, it means that the pixel brightness gradient in the area changes little, and the brightness value of each pixel is close to the average brightness value of the area, indicating that the brightness distribution in the area is relatively uniform, and there is no obvious high or low brightness phenomenon, indicating that the illumination distribution is relatively stable and is not affected by specular reflection or shadow. When the value increases, it means that the brightness gradient of the pixels in the area changes greatly, that is, the brightness of some pixels is significantly higher or lower than the average brightness value of the area, and the brightness entropy value of the area may also be high, indicating that the brightness information is more complex, suggesting that the illumination distribution is uneven, which may be due to the presence of specular reflections, high light spots or shadow areas caused by low-angle illumination. If If the value is too large, it means that there is a serious brightness imbalance in the area. The highlight area may lose details due to overexposure, while the pixel contrast of the low-brightness area decreases, making crack detection difficult. Therefore, by analyzing all areas The distribution of values can comprehensively evaluate the brightness balance of the entire image, and further determine the degree of uneven brightness distribution of the contact surface image captured by the industrial camera due to low-angle lighting, providing data support for subsequent brightness compensation and crack detection.
[0036] In this embodiment, the logic for obtaining the contrast variation coefficient of each area is as follows: Contrast statistics are extracted from the preprocessed illumination feature information of each region, including the local contrast value, neighborhood contrast mean square error, and local contrast mean of each region in the image of the contact surface captured by the industrial camera, and are calibrated as , and , The image of the contact surface captured by the industrial camera The local contrast value of the region, The image of the contact surface captured by the industrial camera The mean square error of the neighborhood contrast of the region, The image of the contact surface captured by the industrial camera The local contrast mean of the region, , is a positive integer; The local contrast value, neighborhood contrast mean square error and local contrast mean of each area in the contact surface image collected by the industrial camera can be obtained by pixel grayscale calculation, neighborhood statistical analysis and contrast feature extraction, and the calculation can be realized automatically by the software system. First, the local contrast value can be obtained by calculating the difference between the maximum brightness and the minimum brightness of the pixels in the area, or by calculating the brightness contrast between each pixel and its neighborhood in the area to measure the relative brightness difference between pixels. This data can reflect the local brightness contrast of the area. The local contrast of the highlight area or shadow area is usually large, while the contrast of the area with uniform illumination is low. Secondly, the neighborhood contrast mean square error is used to measure the fluctuation of the pixel contrast in the area. This value can be obtained by calculating the variance of the contrast of all pixels in the area. This data can describe the contrast stability of the area. When the contrast mean square error in the area is small, it means that the brightness change in the area is relatively smooth and the influence of illumination is small; when the value is large, it means that there is a drastic brightness change in the area, such as the highlight area affected by mirror reflection or the low brightness area affected by shadow, which makes the pixel brightness distribution unstable. Finally, the local contrast mean is used to calculate the average brightness contrast level of the entire region. This value can provide a global overview of the brightness changes in the region by averaging the contrast of all pixels in the region. If the value is high, it indicates that the overall brightness contrast of the region is obvious and may be greatly affected by the lighting. If the value is low, it indicates that the brightness contrast of the region is relatively stable, indicating that the lighting is relatively uniform. By acquiring these data and constructing a matrix structure, the software system can further analyze the distribution of image brightness contrast, and combine the calculation of the brightness gradient balance index to achieve an accurate assessment of the uneven lighting on the contact surface, providing reliable data support for subsequent brightness compensation and crack detection.
[0037] Calculate the contrast coefficient of variation of each area. The specific calculation formula is as follows: In the formula, For the The contrast coefficient of variation of the region.
[0038] The contrast coefficient of variation The calculation formula is based on a comprehensive analysis of the local contrast of each region, the mean square error of the neighborhood contrast, and the local contrast mean, to quantify the changes in brightness contrast in different regions and evaluate the stability of image quality under the influence of lighting. Combined with local contrast and contrast mean square error The impact of represents the basic measure of pixel contrast in the current region, and The logarithmic transformation is used to adjust the influence of the mean square error of the neighborhood contrast so that areas with small contrast changes will not be over-magnified during calculation, while areas with large contrast changes are given higher numerical weights to enhance the recognition of high-contrast areas. Mainly used for normalization processing, where As the local contrast mean of the area, it helps to measure the overall contrast level of the area. The stability of local contrast is further considered, that is, when the contrast changes greatly in the neighborhood, the contrast evaluation value of the area will be adjusted appropriately to ensure that the calculation result can reflect the actual contrast distribution. The addition of 1 to the denominator is mainly to prevent the denominator from approaching zero in extreme cases, affecting the stability of the calculation. Finally, the calculation formula integrates local contrast information, contrast change characteristics and overall brightness contrast level to obtain a more robust contrast evaluation result, ensuring that the contrast fluctuation of each area can be accurately evaluated under different lighting conditions, and providing accurate data support for brightness compensation and subsequent crack detection.
[0039] No. Contrast coefficient of variation for each region The size of directly reflects the brightness contrast change of the area and can be used to evaluate the uneven brightness distribution of the contact surface image captured by the industrial camera due to low-angle illumination. When the value is small, it means that the local contrast and neighborhood contrast mean square error of the area change little, that is, the pixel brightness difference in the area is low, and the pixel gray value tends to be stable, indicating that the brightness distribution of the area is relatively uniform and is not significantly affected by the light. If the value is large, it means that the pixel brightness contrast in the area fluctuates violently, which may be due to specular reflection, high light spots or shadow effects caused by low-angle lighting, making the brightness of the area obviously unbalanced. In the bright area, specular reflection will increase the local contrast, and the mean square error of the neighborhood contrast will increase, making the The value increases significantly, indicating that the area is affected by overexposure. In low-brightness areas, the dark areas caused by insufficient light reduce the contrast and the brightness of the neighborhood changes dramatically, which also leads to Therefore, by analyzing the The distribution of values can comprehensively evaluate the uneven brightness distribution of the contact surface images captured by industrial cameras due to low-angle lighting, and combined with the calculation results of the brightness gradient balance index, accurately identify high-brightness, low-brightness and normal areas, providing more reliable data support for subsequent brightness compensation and crack detection.
[0040] In this embodiment, the brightness gradient balance index of each region is generated. and contrast coefficient of variation A brightness distribution evaluation model is constructed to generate the brightness distribution coefficient of each area through weighted summation. The specific calculation formula is as follows: In the formula, For the The brightness distribution coefficient of the area, and They are the brightness gradient balance index of each area and contrast coefficient of variation The non-zero weight coefficient of ; The brightness distribution evaluation model can be realized by calculating the brightness gradient balance index of each area. and contrast coefficient of variation , and use the weighted summation method to calculate the brightness distribution coefficient of each area Finally, the standard deviation of brightness distribution is calculated through statistical analysis to quantify the uneven brightness distribution of the entire image. In the specific implementation, the gradient entropy brightness information and contrast statistics are first extracted for each region, and then the brightness information and contrast statistics are calculated respectively. and , and then use the preset weight coefficient and calculate The two weight coefficients are set to establish a balance between the brightness gradient balance index and the contrast variation coefficient to ensure that the evaluation of brightness distribution is more in line with the actual situation. Reflects the importance of the brightness gradient balance index in the evaluation. If the value is large, it means that the brightness gradient change contributes more to the evaluation result, which is suitable for environments with greater influence of light reflection. Reflects the influence of the contrast coefficient of variation. If the value is large, it means that the contrast change has a more significant impact on the evaluation result, which is suitable for scenes with obvious shadows or overexposed areas. and Needs to be satisfied Therefore, it can be optimized through experimental data, using supervised learning or historical data statistics methods to adaptively adjust the weight coefficient to ensure that the calculated It can more accurately reflect the brightness distribution characteristics of different areas and provide stable basic data for subsequent brightness compensation and crack detection.
[0041] No. Brightness distribution coefficient of the area Indicates the brightness balance of the area. It combines the brightness gradient balance index and the contrast variation coefficient to reflect the brightness change and contrast stability of the area. When the value is small, it means that the brightness gradient of the area changes less and the contrast distribution is more uniform, which means that the brightness of the area is relatively stable and is less affected by low-angle lighting. When the value is large, it means that the brightness of the area changes dramatically. There may be a bright area caused by specular reflection, or a low-brightness area caused by shadow effect, which reflects that the brightness distribution of the area is highly uneven. By comparing the value with the preset brightness distribution coefficient threshold range, each area in the image can be divided into a high-brightness area, a normal area, and a low-brightness area. If the threshold of the highlight area is exceeded, it means that the brightness of the area is too high and may be affected by specular reflection; If the value is lower than the threshold of the low-brightness area, it means that the brightness of the area is low and it may be in the shadow area. If the brightness is between the high brightness area and the low brightness area, it means that the brightness balance of the area is good and it belongs to the normal area. In this way, the brightness of each area can be accurately classified, providing a basis for subsequent brightness compensation and improving the accuracy of crack detection.
[0042] Brightness distribution coefficient for each area Perform comprehensive analysis to generate brightness distribution standard deviation , according to the formula: .
[0043] Brightness distribution standard deviation Indicates the overall fluctuation range of the brightness balance of each area of the entire image. It is the brightness distribution coefficient of all areas. The value calculated after statistical analysis reflects the uneven distribution of brightness of the entire image. When the value is small, it means that the brightness of each area in the image changes little, and the brightness distribution coefficient of each area tends to be balanced, which means that the image as a whole is less affected by low-angle lighting and has a higher brightness uniformity. When the value is large, it indicates that the brightness distribution of different areas is quite different, and there may be serious uneven lighting. For example, some areas are too bright due to mirror reflection, while some areas are too dark due to shadows. In this case, the overall brightness distribution of the image is highly uneven, which may lead to false detection or missed detection of cracks. Therefore, by calculating By comparing the value with the preset brightness distribution standard deviation threshold range, the overall brightness distribution balance of the image can be evaluated and divided into low unevenness, medium unevenness and high unevenness, thereby providing an accurate adjustment basis for subsequent image correction, brightness compensation and crack detection.
[0044] In this embodiment, the preset brightness distribution standard deviation threshold interval is determined , and after determination, the standard deviation of the generated brightness distribution The comparison is performed, and the uneven brightness distribution of the contact surface images captured by the industrial camera due to low-angle illumination is evaluated based on the comparison results, and the uneven brightness distribution is divided into low unevenness, medium unevenness and high unevenness. The specific comparison analysis is as follows: like ,The image of the contact surface captured by the industrial camera has a low uneven brightness distribution due to low angle illumination; When the generated brightness distribution standard deviation is less than the minimum value of the preset brightness distribution standard deviation threshold interval, it means that the overall brightness distribution of the contact surface image collected by the industrial camera is relatively balanced, and the brightness variation between each area is small, indicating that the impact of low-angle lighting on the image is weak, and there is no obvious uneven lighting phenomenon. At this time, the contrast distribution of highlight areas, normal areas, and low-brightness areas in the image is relatively stable, indicating that phenomena such as mirror reflection, high light spots or shadows are not obvious, and the crack detection algorithm can more stably identify the details of the contact surface. However, if the brightness distribution is too uniform, it may cause the image to lack sufficient brightness contrast, affect the significance of the crack features, reduce the grayscale difference between the crack and the background, and thus reduce the sensitivity of detection.
[0045] like ,The image of the contact surface captured by the industrial camera has a medium uneven brightness distribution due to low-angle illumination; When the generated brightness distribution standard deviation is within the preset brightness distribution standard deviation threshold range, it means that the brightness distribution of the contact surface image captured by the industrial camera is somewhat uneven, but still within an acceptable range, and the brightness gradient and contrast changes between various areas in the image are relatively reasonable. In this case, some areas may have slight brightness imbalances, such as local illumination enhancement or slight shadows, but will not cause serious interference to crack detection, and crack features can still be effectively extracted. If the brightness distribution standard deviation is in a higher range, it may indicate that the phenomenon of uneven illumination is intensifying, and it is necessary to further optimize the lighting conditions or adjust the subsequent image enhancement algorithm to ensure the stability and accuracy of crack detection.
[0046] like ,The image of the contact surface captured by the industrial camera has a high uneven brightness distribution due to ,low-angle illumination.
[0047] When the generated brightness distribution standard deviation is greater than the maximum value of the preset brightness distribution standard deviation threshold range, it means that the brightness distribution of the contact surface image collected by the industrial camera is seriously unbalanced, the brightness gradient between each area changes dramatically, and the image may be seriously affected by low-angle lighting, resulting in large-area mirror reflections, highlight overexposure or deep shadows. In this case, the crack features may be completely obscured in the highlight area, or cannot be clearly extracted due to insufficient contrast in the low-brightness area, resulting in a significant increase in the false detection rate and missed detection rate of crack detection. In addition, this uneven brightness distribution phenomenon may make traditional brightness compensation methods invalid, affecting subsequent crack assessment and contact quality judgment. Therefore, when the brightness distribution standard deviation exceeds the set range, it is usually necessary to adopt a dynamic brightness compensation strategy or enhance local contrast processing to reduce the impact of uneven lighting on the detection results and improve the detection reliability of the system.
[0048] In this embodiment, the preset brightness distribution coefficient threshold interval is determined And after determining and generating the brightness distribution coefficient of each area Compare and divide each area in the image into highlight area, normal area and low-brightness area according to the comparison results. The specific comparison analysis and division are as follows: like , divide the area in the image into a low-brightness area; This situation means that the brightness of the area is low, which may be affected by shadow effects or insufficient lighting. Due to the weak lighting, the pixel contrast in this area may be low, resulting in blurred edges of crack features and unclear brightness differences with the background, making it difficult for the crack detection algorithm to accurately extract effective features. If there are too many low-brightness areas, the entire image may have an overall lack of brightness, which will affect image enhancement and subsequent brightness compensation effects, and may make crack features difficult to distinguish, increasing the risk of missed detection. Therefore, for low-brightness areas, local contrast enhancement and brightness compensation strategies are usually required to improve crack visibility and ensure detection accuracy.
[0049] like , divide the area in the image into a normal area; This situation means that the brightness of the area is well balanced and is not significantly affected by uneven lighting, and can provide stable brightness and contrast information. At this time, the pixel brightness gradient in the area is relatively smooth, the contrast distribution is reasonable, the crack features can be clearly displayed, and can be accurately identified by the detection algorithm. In this case, additional brightness compensation or contrast enhancement processing is usually not required, and the image quality is sufficient to support stable crack detection. If most areas in the image are judged as normal areas, it means that the overall brightness distribution of the image is good, the lighting conditions are suitable, and it is suitable for high-precision automatic detection systems.
[0050] like , and divide the area in the image into a highlight area.
[0051] This situation means that the brightness of the area is too high, and may be affected by factors such as mirror reflection and overexposure, causing the pixel brightness value to be close to saturation. In the highlight area, the crack features may be masked by the excessive brightness, making it difficult for the crack detection algorithm to correctly extract edge information, resulting in an increased probability of false detection or missed detection. In addition, if the proportion of highlight areas in the image is too large, it may destroy the overall brightness balance and affect the analysis effect of the entire image. Therefore, for highlight areas, it is usually necessary to adopt brightness suppression and adaptive contrast adjustment methods to reduce the impact of overexposed areas, improve the recognizability of crack features, and improve the robustness of the detection system.
[0052] Under different brightness distribution unevenness, corresponding processing measures are performed on the highlight area, normal area and low brightness area in the image respectively; In this embodiment, under the condition of different degrees of uneven brightness distribution, corresponding processing measures are respectively performed on the highlight area, normal area and low brightness area in the image, specifically: When the unevenness of brightness distribution is low, the processing measures performed on the highlight area in the image are as follows: brightness suppression processing is performed on the area, and the overexposure effect is reduced by contrast adjustment to enhance the visibility of crack features; the processing measures performed on the normal area in the image are as follows: the original brightness is maintained without additional processing to retain the crack details in the area; the processing measures performed on the low-brightness area in the image are as follows: brightness enhancement processing is performed on the area to enhance pixel contrast to highlight crack features and improve recognizability; When the unevenness of brightness distribution is low, corresponding processing measures are performed on the highlight area, normal area and low brightness area in the image respectively, which can be achieved through software methods such as local brightness mapping, contrast adjustment and brightness enhancement to ensure that the crack features can be accurately identified under different brightness conditions. First, for the highlight area, the local brightness suppression method can be used to reduce the overexposure effect through histogram truncation + gamma correction. In the specific implementation, the pixels in the highlight area are first counted to determine the pixels that exceed the set brightness threshold, and adaptive brightness compression is applied to return the brightness value to a reasonable range. At the same time, local contrast enhancement is applied to avoid reducing the brightness while losing details. In addition, the Retinex enhancement algorithm can be used to balance the brightness and contrast of the area to reduce the influence of mirror reflection and make the crack edge more obvious. The core purpose of this processing method is to retain the effective information of the crack characteristics while reducing the overexposure effect of the highlight area, so as to avoid the brightness saturation of the crack area due to excessive light, which affects subsequent detection.
[0053] For normal areas, since their brightness is balanced and the illumination distribution is reasonable, no additional enhancement processing is required to maintain the original brightness information, thereby avoiding unnecessary image processing from interfering with the crack features. In order to ensure the consistency of the overall image, local contrast balance detection can be performed, that is, to check whether the contrast of the area is consistent with the overall contrast distribution of the image. If there is a slight deviation, it can be fine-tuned through lightweight adaptive contrast adjustment to ensure that the area can maintain brightness stability and adapt to the overall brightness distribution environment. The core purpose of this processing method is to avoid over-processing normal areas to prevent artifacts or unnecessary errors during crack detection, and to ensure that the original crack information in normal areas can be stably transmitted to the detection stage.
[0054] For low-brightness areas, brightness enhancement processing needs to be performed to improve the pixel contrast in the area, so that the crack features are more clearly visible in the dark area. This can be achieved by local brightness stretching + nonlinear contrast enhancement, that is, firstly, the dynamic range of the low-brightness area is expanded, and the grayscale value of the low-brightness pixel is stretched to increase its brightness to a reasonable range; secondly, the dark contrast is further enhanced by local histogram equalization to highlight the crack edge and make the brightness difference between the crack and the background more obvious. In addition, multi-scale adaptive contrast enhancement can also be used to reduce the impact of uneven lighting in low-brightness areas, while retaining the original structural information of the crack to the greatest extent. The core purpose of this processing method is to improve the visibility of cracks in dark areas, avoid blurring or completely covering the crack edges due to low brightness, and ensure the stability and accuracy of crack detection under low-light conditions.
[0055] In summary, by suppressing the brightness of the highlight area, maintaining the brightness of the normal area, and enhancing the brightness of the low-brightness area, we can effectively deal with the low-uneven brightness distribution and ensure the stability of crack detection in different lighting environments. This strategy based on local brightness adjustment can optimize the brightness characteristics of different areas, avoid information loss caused by unified processing, and improve the accuracy and reliability of crack detection.
[0056] When the unevenness of brightness distribution is medium, the processing measures performed on the highlight area in the image are as follows: dynamic brightness compensation is performed on the area, the overexposure effect is reduced through adaptive brightness adjustment, and the edge detection effect is optimized to ensure that the crack features are not blocked by overexposure; the processing measures performed on the normal area in the image are as follows: the current brightness level is maintained, and the contrast is dynamically adjusted according to the overall brightness distribution to maintain the stability of crack detection; the processing measures performed on the low-brightness area in the image are as follows: adaptive contrast enhancement is performed on the area, dark details are optimized through nonlinear brightness mapping, and the recognizability of the crack edge is improved; When the uneven brightness distribution is of medium unevenness, corresponding processing measures are respectively performed on the highlight area, normal area and low brightness area in the image, which can be achieved through software methods such as dynamic brightness compensation, adaptive contrast adjustment and nonlinear brightness mapping to reduce the interference of uneven illumination on crack detection and improve the detection accuracy. First, for the highlight area, the local dynamic brightness compensation method can be used to reduce the overexposure effect through regional adaptive brightness adjustment, while enhancing the crack characteristics. In the specific implementation, the brightness histogram of the area is first analyzed to determine the distribution of highlight pixels, and then the local contrast limited histogram equalization is used to adjust the brightness value of the highlight pixels so that they are evenly distributed within the appropriate dynamic range. In addition, the edge-preserving brightness adjustment algorithm can be combined to ensure that the crack edge is not blurred during the brightness compensation process, and the gradient enhancement algorithm is used to optimize the crack edge so that it can still be clearly visible while reducing the brightness. The core purpose of this processing method is to reduce the overexposure effect of light in the highlight area, ensure that the crack characteristics will not be blocked or lost due to excessive brightness, and optimize edge detection to make the crack outline clear and discernible.
[0057] For normal areas, since their brightness distribution is basically balanced, it is necessary to maintain the current brightness level as much as possible to ensure the overall consistency of the image. However, in order to optimize the stability of crack detection, adaptive contrast dynamic adjustment can be used, that is, by calculating the global brightness histogram of the image, the deviation between the brightness of the current area and the brightness distribution of the entire image is analyzed. If the contrast of the area is detected to be slightly lower than the overall level of the image, a local contrast enhancement algorithm is used for fine-tuning to maintain the clarity of the crack features. For normal areas, avoiding excessive adjustment is the key, so multi-scale contrast optimization can be used. Through the balance calculation of brightness and contrast at different scales, the area can maintain stable crack recognition capabilities under different lighting environments. The core purpose of this processing method is to ensure that the crack features in the normal area will not be affected by the global adjustment, and the original brightness is maintained to the greatest extent. At the same time, slight optimization is performed according to the overall brightness trend to improve the stability of crack detection.
[0058] For low-brightness areas, adaptive contrast enhancement needs to be performed to optimize the details of the dark areas so that the crack features can still be accurately identified in low-light environments. In specific implementation, nonlinear brightness mapping can be used, that is, gamma correction is used to increase the pixel brightness in low-brightness areas, and regional contrast stretching is combined to enhance the detail information in low-brightness areas. In addition, a multi-scale algorithm can also be used, which can enhance the contrast in a local range while suppressing noise to ensure that the crack edge remains clear in low-brightness areas. The core purpose of this processing method is to improve the brightness balance of dark areas so that cracks can still be clearly seen in low-light environments, while avoiding excessive amplification of noise and improving the reliability of crack detection.
[0059] In summary, through dynamic brightness compensation in highlight areas, adaptive contrast adjustment in normal areas, and nonlinear brightness mapping in low-brightness areas, the impact of medium uneven brightness distribution on crack detection can be effectively reduced, and the recognizability of crack features can be improved. This regional optimization strategy can accurately adjust image characteristics under different brightness conditions to ensure the stability and reliability of crack detection.
[0060] When the degree of uneven brightness distribution is high, the processing measures performed on the highlight area in the image are as follows: forced brightness balance processing is performed on the area, and the saturation of the highlight area is reduced through high dynamic range mapping to improve the visibility of the crack features; the processing measures performed on the normal area in the image are as follows: dynamic contrast adjustment is performed on the area, and the overall image quality is optimized by balancing the brightness distribution to ensure the visibility of the crack features in different areas; the processing measures performed on the low-brightness area in the image are as follows: enhanced brightness enhancement processing is performed on the area, combined with contrast stretching and edge-preserving filtering to ensure clear identification of crack features in dark areas.
[0061] When the unevenness of brightness distribution is high, corresponding processing measures are performed on the highlight area, normal area and low brightness area in the image respectively, which can be achieved through software methods such as high dynamic range mapping (HDR Mapping), adaptive contrast optimization and enhanced brightness enhancement to ensure that the crack features can still be accurately identified in the case of severe brightness distribution imbalance. First, for the highlight area, forced brightness balance can be used, combined with local high dynamic range (Local HDR) mapping, so that the overexposed pixels in the area can reduce the brightness value while ensuring the details. In the specific implementation, the brightness histogram of the highlight area is first equalized, the pixel value distribution is analyzed, and the saturation of the highlight pixel is calculated; then, the brightness value of the overexposed area is reduced by adaptive brightness compression to return it to the normal dynamic range, and the edge-preserving brightness adjustment is used to ensure that the crack edge will not be blurred due to the brightness adjustment. In addition, the local Retinex algorithm can be introduced to enhance the local contrast of the crack feature by decomposing the brightness and reflection components, while avoiding the loss of information in the highlight area due to excessive compression. The core purpose of this processing method is to reduce the overexposure effect of the highlight area so that the crack features are still clearly visible in the highlight area, avoiding detection failure due to excessive light.
[0062] For the normal area, although the brightness of this area is balanced, it may be affected by the adjacent high-brightness or low-brightness areas in the overall image environment with high unevenness. Therefore, it is necessary to perform dynamic contrast adjustment to optimize the overall image quality and ensure the visibility of the crack features. In specific implementation, the local contrast equalization method can be used to analyze the brightness histogram of the area and adjust the contrast based on the global brightness distribution to match the brightness trend of the overall image. In addition, multi-scale contrast enhancement technology can be used to optimize brightness and contrast at different scales to reduce the contrast imbalance problem in the local area of the image, thereby ensuring that the crack features in the normal area are not difficult to identify due to contrast deviation. The core purpose of this processing method is to ensure that the brightness of the normal area adapts to the global brightness changes, improve the overall stability of crack detection, and avoid local information loss due to improper brightness adjustment.
[0063] For low-brightness areas, enhanced brightness enhancement needs to be performed to ensure that crack features can be accurately identified in dark areas while avoiding noise enhancement due to brightness enhancement. In specific implementation, contrast stretching can be used to adjust the pixel distribution in low-brightness areas so that the grayscale level is extended to the visible range, and edge-preserving filtering can be combined to ensure that the crack edge is not damaged during the brightness enhancement process. In addition, adaptive gamma correction can be used to perform nonlinear mapping on the brightness curve of low-brightness areas so that the pixel brightness in dark areas is enhanced while maintaining the brightness stability of the background to ensure that the crack features are not blurred due to the background brightness enhancement. The core purpose of this processing method is to enhance the crack details in low-brightness areas and improve the visibility of cracks while preventing noise amplification caused by brightness enhancement, which affects the accuracy of the detection results.
[0064] In summary, through HDR mapping and forced brightness balance in highlight areas, dynamic contrast adjustment in normal areas, and enhanced brightness improvement in low-brightness areas, the impact of extremely uneven brightness distribution on crack detection can be effectively reduced, and the stability and recognizability of crack features under different lighting environments can be improved. This intelligent area processing strategy can optimize image characteristics under harsh lighting conditions and ensure high accuracy and robustness of the crack detection system.
[0065] Based on the processed image, cracks in the image are detected and the detection results are classified to determine the crack conditions on the contact surface. Based on the detection results, the brightness processing and crack identification strategies are continuously optimized to improve the accuracy and stability of detection.
[0066] Crack detection and classification can be achieved by combining deep learning detection, edge detection and feature matching to ensure accurate identification of crack features in images after brightness processing and to classify the severity of cracks. First, in the crack detection stage, a target detection method based on deep learning can be used, such as a crack detection model constructed by a convolutional neural network. By training a large number of crack images, the model can automatically identify different types of crack features. In practical applications, the model can be combined with multi-scale feature extraction to ensure that the system can identify cracks of different sizes and shapes and improve the robustness of detection. In addition, in order to enhance the accuracy of detection, edge detection technology can be combined with the sensitivity of contrast changes to enhance the crack edge during the detection process to ensure that the crack contour is clearer and reduce the risk of crack boundary blurring due to brightness processing. For more complex crack features, morphological analysis methods can be used to process the crack area to highlight the crack structure and enhance the distinction between cracks and background. The core goal of the entire detection process is to ensure that cracks can be accurately identified under different illumination compensation conditions and to improve the adaptability and generalization ability of the detection system to crack morphological changes.
[0067] In the crack classification and optimization stage, the detected cracks can be automatically classified by machine learning or deep learning classification methods. First, the geometric features of the cracks can be extracted, including the length, width, area, and brightness distribution of the crack area, and the cracks can be divided into different levels, such as slight cracks, medium cracks, and severe cracks, through the classification model. At the same time, in order to ensure the stability of crack detection, the system can adaptively optimize the brightness compensation and contrast adjustment strategies according to the accuracy of the classification results. If the accuracy of crack recognition is found to decrease during the detection process, the active learning method can be used to include the misjudged crack samples into the data set, update the model parameters, and enable the system to more accurately identify cracks in subsequent detections. In addition, the results of crack classification can be further used to automatically evaluate the health status of the contact surface and provide data support for equipment maintenance. Through this continuous optimization process, the system can dynamically adjust the crack recognition parameters, continuously improve the long-term stability and intelligence level of crack detection, and ensure that high-precision crack detection capabilities can be maintained under different lighting environments.
[0068] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0069] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0070] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0071] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0072] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0073] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0075] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A circuit breaker conductive system image detection method, characterized in that: The specific steps include: Use an industrial camera to photograph the contact surface of the circuit breaker's conductive system under a fixed light source, detect the incident angle of the light source in real time, and determine whether mirror reflection occurs on the contact surface when the incident angle of the light source is lower than the set threshold. When the judgment result is that the contact surface generates a mirror reflection phenomenon, an image of the contact surface acquired by the industrial camera is extracted, and the image is evenly divided into a plurality of areas; Obtain and analyze the illumination feature information of each area in the image, evaluate the uneven brightness distribution of the contact surface image captured by the industrial camera due to low-angle illumination based on the analysis results, and divide each area in the image into highlight area, normal area and low-brightness area; Under different brightness distribution unevenness, corresponding processing measures are performed on the highlight area, normal area and low brightness area in the image respectively; Based on the processed image, cracks in the image are detected and the detection results are classified to determine the crack conditions on the contact surface, and the brightness processing and crack identification strategies are continuously optimized based on the detection results.
2. The circuit breaker conductive system image detection method according to claim 1, characterized in that: Obtain and analyze the illumination feature information of each area in the image, evaluate the uneven brightness distribution of the image of the contact surface captured by the industrial camera due to low-angle illumination based on the analysis results, and divide each area in the image into a highlight area, a normal area, and a low-brightness area, specifically including the following steps: Acquire the illumination feature information of each area in the image of the contact surface collected by the industrial camera, and perform preprocessing after acquisition; Extracting gradient entropy brightness information and contrast statistics from the preprocessed illumination feature information of each region, and analyzing them to generate brightness gradient balance index and contrast variation coefficient of each region respectively; A brightness distribution evaluation model is constructed based on the brightness gradient balance index and contrast variation coefficient of each region. The brightness distribution coefficient of each region is generated by weighted summation, and a comprehensive analysis is performed to generate the brightness distribution standard deviation. Determine a preset brightness distribution standard deviation threshold interval, and compare it with the generated brightness distribution standard deviation after determination, evaluate the brightness distribution unevenness of the contact surface image captured by the industrial camera due to low-angle illumination according to the comparison result, and divide it into low unevenness, medium unevenness and high unevenness; A preset brightness distribution coefficient threshold interval is determined, and after determination, it is compared with the generated brightness distribution coefficients of each area, and each area in the image is divided into a highlight area, a normal area and a low brightness area according to the comparison result.
3. The circuit breaker conductive system image detection method according to claim 2, characterized in that: The logic for obtaining the brightness gradient balance index of each area is as follows: Gradient entropy brightness information is extracted from the preprocessed illumination feature information of each area, including the brightness gradient value, brightness entropy value and average brightness value of each pixel point in each area of the contact surface image collected by the industrial camera, and calibrated as , and , The image of the contact surface captured by the industrial camera Region The brightness gradient value of each pixel, The image of the contact surface captured by the industrial camera Region The brightness entropy value of each pixel is The image of the contact surface captured by the industrial camera The average brightness value of the area, , , and All are positive integers; Calculate the brightness gradient balance index of each area. The specific calculation formula is as follows: In the formula, For the Brightness gradient balance index of a region.
4. The circuit breaker conductive system image detection method according to claim 3, characterized in that: The logic for obtaining the contrast coefficient of variation of each region is as follows: Contrast statistics are extracted from the preprocessed illumination feature information of each region, including the local contrast value, neighborhood contrast mean square error, and local contrast mean of each region in the image of the contact surface captured by the industrial camera, and are calibrated as , and , The image of the contact surface captured by the industrial camera The local contrast value of the region, The image of the contact surface captured by the industrial camera The mean square error of the neighborhood contrast of the region, The image of the contact surface captured by the industrial camera The local contrast mean of the region, is a positive integer; Calculate the contrast coefficient of variation of each area. The specific calculation formula is as follows: In the formula, For the The contrast coefficient of variation of the region.
5. The circuit breaker conductive system image detection method according to claim 4, characterized in that: Brightness gradient balance index for each generated area and the contrast coefficient of variation A brightness distribution evaluation model is constructed to generate the brightness distribution coefficient of each area through weighted summation. The specific calculation formula is as follows: In the formula, For the The brightness distribution coefficient of the area, and They are the brightness gradient balance index of each area and the contrast coefficient of variation The non-zero weight coefficient of ; Brightness distribution coefficient for each area Perform comprehensive analysis to generate brightness distribution standard deviation , according to the formula: .
6. The circuit breaker conductive system image detection method according to claim 5, characterized in that: Determine the preset brightness distribution standard deviation threshold interval , and after determination, the standard deviation of the generated brightness distribution The comparison is performed, and the uneven brightness distribution of the contact surface images captured by the industrial camera due to low-angle illumination is evaluated based on the comparison results, and the uneven brightness distribution is divided into low unevenness, medium unevenness and high unevenness. The specific comparison analysis is as follows: like ,The image of the contact surface captured by the industrial camera has a low uneven brightness distribution due to low angle illumination; like ,The image of the contact surface captured by the industrial camera has a medium uneven brightness distribution due to low-angle illumination; like ,The image of the contact surface captured by the industrial camera has a high uneven brightness distribution due to ,low-angle illumination.
7. The circuit breaker conductive system image detection method according to claim 6, characterized in that: Determine the preset brightness distribution coefficient threshold range , and after determination, the brightness distribution coefficient of each area generated Compare and divide each area in the image into highlight area, normal area and low-brightness area according to the comparison results. The specific comparison analysis and division are as follows: like , divide the area in the image into a low-brightness area; like , divide the area in the image into a normal area; like , and divide the area in the image into a highlight area.
8. The circuit breaker conductive system image detection method according to claim 7, characterized in that: In the case of different degrees of uneven brightness distribution, corresponding processing measures are performed on the highlight area, normal area and low brightness area in the image, specifically: When the unevenness of brightness distribution is low, the processing measures performed on the highlight area in the image are: brightness suppression processing is performed on the area to reduce the overexposure effect by contrast adjustment; the processing measures performed on the normal area in the image are: original brightness is maintained without additional processing to retain the crack details in the area; the processing measures performed on the low-brightness area in the image are: brightness enhancement processing is performed on the area to improve pixel contrast; When the unevenness of brightness distribution is medium, the processing measures performed on the highlight area in the image are as follows: dynamic brightness compensation is performed on the area, the overexposure effect is reduced through adaptive brightness adjustment, and the edge detection effect is optimized to ensure that the crack features are not blocked by overexposure; the processing measures performed on the normal area in the image are as follows: the current brightness level is maintained, and the contrast is dynamically adjusted according to the overall brightness distribution; the processing measures performed on the low-brightness area in the image are as follows: adaptive contrast enhancement is performed on the area, dark details are optimized through nonlinear brightness mapping, and the recognizability of the crack edge is improved; When the degree of uneven brightness distribution is highly uneven, the processing measures performed on the highlight area in the image are as follows: forced brightness balance processing is performed on the area, and the saturation of the highlight area is reduced through high dynamic range mapping; the processing measures performed on the normal area in the image are as follows: dynamic contrast adjustment is performed on the area, and the overall image quality is optimized through balanced brightness distribution; the processing measures performed on the low-brightness area in the image are as follows: enhanced brightness boost processing is performed on the area, combined with contrast stretching and edge-preserving filtering, to ensure clear identification of crack features in dark areas.
Citation Information
Patent Citations
Face image quality evaluation method and system and computer readable storage medium
CN119338823A
Automatic tipping paper printing control method based on image detection
CN119610879A
Cited By
SF6 instrument image identification method and system
CN120808328A
Compression spring fault automatic detection method based on image recognition
CN122199416A