Machine vision-based on-line identification method for surface defects of automobile high-voltage line

By introducing vibration compensation factors and aperiodic disturbance factors into high-voltage line detection, and combining them with the cosine value of the normal angle for illumination compensation, the problems of false alarms and edge missed detection in the traditional optical flow method are solved, and high-precision online detection is achieved.

CN121883446APending Publication Date: 2026-04-17GUANGZHOU XINXING CABLES IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU XINXING CABLES IND CO LTD
Filing Date
2026-01-05
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The traditional Lucas-Kanade optical flow method has difficulty distinguishing between normal mechanical vibration and non-periodic anomalies caused by defects in high-voltage line inspection, leading to false alarms. Furthermore, the Sobel operator causes insufficient contrast of defect signals due to light attenuation at the edge of the high-voltage line surface, making it easy to miss defects.

Method used

By introducing vibration compensation factors and aperiodic disturbance factors to distinguish between mechanical vibration and defects, and combining the cosine value of the normal angle for illumination compensation, a defect energy response model is constructed. The Sigmoid function is used for dynamic threshold adjustment to achieve high-precision detection.

Benefits of technology

It effectively reduced false alarms, enhanced weak contrast signals at the edges, and achieved high-precision online detection of the entire surface of high-voltage lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883446A_ABST
    Figure CN121883446A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an automobile high-voltage line surface defect online identification method based on machine vision, which comprises the following steps: acquiring a current frame image containing a high-voltage line main body; calculating a vibration compensation factor of the current frame image, wherein the vibration compensation factor is in positive correlation with the sum of the displacement of the plurality of feature points in the current frame image relative to the previous frame; and calculating a non-periodic disturbance factor of the current frame image. According to the method, the non-periodic disturbance factor based on the historical mean value is constructed, so that the interference of inherent mechanical vibration of the production line on defect signals is effectively stripped, and the problem of misinformation under a dynamic background is solved; meanwhile, a defect energy response model is constructed by utilizing a normal included angle of the cylinder, nonlinear gain compensation is performed on an edge illumination attenuation area, the contrast ratio of edge weak defects is remarkably enhanced, the problem of dead angles in detection of the edge of the cylinder is solved, and full-coverage high-precision online detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a machine vision-based online identification method for surface defects in automotive high-voltage power lines. Background Technology

[0002] High-voltage transmission cables are core components of power systems, and their surface quality directly determines their insulation performance and mechanical strength. In industrial production, to ensure finished product quality, industrial cameras are typically used to capture images of the cable surface at high speeds, and machine vision algorithms are employed for automated defect detection. Existing technologies usually employ the Lucas-Kanade optical flow method to track feature points in the image sequence to monitor motion, and combine this with the Sobel operator to calculate the image's grayscale gradient, extracting texture features to identify scratches or cracks on the cable surface.

[0003] However, directly applying the aforementioned basic algorithms has significant limitations when dealing with high-voltage power line production scenarios. First, the production line inevitably experiences periodic mechanical vibrations during high-speed traction. While the traditional Lucas-Kanade optical flow method can calculate pixel-level geometric displacement, it cannot isolate background vibrations from the complex motion field. This makes it difficult for the system to distinguish between normal reciprocating mechanical jitter and non-periodic abnormal changes caused by defects, resulting in numerous false alarms. Second, because the surface of a high-voltage power line is a cylinder with significant curvature, the reflected light in the edge areas of the cable image is significantly attenuated due to the principle of light reflection, resulting in brightness far lower than the central area. When processing such images, the Sobel operator ignores the influence of the cylindrical geometry on the light distribution, causing the defect signals at the edges to be weak due to insufficient contrast. These defects are easily mistaken for background noise and missed, failing to meet the high-precision detection requirements for full coverage. Summary of the Invention

[0004] This invention provides an online identification method for surface defects of automotive high-voltage lines based on machine vision. It aims to solve the problem that although the traditional Lucas-Kanade optical flow method can calculate pixel-level geometric displacement, it cannot separate background vibration from complex motion fields. This makes it difficult for the system to distinguish between normal reciprocating mechanical vibration and non-periodic abnormal changes caused by defects, resulting in a large number of false alarms.

[0005] This invention provides an online method for identifying surface defects on automotive high-voltage power lines based on machine vision. The method includes: acquiring a current frame image containing the main body of the high-voltage power line; calculating a vibration compensation factor for the current frame image, wherein the vibration compensation factor is positively correlated with the sum of the displacements of multiple feature points within the current frame image relative to the previous frame; calculating an aperiodic perturbation factor for the current frame image, wherein the aperiodic perturbation factor is the absolute difference between the vibration compensation factor of the current frame image and the mean of the vibration compensation factors of historical frames within a set time period; calculating the defect energy response of each pixel in the current frame image, wherein the defect energy response is positively correlated with the aperiodic perturbation factor and the grayscale gradient value of the current pixel, and negatively correlated with the cosine of the normal angle corresponding to the current pixel's position in three-dimensional space; determining a defect score for the current frame image based on the defect energy response; and determining whether a defect exists based on the magnitude of the defect score. By introducing vibration compensation factors and non-periodic disturbance factors, the inherent periodic mechanical vibrations of the production line can be effectively distinguished from non-periodic abnormal changes caused by defects, solving the problem of false alarms caused by the difficulty of separating background vibrations in the traditional optical flow method. At the same time, by using the cosine value of the normal angle to weight the defect energy response, the characteristics of light attenuation at the edge of the high-voltage line cylinder can be compensated, enhancing the signal strength of edge weak contrast defects, effectively reducing the missed detection rate caused by uneven reflection of curved surfaces, and realizing high-precision online detection.

[0006] Furthermore, the method for calculating the vibration compensation factor includes: selecting M Harris corner points as feature points in the central region of the previous frame image; using the Lucas-Kanade optical flow method, finding the matching positions of the M feature points in the current frame image and calculating the displacement vector. The sum of the Euclidean distances of the displacement vectors of all feature points is used as the vibration compensation factor for the current frame image. By utilizing the insensitivity of Harris corner points to rotation and illumination, and combining the Lucas-Kanade optical flow method to calculate the displacement of feature points, the overall geometric displacement of the current frame relative to the previous frame can be accurately quantified, thereby accurately reflecting the instantaneous vibration state of the production line.

[0007] Furthermore, the formula for calculating the aperiodic disturbance factor is as follows: In the formula, For the current frame The non-periodic perturbation factor of the image; For the current frame Image vibration compensation factor; for Vibration compensation factor for frame images; This represents the total number of frames within a vibration cycle, calculated using motor speed. By calculating the difference between the current vibration intensity and the average vibration intensity over historical cycles, an aperiodic disturbance factor is constructed. This factor can accurately extract unexpected abrupt signals caused solely by surface defects (such as scratches) from complex mixed motion fields, significantly suppressing false alarms caused by mechanical reciprocating motion and improving the detection's anti-interference capability.

[0008] Furthermore, the formula for calculating the sum of frames within the vibration cycle converted from motor speed is as follows: In the formula, This is the sum of the number of frames within the vibration cycle, calculated using the motor speed. Set a fixed sampling frequency for the camera. The speed of the traction motor on the production line is used as the reference. The number of frames corresponding to the vibration cycle is dynamically calculated based on the real-time speed of the traction motor, ensuring that the moving average window is always synchronized with the physical cycle of mechanical vibration. This eliminates calculation errors caused by fluctuations in the traction speed of the production line and guarantees the stability of detection in variable speed production environments.

[0009] Furthermore, the formula for calculating the defect energy response is as follows: In the formula, For the current frame Image coordinates Defect energy response at a pixel; coordinates The grayscale gradient value of the pixel is calculated using the Sobel operator. For the current frame The non-periodic perturbation factor of the image; The reference reflectivity of the cable surface; For point The angle between the normals on the cylindrical surface, It is an extremely small constant. By constructing a defect energy response model using an exponential function and using the cosine of the normal angle as the denominator, the edge regions, which are dimly lit due to the curvature of the cylinder, receive significant gain compensation during calculation. This forcibly enhances the signal saliency of tiny scratches on the edge, completely solving the edge dead zone problem in the detection of cylindrical surfaces.

[0010] Furthermore, the method for obtaining the normal angle includes: for any pixel in the image, calculating its horizontal coordinate. The horizontal distance to the center axis of the high-voltage line is calculated; the product of this horizontal distance and the radius of the high-voltage line is taken as the sine value; the normal angle is obtained through the arcsine function. The inverse trigonometric function is used to accurately calculate the normal angle of each pixel in the image in three-dimensional space, providing an accurate geometric basis for subsequent illumination attenuation compensation and ensuring the universality of the edge enhancement algorithm on cables of different thicknesses.

[0011] Furthermore, the defect score for the current frame is calculated using the following formula: In the formula: For the current frame Defect score for the image region; The maximum defect energy response in the current image region; A dynamic environmental threshold is introduced. By using the Sigmoid function to map the unbounded energy response to a standardized probability interval, a dynamic environmental threshold is introduced. This automatically adapts to background reference drift caused by lens dirt or overall dimming of ambient light, ensuring the robustness of the decision system in long-term operation and avoiding misjudgments caused by a single fixed threshold.

[0012] Furthermore, the dynamic environment threshold is set to 18 frames of normal images. The average value is used as the dynamic threshold by statistically analyzing the average energy response of recent normal images. This establishes a defect-free benchmark that is updated in real time with the production environment, enabling the system to sensitively detect any minute anomalies that exceed the current environmental noise level, further improving the adaptive capability of the detection.

[0013] Furthermore, acquiring the current frame image containing the main body of the high-voltage line includes: acquiring an image sequence using an industrial camera at a fixed frequency; cropping the region containing the main body of the high-voltage line in the current frame as the region of interest; and performing grayscale processing on the region of interest to obtain the current frame image.

[0014] Furthermore, the number of feature points is indivual.

[0015] Beneficial effects: By constructing an aperiodic disturbance factor based on historical averages, the interference of inherent mechanical vibrations on defect signals in the production line is effectively eliminated, solving the problem of false alarms in dynamic backgrounds; at the same time, by constructing a defect energy response model using the included angle of the cylinder's normal direction, nonlinear gain compensation is performed on the edge illumination attenuation region, significantly enhancing the contrast of weak edge defects, solving the problem of dead angles in cylinder edge detection, and achieving high-precision online detection with full coverage. Attached Figure Description

[0016] Figure 1 This is a schematic flowchart illustrating a defect identification method according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the defect identification results according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the trend of defect score changes according to an embodiment of the present invention. Detailed Implementation

[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] like Figure 1 As shown, S101: Acquire and preprocess the image sequence of the high-voltage line surface.

[0019] In this embodiment, an industrial camera installed on the side of the high-voltage line production line is used to achieve a fixed sampling frequency. Continuously acquire images of the surface of high-voltage power lines moving at high speeds to form an image sequence. Among them, the sampling frequency of industrial cameras Preferred This is to ensure that the surface details of the high-voltage power line can be captured even under high-speed movement. For each frame of image... Based on the edge position of the high-voltage power line in the image, a region of interest (ROI) containing the main body of the cable is extracted and then converted to grayscale. It's important to note that the ROI can be dynamically updated according to changes in the edge position of the power line across consecutive frames to avoid ROI offset due to slight lateral movement of the cable. During preprocessing, Gaussian filtering is used to smooth the image to reduce noise interference from uneven ambient lighting. Subsequent steps are performed on the processed current frame image. and the adjacent previous frame Perform the analysis.

[0020] S102: Calculate the vibration compensation factor for the current frame image.

[0021] In this embodiment, to quantify the instantaneous jitter of the industrial camera in the current frame image, it is necessary to extract the geometric displacement between two adjacent frames. Specifically, the geometric displacement is selected in the central region of the previous frame image. The Harris corner detection algorithm is suitable for feature point extraction because it is insensitive to image rotation, grayscale changes, noise, and viewpoint shifts. In this embodiment, the total number of feature points is selected. experience value Too few feature points will lead to inaccurate displacement calculations, while too many feature points will increase the computational burden.

[0022] Then, using the Lucas-Kanade optical flow method, this is searched in the current frame image. Matching positions for each feature point. The Lucas-Kanade optical flow method assumes constant local optical flow and effectively solves the problem of large displacement matching between images by using a pyramid layering strategy. The process calculates the matching positions for each feature point from... arrive pixel displacement vector at time step The sum of the Euclidean distances of the displacement vectors of all feature points is used as the vibration compensation factor for the current frame image.

[0023] This embodiment provides a formula for calculating the vibration compensation factor. The formula is as follows: In the formula, For the current frame Image vibration compensation factor; This represents the total number of feature points; and The first Each feature point in and Displacement pixel value in the direction.

[0024] From the above formula, it can be seen that, The size represents the overall offset of the current frame image relative to the previous frame. If An increase in displacement exceeding the normal traction speed indicates mechanical vibration on the production line, potentially causing motion blur in the current frame image. This step provides precise physical pixel data for distinguishing between actual cable movement and mechanical vibration.

[0025] S103: Construct aperiodic perturbation factors.

[0026] In one embodiment, the mechanical vibration of a high-voltage power line production line has a periodic reciprocating characteristic, while real defects (such as scratches) move linearly along the cable in the image and do not reciprocate. To distinguish this abnormal disturbance from background vibration, an aperiodic disturbance factor needs to be constructed.

[0027] Specifically, the aperiodic perturbation factor of the current frame image is calculated using the following formula: In the formula, For the current frame The non-periodic perturbation factor of the image; For the current frame Image vibration compensation factor; for Vibration compensation factor for frame images; This represents the total number of frames within the vibration cycle, calculated using the motor speed.

[0028] Total number of frames The method of obtaining the speed is as follows: the speed of the main traction motor is obtained in real time through the production line PLC. (RPM), using the formula The calculation yielded the following. A fixed sampling frequency is set for the camera. The system dynamically adjusts the frequency in real time based on changes in rotation speed. The value is determined to ensure that the moving average window is always synchronized with the physical period of mechanical vibration, thus eliminating the impact of traction speed fluctuations on non-periodic disturbance factors. Interference in computation.

[0029] As can be seen from the formula's logic, this formula reflects abnormal disturbances by using the difference between the current displacement and the historical average. If... If the current vibration factor is close to the average of historical vibration cycles, then the difference tends to be 0, indicating that the image blurring or displacement is caused by background vibration interference; if An increase indicates that the current frame image has experienced a sudden, non-periodic displacement that exceeds the normal vibration range, requiring close attention. This usually corresponds to unexpected changes on the cable surface.

[0030] S104: Construct the defect energy response function.

[0031] In one embodiment, at the edge of a high-voltage line, the illumination weakens due to the increased reflection angle, resulting in reduced defect contrast in the edge region. To address this issue, it is necessary to incorporate motion anomaly indicators. Compensate for edge gradients.

[0032] Specifically, firstly, the Sobel operator is used to calculate the grayscale gradient values ​​of each pixel in the current frame image. The Sobel operator contains convolution kernels in the horizontal and vertical directions, which can effectively extract edge information. Then, the normal angle is calculated based on the position of the pixel on the cylindrical surface. Finally, the defect energy response is calculated, and its calculation formula is: In the formula, For the current frame Image coordinates Defect energy response at a pixel; coordinates The grayscale gradient value of the pixel is calculated using the Sobel operator. For the current frame The non-periodic perturbation factor of the image; The reference reflectivity of the cable surface; For point The angle between the normals on the cylindrical surface, To avoid the denominator being zero, the value should be an extremely small constant. The value is 0.04.

[0033] The method for calculating the normal angle is as follows: for any pixel to be detected in the image... Calculate its horizontal coordinates Horizontal distance to the central axis According to the Law of Sines, Therefore, through inverse trigonometric functions This yields the normal deflection angle of the pixel in three-dimensional space. For the image radius... Based on the edge position of the high-voltage line in the image, calculate the total pixel width occupied by the cable; half of this total width is the image radius. .

[0034] It should be noted that when When pointing to non-periodic anomalies, this formula greatly amplifies gradient changes. More importantly, The design ensures that the point When located in a dimly lit edge area, near , The value approaches This reduces the denominator and forces an increase in energy response. This makes even tiny scratches at the edge noticeable in terms of energy distribution, effectively solving the problem of blind spots in cylinder edge detection.

[0035] S105: Calculate the dynamic defect discrimination score and determine the defect.

[0036] In one embodiment, to avoid false alarms caused by factors such as changes in ambient light or lens dirt affecting a single fixed threshold, the energy response needs to be mapped to a logical probability, and a dynamic environmental threshold is introduced. Specifically, the maximum defect energy response within the current region of interest (ROI) is first extracted, denoted as... Then, the dynamic defect discrimination score for the current frame image region is calculated using the following formula: In the formula: Determine the defect score for the current frame image region; The maximum defect energy response in the current image region; This is a dynamic environment threshold, and its value is based on past data. Frame normal image The average value, in this embodiment, The value is Preferred The value is 18. Normal images can be acquired during the system initialization phase under defect-free production conditions, or selected from historical images through manual annotation.

[0037] As can be seen from the formula, The energy signal is compressed using the Sigmoid function. The system eliminates background baseline drift caused by camera lens dirt and overall dimming by subtracting a dynamic environmental threshold. This ensures both threshold stability and timely adaptation to environmental changes. At that time, the image frame is determined to have a defect. This threshold... These are empirical values; in other embodiments, they can be adjusted according to requirements for false alarm and false negative rates. or .

[0038] like Figure 2 As shown, minute defects at the edges were accurately detected in the original grayscale image, and a judgment score greater than 0.85 was given.

[0039] like Figure 3 As shown in the figure, the quantitative curve illustrates the qualitative change process. The existing technology curve (gray dashed line) collapses at the edge, making it impossible to extract the signal; while the curve of the present invention (orange-red solid line) draws out an extremely steep peak at the same position, namely the red shaded area, demonstrating the signal strength improvement effect of the present invention.

[0040] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. A machine vision-based online identification method for surface defects in automotive high-voltage power lines, comprising: Get the current frame image containing the main body of the high-voltage line; Calculate the vibration compensation factor of the current frame image, which is positively correlated with the sum of the displacements of multiple feature points in the current frame image relative to the previous frame. Calculate the aperiodic perturbation factor of the current frame image, where the aperiodic perturbation factor is the absolute difference between the vibration compensation factor of the current frame image and the mean value of the vibration compensation factor of historical frames within a set time period. Calculate the defect energy response of each pixel in the current frame image. The defect energy response is positively correlated with the non-periodic perturbation factor and the gray-level gradient value of the current pixel, and negatively correlated with the cosine value of the normal angle corresponding to the position of the current pixel in three-dimensional space. The defect score of the current frame image is determined based on the defect energy response, and the presence of a defect is determined based on the magnitude of the defect score.

2. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1, characterized in that, The method for calculating the vibration compensation factor includes: selecting M Harris corner points as feature points in the central region of the previous frame image; using the Lucas-Kanade optical flow method, finding the matching positions of the M feature points in the current frame image and calculating the displacement vector. The sum of the Euclidean distances of the displacement vectors of all feature points is used as the vibration compensation factor for the current frame image.

3. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1, characterized in that, The formula for calculating the aperiodic disturbance factor is: In the formula, For the current frame The non-periodic perturbation factor of the image; For the current frame Image vibration compensation factor; for Vibration compensation factor for frame images; This represents the total number of frames within the vibration cycle, calculated using the motor speed.

4. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1, characterized in that, The formula for calculating the total number of frames within the vibration period converted from motor speed is as follows: In the formula, This is the sum of the number of frames within the vibration cycle, calculated using the motor speed. Set a fixed sampling frequency for the camera. This refers to the rotational speed of the traction motor on the production line.

5. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1, characterized in that, The formula for calculating the defect energy response is: In the formula, For the current frame Image coordinates Defect energy response at a pixel; coordinates The grayscale gradient value of the pixel is calculated using the Sobel operator. The reference reflectivity of the cable surface; For the current frame The non-periodic perturbation factor of the image; For point The angle between the normals on the cylindrical surface, It is a very small constant.

6. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1 or 5, characterized in that, The method for obtaining the normal angle includes: for any pixel in the image, calculating its horizontal coordinate. The horizontal distance to the center axis of the high-voltage line; the product of the horizontal distance and the radius of the high-voltage line is taken as the sine value; the normal angle is obtained by the arcsine function.

7. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1, characterized in that, The defect score for the current frame is calculated using the following formula: In the formula: For the current frame Defect score for the image region; The maximum defect energy response in the current image region; This is the threshold for dynamic environments.

8. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 7, characterized in that, The dynamic environment threshold is set to 18 frames of normal images. The average value.

9. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 1, characterized in that, Acquiring a current frame image containing the main body of a high-voltage power line includes: acquiring an image sequence using an industrial camera at a fixed frequency; cropping the region containing the main body of the high-voltage power line in the current frame as the region of interest; and performing grayscale processing on the region of interest to obtain the current frame image.

10. The online identification method for surface defects of automotive high-voltage lines based on machine vision according to claim 2, characterized in that, The number of feature points is indivual.