Catenary 2c inspection system and method based on visual detection

CN122597402APending Publication Date: 2026-08-18CHENGDU YUNTIE INTELLIGENT TRANSPORTATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611063814.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供基于视觉检测的接触网2C巡检系统及方法,用于解决现有技术无法从同一模糊帧中区分出受模糊影响程度不同的图像区域,并利用其中仍保持清晰的部分提取缺陷特征的问题;

Benefits of technology

1、通过将图像划分为接触线区域和吊弦区域,并分别沿局部法线方向和固定评估方向计算定向梯度能量,克服了传统整帧清晰度评估无法区分不同走向部件模糊程度差异的缺陷;当列车通过曲线区段时,接触线区域因法线方向与运动方向接近垂直而保持清晰,吊弦区域严重模糊;本发明能够保留清晰区域的局部信息并执行缺陷检测,避免了因整帧丢弃导致的接触线早期磨耗或吊弦线夹裂纹的漏检;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597402A_ABST
    Figure CN122597402A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of electrified railway catenary inspection, and is used to solve the problem that the prior art cannot distinguish image regions with different blur influence degrees from the same fuzzy frame and extract defect features by using the part still remaining clear, specifically a catenary 2C inspection system and method based on visual detection, comprising the following steps: acquiring a current frame image collected by a vehicle-mounted camera, dividing the current frame image into at least a first region and a second region; generating a definition index of each region; performing defect detection processing on the image region marked as a clear region to obtain a first detection result; performing cross-frame interpolation processing on the image region marked as a non-clear region according to the detection result of the corresponding region in the adjacent clear frame in time to obtain a second detection result; the present application divides the image into a contact line region and a dropper region, overcoming the defect that the traditional whole-frame definition evaluation cannot distinguish the blur degree difference of different components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of overhead contact line inspection technology for electrified railways, specifically a 2C inspection system and method for overhead contact lines based on visual inspection. Background Technology

[0002] In visual inspection of the overhead contact system of electrified railways, onboard cameras continuously acquire images of the overhead contact support devices and suspension components while the train is running at high speed. By performing defect detection on the images, abnormal conditions such as broken droppers, loose clamps, and worn contact wires are identified. Due to the vibration of the train during operation, the influence of curves or turnout sections, the acquired images generally exhibit motion blur. Existing technologies typically use whole-frame sharpness evaluation methods, such as calculating the Laplacian gradient energy or the proportion of high-frequency components in the frequency domain. When the whole-frame sharpness is lower than a preset threshold, the frame is directly judged as an invalid frame and discarded, and only frames with acceptable sharpness are retained for subsequent defect detection processes.

[0003] However, the degree to which motion blur attenuates edges in different directions in an image depends on the angle between the edge direction and the train's direction of motion. When the train passes through a curved section, the direction of the train's motion is nearly parallel to the direction of the contact line. At this time, the normal direction of the contact line edge is almost perpendicular to the direction of motion, and the gradient information in this direction is preserved intact, so the contact line area remains clear. However, vertically oriented components such as droppers become blurred because their edge normals are parallel to the direction of motion, and the gradient is severely smoothed. Conversely, in straight sections, the direction of motion is perpendicular to the contact line, resulting in a blurred contact line area and a clear dropper area. Existing whole-frame discarding strategies cannot perceive the differentiated responses of different regions to motion blur, causing a large number of frames with "partially clear areas" to be discarded as a whole. Key defect information such as early wear signs of the contact line or cracks in the dropper line contained therein is lost, resulting in missed defect detection.

[0004] Therefore, the core technical problem that urgently needs to be solved is: how to distinguish image regions with different degrees of blur from the same blurred frame, and extract defect features from the parts that still remain clear, so as to avoid the loss of key information caused by discarding the entire frame. Summary of the Invention

[0005] The purpose of this invention is to provide a visual inspection system and method for overhead contact lines (OTC) to solve the problem that existing technologies cannot distinguish image regions with different degrees of blur from the same blurred frame and extract defect features from the parts that remain clear. The technical problem to be solved by the present invention is: how to provide a visual inspection system and method for contact wire 2C inspection that can distinguish image regions with different degrees of blurring in the same blur frame and extract defect features from the parts that still remain clear.

[0006] The objective of this invention can be achieved through the following technical solutions: The visual inspection-based 2C inspection method for overhead contact lines includes the following steps: The current frame image captured by the vehicle-mounted camera is acquired, and the current frame image is divided into at least a first region and a second region, wherein the first region is the strip-shaped region where the contact line is located, and the second region is the region where the dropper is located; Determine the local normal direction of the contact line in the first region and the fixed evaluation direction corresponding to the second region; calculate the directional gradient energy along the local normal direction in the first region and the directional gradient energy along the fixed evaluation direction in the second region, respectively. Based on the ratio of the directional gradient energy of each region to the corresponding historical baseline gradient energy, a sharpness index is generated for each region; based on the sharpness index of each region, the corresponding region is marked as a sharp region or a non-sharp region; For image regions marked as clear areas, defect detection processing is performed to obtain the first detection result; for image regions marked as non-clear areas, cross-frame interpolation processing is performed based on the detection results of the corresponding regions in temporally adjacent clear frames to obtain the second detection result. Output the first and second detection results.

[0007] The present invention has the following beneficial effects: 1. By dividing the image into the contact line region and the dropper region, and calculating the directional gradient energy along the local normal direction and the fixed evaluation direction respectively, the defect of traditional whole-frame sharpness evaluation that cannot distinguish the difference in blur degree of components with different directions is overcome; when the train passes through the curved section, the contact line region remains clear because the normal direction is close to the direction of movement, while the dropper region is severely blurred; the present invention can retain the local information of the clear area and perform defect detection, avoiding the omission of early wear of the contact line or cracks in the dropper due to the discarding of the whole frame; 2. By independently maintaining the historical baseline gradient energy for each region and dynamically modulating the judgment threshold using the standard deviation of the historical sharpness index, automatic tracking of long-term image texture drift (such as changes in the angle of sunlight and sudden changes in illumination at tunnel entrances and exits) is achieved. At the same time, a continuous non-sharp frame counter and a data missing state locking mechanism are introduced to prevent the baseline from being updated incorrectly due to temporary blurring or noise interference, which significantly improves the stability of the system in scenarios such as tunnels and severe weather. 3. Perform cross-frame linear interpolation or extrapolation based on time-adjacent clear frames for unclear areas and output estimated detection values ​​with uncertainty. This strategy fills the time gap in detection results caused by the discarding of blurry frames, keeps the evolution curve of contact wire wear width continuous, and makes it easier for maintenance personnel to track the development trend of defects. At the same time, the uncertainty is transmitted to the alarm decision-making stage, and a conservative upper bound is used as the alarm condition to give priority to avoiding missed alarms. 4. The contact line edge point set output by the defect detection module in the clear frame is fed back to the region segmentation step of the next frame to update the quadratic curve fitting parameters, forming a closed-loop iterative optimization of geometric prediction. This mechanism enables the contact line orientation estimation to gradually converge as the system runs. Especially in sections with drastic geometric changes such as curves and ramps, it can adaptively correct the normal direction angle, thereby improving the calculation accuracy of the orientation gradient energy and providing more reliable region prior information for subsequent sharpness assessment and defect detection. Attached Figure Description

[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0009] Figure 1 This is a flowchart of the method according to Embodiment 1 of the present invention; Figure 2 This is a system block diagram of Embodiment 2 of the present invention. Detailed Implementation

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

[0011] In the field of visual inspection of overhead contact lines of electrified railways, images captured by onboard cameras during high-speed train operation generally exhibit motion blur, which is essentially an image degradation process caused by the relative motion between the camera and the contact line. From a physical mechanism perspective, the degree of attenuation of edges in different directions in an image by motion blur depends on the angle between the edge direction and the direction of train movement: when the two are parallel, the gradient information in that direction is almost undamaged; when the two are perpendicular, the gradient is severely attenuated. Therefore, the contact line (approximately horizontal) and the dropper (vertical) often exhibit drastically different degrees of blur in the same frame image.

[0012] However, existing technologies generally adopt a whole-frame sharpness evaluation strategy, such as calculating the Laplacian gradient energy or the proportion of high-frequency components in the frequency domain. When the overall sharpness of a frame is lower than a fixed threshold, the frame is directly discarded. This "one-size-fits-all" approach assumes that the blur is evenly distributed throughout the frame, ignoring the geometric relationship between the spatial orientation of the contact wire components and the direction of movement. Specifically, when a train passes through a curved section, the direction of movement is nearly parallel to the direction of the contact wire, and the contact wire area remains sharp while the dropper area is severely blurred. In this case, existing technologies discard the entire frame because the average sharpness of the whole frame is lower than the threshold, resulting in the loss of signs of early wear defects on the contact wire with the frame. Conversely, in straight sections, the contact wire is blurred while the dropper is sharp, and key information about cracks in the dropper is also discarded as a whole.

[0013] Furthermore, existing technologies lack a mechanism for identifying and reusing locally clear areas within blurred frames, resulting in discontinuous defect detection results over time. When a train passes through multiple curves or tunnel sections consecutively, the proportion of discarded frames can reach over 30%, creating a detection blind spot. The system cannot distinguish between the coexistence of "blurred areas" and "clear areas," and can only output discrete and incomplete detection results, making it difficult for maintenance personnel to determine the true evolution trend of defects. For example, if a critical transition frame where contact wire wear increases from 2.8 pixels to 3.2 pixels is discarded, the system will report a direct jump from 2.8 to 3.2 pixels, missing the intermediate state. This not only fails to confirm the gradual process of the defect but also easily triggers false alarms due to the jump.

[0014] If the above problems are not solved, the existing 2C inspection system will continue to lose the ability to utilize the effective information in the fuzzy frames. On the one hand, a large number of partially clear frames are discarded, resulting in the inability to capture early signs of defects and a high rate of missed detections. On the other hand, the time discontinuity of the detection results distorts the defect development curve, and the operation and maintenance decisions rely on incomplete data, which may delay maintenance or cause unnecessary maintenance shutdowns.

[0015] Therefore, there is an urgent need for an inspection method that can sense the differences in blurriness between image regions, extract usable information from blurred frames, and compensate for missing detection results through temporal correlation, so as to improve the continuity and reliability of catenary defect detection.

[0016] Example 1: As Figure 1 As shown, the visual inspection-based 2C inspection method for overhead contact lines includes the following steps: Step S1: Acquire the current frame image captured by the vehicle-mounted camera, and divide the current frame image into at least a first region and a second region, wherein the first region is the strip-shaped region where the contact line is located, and the second region is the region where the dropper is located; In this embodiment, the above-mentioned visual inspection-based catenary 2C inspection method continuously acquires catenary images in front of or above the train at a fixed frame rate (e.g., 25 frames / second) using an on-board industrial camera. Each frame is a grayscale image with a resolution of 1920×1080 pixels. For each acquired frame, the system performs the following steps.

[0017] The system first acquires the current frame image, denoted as... To distinguish the parts affected by motion blur to different degrees from the image, the image needs to be divided into two regions with different geometric features: the first region corresponds to the strip-shaped area where the contact line is located, and the second region corresponds to the rectangular area where the dropper is located. The division is based on the contact line position information detected in the previous frame image, because the train's movement distance between two consecutive frames is limited, and the change in the image position of the contact line is smooth and continuous.

[0018] After acquiring the current frame image, first check the image validity: calculate the image grayscale mean and standard deviation; if the mean is less than 5 (all black) or the mean is greater than 250 (all white) or the standard deviation is less than 1 (no texture), then mark the entire frame as invalid, skip all subsequent processing, and only output a 'camera malfunction' warning.

[0019] Specifically, the system maintains a cache that stores the set of contact line edge points obtained through defect detection in the previous frame image; this set of edge points consists of sub-pixel precision edge point coordinates output by the wear detection module during the clear region detection process in the previous frame, denoted as... ,in , The value is at least 10, and each point is accompanied by a detection confidence level. The confidence level is obtained by normalizing the gradient intensity during edge detection. If the current frame is the first frame (i.e., there is no detection result from the previous frame), the system obtains the curve radius and superelevation value at that mileage from the pre-stored route prior database based on the current mileage provided by the vehicle positioning system (GNSS + odometer). Then, using the pre-calibrated camera intrinsic parameters and installation attitude parameters, the system calculates the theoretical set of contact line position points using the perspective projection model and uses this as the initial... .

[0020] The prior knowledge database for the route is generated in advance from design drawings or actual measurements, storing the curve radius, superelevation, and gradient for each mileage point (intervals of 1 meter). Parameters at any location are obtained through mileage interpolation, and then the theoretical parabolic parameters of the contact line in the image are calculated based on the camera projection model. The projection model uses a pinhole model, taking into account the camera installation height, pitch angle, and roll angle.

[0021] Based on the aforementioned contact line edge point set and its confidence level, the system uses weighted least squares to fit a quadratic curve model to describe the trajectory of the contact line in the image space of the current frame; the mathematical form of this model is as follows: ,in The image column coordinates (horizontal direction). The parameters are the image row coordinates (vertical direction, increasing from top to bottom). The coefficients are to be determined; the goal of the fitting is to minimize the weighted sum of squares of the residuals at each point, i.e., minimize... The weight Take the confidence level of the corresponding point. Solving the above least squares problem can be done by constructing normal equations or by using singular value decomposition to obtain the parameters. If the condition number of the coefficient matrix of the normal equation is greater than 10 6 If the matrix is ​​malformed, it is considered ill-conditioned. In this case, singular value decomposition (SVD) is used to find the least squares solution, and solutions less than 10 are selected. −4 The singular values ​​are set to zero to stabilize the numerical solution; simultaneously, the system calculates the root mean square error of the fit. ,like If the value is greater than 3.0 pixels, the detection result of the previous frame is considered unreliable. In this case, the system automatically backtracks and uses the initial point set generated by the line prior to refit.

[0022] After obtaining the fitted curve, the system divides the entire image into a first region and a second region; the first region is the strip-shaped area where the contact line is located, defined as the area in the image where the vertical distance to the fitted curve is less than a preset threshold. The set of pixels; due to the curve model The coordinates of each row are given. Contact line center column coordinates The vertical distance to the curve can be approximated as the absolute difference in the horizontal direction. Therefore, for each pixel row System calculation Then satisfy the following on the row. All pixels are marked as members of the first region; in this embodiment, The value is set to 1 / 20 of the image height, which is 54 pixels (1080 / 20); the first region generated in this way is a strip-shaped area with a width of 108 pixels along the contact line, covering the upper and lower edges of the contact line.

[0023] The second area is where the dropper is located. According to the standard design of railway catenary, the dropper connects the contact wire and the catenary, with the catenary directly above the contact wire. The vertical distance between the two is fixed at 1.2 meters in the physical world. By using camera calibration parameters (focal length, installation height, pitch angle, etc.), this actual distance can be converted into pixel distance in the image. In this embodiment, the conversion relationship is obtained in advance through on-site calibration, for example... Pixels; for each pixel row The system obtains the column coordinates of the contact line in the first region. , and then with Generate an array with a horizontal width of 100 pixels and a vertical height of [value missing] as the center point. The first rectangular region is defined by merging all the rectangular regions corresponding to all rows and cropping the portion that extends beyond the image boundaries (columns 0 to 1919, rows 0 to 1079). This results in the second region; in other words, the second region is a region offset upwards from the contact line position. A rectangular band covering the typical location of the suspension string; if the rectangle extends beyond the upper boundary, only the portion within the image is retained; if the height of the retained area is less than... If the rectangle corresponding to that row is not found, then discard it to avoid introducing noise into an excessively small area.

[0024] It is worth noting that the fixed evaluation direction of the second region is set to the horizontal direction. This is because the suspension wire is vertical in the image, and the normal direction (i.e., the gradient direction) of its edge is horizontal. Therefore, in subsequent steps, when calculating the directional gradient energy of the second region, a horizontal Sobel kernel will always be used without dynamic adjustment based on the local orientation. In contrast, the normal direction of the first region needs to be dynamically calculated based on the tangent direction at each local location of the contact line, the details of which are given in step S2.

[0025] Through the above division, the system isolates two key regions in each frame of the image that may contain different motion blur characteristics, laying the foundation for subsequent partition sharpness evaluation and selective detection. At the same time, since the band-like range of the first region depends on the detection results of the previous frame, the system will continuously update the edge point set through a feedback correction mechanism in subsequent steps, so that the region division gradually converges to a more accurate position as the train runs.

[0026] Step S2: Determine the local normal direction of the contact line in the first region and the fixed evaluation direction corresponding to the second region; calculate the directional gradient energy of the first region along the local normal direction and the directional gradient energy of the second region along the fixed evaluation direction, respectively. Based on step S1, the system has obtained the current frame image. The system also divides the data into a first region (contact line strip region) and a second region (suspender rectangular region). To evaluate the clarity of different regions, the optimal gradient direction needs to be selected based on their respective geometric orientations for energy calculation.

[0027] Determine the local normal direction of the contact line in the first region: Since the contact line is not completely horizontal in the image, but has a certain curvature (especially in the curved section), its normal direction changes with the image row coordinates; therefore, the system divides the first region into multiple horizontal strips along the vertical direction, and assumes that the direction of the contact line is approximately constant in each strip, thereby calculating the local normal direction corresponding to the strip.

[0028] Specifically, the height of the first region is Pixels, the system divides them into equal parts There are 1 horizontal stripe, and the height of each stripe is 1. pixels; for easier integer calculations, the actual height of each strip is rounded down to 5 pixels. The last strip may have a slight remainder, but this does not affect accuracy; for the ... Each band ( ), its central row coordinates The calculation is as follows: First, determine the minimum row coordinate of the first region. and maximum row coordinate (i.e., the row range covered by the fitted curve in step S1), then .

[0029] The system will Substitute the quadratic curve model obtained from the fitting in step S1 Use the derivative formula to calculate the slope of the tangent line at the center of the strip; the derivative formula is: .

[0030] The slope represents the instantaneous rate of change of the contact line at that point (the column coordinate changes with the row coordinate); then the tangent direction angle... The calculation formula (with the horizontal axis of the image as the reference, and counterclockwise as positive) is as follows: ; when hour, This indicates that the contact line is horizontal at that point, and the normal direction is perpendicular to the tangent; therefore, the normal direction angle is... for Then Standardization to Interval: If Subtract ,like Then add Due to the 180° symmetry of the gradient direction, this normalization does not affect the generation of the Sobel kernel.

[0031] The fixed evaluation direction corresponding to the second region is determined as follows: The second region is the area where the dropper is located. The dropper runs vertically in the image, and the normal direction of its edge (i.e., the direction of the most significant gradient change) is horizontal; therefore, in this embodiment, the fixed evaluation direction of the second region is set to horizontal, with a corresponding angle value of 0 radians (or according to the coordinate system convention). However, the standard form of the horizontal Sobel kernel is to detect vertical edges, which is actually used in practice. In subsequent calculations, the second region is not divided into strips, and the horizontal direction is always used as the gradient direction.

[0032] Calculate the orientation gradient energy of each region: After obtaining the orientation angle of each region (each strip of the first region and the entire second region), the system calculates the orientation gradient energy of that region; this energy reflects the edge strength of the image in that specific direction and can effectively eliminate the interference of noise from other directions.

[0033] The system views the current frame image. Median filtering preprocessing is performed to suppress isolated sensor noise. A 3×3 sliding window is used, and the median of the gray values ​​of all pixels within the window is taken as the new value of the center pixel to obtain the filtered image. This operation can remove salt and pepper noise without significantly blurring the edges.

[0034] Secondly, the system generates an adjustable Sobel convolution kernel for each region; the standard Sobel operator contains two 3×3 kernels: a horizontal kernel and a horizontal kernel. Used to detect vertical edges and vertical kernels. Used for detecting horizontal edges, it is defined as follows: ; For a given direction angle (For the stripes in the first region, For the second region, The system generates rotated convolution kernels through linear combination: ; Here, multiplication represents the product of a scalar and each element of the matrix, and addition represents element-wise addition; the physical meaning of this formula is to interpolate the standard horizontal kernel and the vertical kernel by angle to obtain... An edge detection operator with the maximum response in a given direction; to improve computational efficiency, the system can pre-calculate all possible angles at 5° intervals. And stored in a lookup table, which is used at runtime according to... Take the nearest pre-computed kernel.

[0035] Then, the system will generate a directionally adjustable Sobel core. Compared with the filtered image Perform convolution operations on the corresponding pixels in the first region; for each stripe in the first region, extract the pixels of that stripe in the first region. sub-images in (That is, all pixels belonging to the first region and whose row coordinates are within the stripe range), calculate the convolution: ; in Iterate through each pixel within the subimage. This is the offset index of the convolution kernel; That is, the direction of the pixel. The gradient magnitude is taken as an absolute value to ensure non-negativity; for boundary pixels, the missing pixel value is filled by mirror expansion (replicate), that is, copying the nearest boundary pixel value.

[0036] For the second region, sub-images are also extracted. ,use corresponding (Horizontal Sobel kernel) performs convolution to obtain the horizontal gradient magnitude of each pixel.

[0037] Noise threshold and energy accumulation: To eliminate the interference of image background noise on gradient energy calculation, the system pre-calculates a global noise threshold. The system first divides the image into 16×16 blocks, calculates the gray-level variance of each block, and selects the 5 blocks with the smallest variance as candidate flat regions. Then, it takes the average of the gradient magnitudes of all pixels in these blocks (unit: gray level / pixel, i.e., the absolute value of the gray-level difference between adjacent pixels), denoted as . Then the global noise threshold If flat areas cannot be automatically identified, the system simultaneously calculates a histogram of pixel gradient magnitudes across the entire image and takes the gradient value with a cumulative probability of 5% as the gradient. To prevent the threshold from being too low when the overall image is blurred, set... The minimum value is 1.0 (grayscale level / pixel), and the maximum value does not exceed 0.5 times the average gradient magnitude; in severely blurred scenes, This will maintain relative stability and avoid misjudging noise as valid edges; to prevent If extreme values ​​occur, the system sets the minimum value to 1.0 (grayscale level) and the maximum value to 0.5 times the average pixel gradient of the entire image; if neither of the above two methods can calculate a valid value (e.g., the image is completely black or completely white), the default setting will be used. And log 'Noise threshold estimation failed'.

[0038] For each region (or strip), the system iterates through all pixels in its sub-images, retaining only the gradient magnitude. The magnitudes of the pixels are summed to obtain the directional gradient energy of the region: ; If no pixels in the region exceed the threshold, then .

[0039] Through the above calculations, the system obtains a directional gradient energy value for each strip in the first region. To obtain an energy value for the second region. These energy values ​​will be used in step S3 to compare with historical benchmark values ​​to generate a sharpness index. It is worth noting that, since the first region is divided into finer stripes (20 strips), subsequent sharpness determination and defect detection are performed independently on a strip-by-strip basis. This allows for more precise handling of the differences in blurriness in different sections of the contact line (for example, in curved sections, only some strips may be blurred). The second region is treated as a whole because the number of hangers is small and their distribution is sparse, so fine-grained division is not required.

[0040] Step S3: Generate a sharpness index for each region based on the ratio of the directional gradient energy to the corresponding historical baseline gradient energy; mark the corresponding region as a sharp region or a non-sharp region based on the sharpness index of each region. In step S2, the system assigns each horizontal stripe (total) to the first region. The directional gradient energy of the current frame was calculated. The directional gradient energy was calculated for the entire second region. To determine whether each region is severely affected by motion blur in the current frame, the system needs to compare these current energies with their respective historical normal levels. To this end, the system maintains a set of state variables independently for each region, including a historical baseline gradient energy value and a counter for consecutive non-sharp frames.

[0041] Specifically, for the first region's... Each strip stores historical baseline gradient energy. and continuous non-clear frame counter For the second region, storage and The initial values ​​of all historical baseline gradient energies are set during the processing of the first frame of image after system startup: if the current region is being processed for the first time, the values ​​calculated in step S2 are directly used. Assign to and the counter The system then resets these state variables to zero; thereafter, the system updates these state variables according to the following rules.

[0042] To ensure numerical stability Then directly determine Otherwise, the sharpness index Defined as the ratio of the current directional gradient energy to the historical baseline gradient energy. , and if Then force setting ,in It is a very small positive number used to prevent division by zero errors; Sharpness index The physical meaning is: if the current edge strength is comparable to the historical normal level, then Approximately 1; if the current image is blurred, causing edge attenuation, then Significantly less than 1; conversely, if the light intensity is increased or the contrast is improved, It may be greater than 1.

[0043] To differentiate between different levels of blur and to handle the effects of changes in lighting, the system presets two thresholds: the first preset threshold... Second preset threshold In this embodiment, it was determined through extensive offline testing. , ;when When the region is considered sufficiently clear in the current frame, it is deemed suitable for direct defect detection; when At that time, it was considered that the area was too blurry to provide reliable information; when At that time, the area is considered to be in a slightly blurred state, usually caused by brief fluctuations in light or slight vibrations. The historical baseline is not updated, but it is not immediately marked as severely blurred.

[0044] The system is based on the resolution index The value executes the following state transition and update logic.

[0045] Scenario 1: (Clear State): At this point, the system determines that the region is clear. To ensure that the historical benchmark can smoothly track normal image texture changes (such as overall contrast drift caused by slow changes in the angle of sunlight), the system updates the historical benchmark gradient energy value according to the weighted moving average rule. Simultaneously, the system monitors the sharpness index of the current frame. Compared with historical average The deviation of (the average of the most recent 50 frames); if If this occurs consecutively for more than two frames, the weights will be temporarily updated. Increased to 0.2, then restored to 0.05 after 5 frames to adapt to sudden changes in lighting.

[0046] in To update the weighting factors, this embodiment takes... This means that the historical baseline gradually approaches the current measurement at a rate of 5% per frame, adapting to long-term trends without drastic jumps due to short-term fluctuations in a single frame; simultaneously, the system will continuously counter the non-clear frames. A zeroing status indicates that the area has returned to a normal, clear state.

[0047] Scenario 2: (Slightly blurred state): In this state, the system marks the area as slightly blurry. Since the sharpness index is below the sharpness threshold but has not yet fallen into the heavily blurred range, it is usually caused by brief overexposure or underexposure when a train passes through a tunnel entrance, or slight lens smudges. In this state, the currently measured directional gradient energy cannot represent the normal texture level and therefore should not be used to update the historical baseline (otherwise, the blurred state may be mistakenly learned as normal). The system maintains... Unchanged, while maintaining It remains unchanged, meaning the counter does not increment.

[0048] Scenario 3: (Severely blurred state): In this case, the system marks the area as severely blurry; this situation is usually caused by significant motion blur, severe lens occlusion, or extreme lighting conditions; the system also maintains... The continuous non-clear frame counter remains unchanged. Add 1.

[0049] Refinement of status labels and handling of missing data: Based on the above judgment results, the system assigns a clear and distinct status label to each region; specifically: when At that time, the label is "clear area".

[0050] when At that time, it was labeled as "slightly unclear area".

[0051] when At that time, it was labeled as "severely unclear area".

[0052] Furthermore, to prevent the detection results from being completely interrupted due to the inability to acquire clear images for an extended period of time, the system introduces a preset upper limit value. (In this embodiment, we take) For any region, when its consecutive non-clear frame counters... achieve When this occurs, it indicates that the region has been in a heavily blurred state for multiple consecutive frames, making it impossible to extract useful information from it. At this point, the system marks the region as a "data missing region" and performs a locking operation: locking the historical baseline gradient energy value of the region, meaning that even if data appears in subsequent frames... It also cannot update automatically. This is to prevent the judgment after the erroneous benchmark accumulated during the ambiguity period is restored to normal; at the same time, the system outputs a warning message, recording the starting frame number and mileage position of the area where data loss occurred.

[0053] When a region that was in a data-deficient state recovers to a clear state in a subsequent frame (i.e., reappears) When the system is unlocked, the historical baseline may be severely outdated (not updated for a long time). Therefore, the system will not be directly reset after unfreezing. Instead, set (like If multiple frames are locked, then Possibly outdated, changed to However, an additional frame of smoothing is added: the next frame still allows for rapid updates, i.e., temporarily... Increased to 0.3).

[0054] Through the above mechanism, the system can distinguish between fuzzy states of different severity, dynamically adjust the update strategy of historical benchmarks, and mark missing data in a timely manner in extreme cases to avoid error accumulation. All regions (including the 20 strips of the first region and the second region) execute the above state machine independently without interfering with each other. After step S3 is completed, each region obtains a clear label (clear region, slightly unclear region, heavily unclear region or missing data region) for selective feeding and cross-frame interpolation processing in step S4.

[0055] Step S4: Perform defect detection processing on the image regions marked as clear areas to obtain the first detection result; perform cross-frame interpolation processing on the image regions marked as non-clear areas based on the detection results of the corresponding regions in the temporally adjacent clear frames to obtain the second detection result; In step S3, the system generates a clear status label for each region (each horizontal strip of the first region and the entire second region), including clear regions, slightly unclear regions, heavily unclear regions, and regions with missing data; in step S4, different processing paths are executed according to these labels: for clear regions, defect detection is performed directly; for unclear regions (including slightly unclear, heavily unclear, and regions with missing data but still possible interpolation), cross-frame interpolation estimation is attempted using the detection results of adjacent clear frames.

[0056] Defect detection processing (clear area): For image sub-regions labeled as clear areas, the system inputs them into the corresponding defect detection module; the defect detection module in this embodiment consists of two independent sub-modules: contact wire wear detection sub-module and dropper clamp detection sub-module.

[0057] Specifically, when a horizontal stripe in the first region is marked as a clear region, the system retrieves the image from the current frame. Extract the sub-image corresponding to the strip (i.e., the pixels covered by the first region mask within the strip) and send it to the contact line wear detection submodule. This submodule is based on edge extraction and curve fitting methods: first, the Canny operator is used to detect the upper and lower edges of the contact line to obtain the edge point set; then, quadratic curves are fitted to the upper and lower edges respectively, and the vertical distance between the two curves is calculated as the remaining height of the contact line; this height is subtracted from the nominal height when there is no wear to obtain the wear width. (Unit: pixels). The detection module also outputs a confidence score. The confidence level is obtained by normalizing the mean gradient intensity during edge detection; the system will consider the wear width. and its confidence level As the first detection result, the timestamp of the current frame is recorded. .

[0058] When the second region is marked as a clear region, the system extracts a sub-image of the second region (the dropper rectangular region) and sends it to the dropper clamp detection sub-module. This sub-module uses a template matching method: it pre-stores a grayscale template image of a standard dropper clamp, slides the template in the sub-image, calculates the normalized cross-correlation (NCC) coefficient, and takes the position with the highest correlation coefficient as the clamp center coordinate; it then compares this coordinate with the theoretical center position of the dropper (determined by the midpoint of the line connecting the contact wire position and the catenary position) to calculate the offset. (Unit: pixels), and simultaneously outputs the correlation coefficient of the matched peak as the confidence level. .

[0059] The dropper clamp template is manually calibrated and averaged from multiple clear historical images, with a template size of 30×30 pixels. During matching, normalized cross-correlation (NCC) is calculated. If the correlation coefficient is greater than 0.7, the detection is considered successful; otherwise, a low confidence score is output.

[0060] The system stores the above detection results (including detection values, confidence levels, timestamps, and clear labels for each region of the current frame) into a loop detection result cache. The cache size is preset to 20 frames (if no valid clear frame is found in the cache, the system will further query earlier historical archives, but only data within the last 2 seconds to avoid excessive delay), and can store data of the last 10 frames before and after. Each cache record includes a timestamp, a list of wear widths of each strip of the contact wire, the offset of the dropper clamp, and clear labels for each area.

[0061] Cross-frame interpolation processing (non-sharp areas): For areas labeled as slightly non-sharp, heavily non-sharp, and areas marked as missing data but not yet completely impossible to interpolate (i.e., after the consecutive non-sharp frame counter reaches the preset upper limit, the system can still try to extrapolate using earlier sharp frames), the system does not call the defect detection module, but performs cross-frame interpolation processing; the core idea of ​​this processing is to use the detection results of the same area in temporally adjacent sharp frames to estimate the detection value of the current frame through linear interpolation or extrapolation, and at the same time calculate the uncertainty of the estimated value.

[0062] The system first maintains a cache of detection results sorted in ascending order of timestamps. It stores the detection results and their clear labels for all clear regions in the most recent frames; for a certain region in the current frame that needs interpolation... The system performs the following search and calculation steps.

[0063] Search forward: In In the process, the search proceeds in descending order of timestamps (from the most recent historical frame to the earlier historical frame) to find the timestamp. less than the current frame timestamp And the same area The latest frame that is marked as a clear region; record the detection value of that frame. and timestamp If such a frame does not exist, then and Marked as invalid.

[0064] Search backwards: In the process, the timestamp is searched in ascending order (searching from future frames; note that in real-time processing scenarios, the system may wait for subsequent frames to arrive before interpolation; this embodiment uses a delay processing mode that allows a maximum wait of 3 frames) to find the timestamp. Greater than the current frame timestamp And the same area The earliest frame that was marked as a clear region; record the detection value of that frame. and timestamp If such a frame does not exist, then and Mark as invalid; if the system cannot obtain subsequent frames in pure real-time mode, only the results of forward search are used.

[0065] Interpolation or extrapolation calculation: Different estimation methods are used depending on the number of valid frames found. Case A: Valid frames exist both forward and backward (i.e.) and All are effective, and At this point, the linear interpolation formula is used: ; Uncertainty Take half the absolute value of the difference between the previous and subsequent detection values, that is: ;like Milliseconds, then uncertainty Multiply by the original amount The scale is amplified to reflect the estimated risks associated with longer time intervals; The physical meaning of this uncertainty is: within the range of variation between clear frames, the error at the midpoint of the linear interpolation will not exceed half of this difference.

[0066] Case B: Only forward valid frames exist (i.e., only...) efficient, (Invalid); in this case, extrapolation is used, assuming that the detection values ​​between the current frame and the previous clear frame remain unchanged: Uncertainty ,in The nominal frame interval is 40ms. That is, with each additional frame of extrapolation distance, the uncertainty increases linearly, with a maximum limit of [missing value]. ; This is because, without subsequent clear frame constraints, the uncertainty of the estimate increases with the extrapolation distance, but it is simplified to a fixed ratio.

[0067] Case C: Only backward valid frames exist (i.e., only...) Effective, commonly seen when data is missing in the first or first few frames; in this case, reverse extrapolation is used: ; ; Case D: No valid frames exist forward or backward; in this case, no estimation can be made, the system marks the detection result of the region as "invalid", and records that the region cannot provide any detection information in the current frame.

[0068] Output interpolation results: The system will output the estimated values ​​obtained from the above calculations. and its uncertainty As the second detection result output, unlike the first detection result, the second detection result includes an identifier "estimate" and an uncertainty value, which is used by downstream alarm systems to make decisions based on the uncertainty (e.g., only when...). An alarm is only triggered when the threshold is exceeded.

[0069] Special handling for data missing areas: For extreme cases where a region marked as "data missing" in step S3 cannot be clearly detected for multiple consecutive frames (e.g., no clear frames for more than 10 frames), in addition to the interpolation process described above, the system will also record the time interval and mileage interval corresponding to the region, and add a "data missing" warning flag to the final output to remind maintenance personnel that the section cannot provide reliable detection results.

[0070] Through step S4 above, the system achieves direct and accurate detection of clear areas and intelligent interpolation compensation of unclear areas, effectively utilizing the temporal correlation information still available in the blurred frame and avoiding information loss caused by simple discarding; all detection results (including original detection values ​​and interpolated estimates) have clear source identification and confidence / uncertainty, providing complete data support for subsequent alarm and maintenance decisions.

[0071] Step S5: Output the first detection result and the second detection result.

[0072] In step S4, the system obtains the following detection results for each region: For clear regions, a first detection result is obtained, including the detection value (wear width). Or the offset of the suspension string ) and their confidence level For unclear regions (slightly unclear, heavily unclear, or regions with missing data but capable of interpolation), a second detection result is obtained, including estimated detection values. and its uncertainty For regions where interpolation is completely impossible, an invalid flag is obtained.

[0073] Step S5 is responsible for outputting these results in a structured and traceable manner for subsequent alarm decisions, data storage, or real-time display. At the same time, the system needs to adopt differentiated output strategies based on the source and reliability of the detection results.

[0074] Output data assembly and formatting: The system generates an output record for the current frame, which includes the frame number, timestamp, odometer, and detailed detection information for each region; specifically, for each horizontal stripe of the first region (total... (Number of output fields), including: stripe index. Detection value The confidence level type ("original measurement" or "interpolation estimate") and the corresponding numerical confidence level (output confidence level if it is an original measurement). If it is an interpolation estimate, then output the uncertainty. For the second region (suspender), the output fields include: detection value. Confidence type and confidence value.

[0075] Trustworthiness-based alarm decision-making: In order to transform the detection results into practical maintenance instructions, the system has a built-in alarm decision-making module; this module receives the detection results output in step S5 and adopts differentiated alarm thresholds according to different trustworthiness types.

[0076] For detection results originating from "raw measurements", the system directly compares the detection value with the yellow alarm threshold. Red alarm threshold ;like (For example, 3.0 pixels), then a yellow warning is triggered; if If the resolution is 4.0 pixels (e.g., 4.0 pixels), a red emergency alarm will be triggered.

[0077] For detection results sourced from "interpolation estimation", the system will determine the uncertainty. Incorporate judgment; specifically, the revised alarm judgment condition is defined as follows: ; This condition indicates that, considering the potential positive deviation of the estimated value, if the estimated value, after adding the uncertainty, still reaches the alarm threshold, then an alarm is triggered; otherwise, it is not triggered. Similarly, for a red emergency alarm, the condition is... This approach avoids underreporting due to underestimated values.

[0078] For example, suppose the alarm threshold is 3.0 pixels; if the estimated wear width of a certain strip is 2.8 pixels and the uncertainty is 0.3 pixels, then The system triggers a yellow alert; if the estimated value is 2.6 pixels and the uncertainty is 0.2 pixels, then... The system does not issue an alarm because the actual wear and tear may not have reached the threshold.

[0079] For areas marked as "invalid" (where no estimation can be made), the system outputs a "data missing" warning but does not trigger an alarm based on the detection value. At the same time, the system records the mileage interval of the missing area. When the cumulative mileage exceeds a preset length (e.g., 10 meters), a maintenance prompt is generated, suggesting that the section be manually checked.

[0080] Output storage and transmission: The system writes the output record of each frame to a circular log file on the local solid-state drive. The file is stored in segments according to date and line segment, and the data of the most recent 90 days is retained for post-event analysis. At the same time, the system sends alarm information (only yellow warning and above) to the ground monitoring center in real time through the vehicle wireless transmission module (4G / 5G). The data is compressed and encrypted before transmission. In order to adapt to bandwidth limitations, detailed records of raw measurement values ​​are only uploaded in batches via wired means after the vehicle returns to the depot, while interpolated estimates and data missing warnings are uploaded in real time with priority.

[0081] Data interaction with the feedback correction module: It is worth noting that in the first detection result output in step S5, for the contact line detection result in the clear area, the system will also include the precise contact line edge point set. The feedback correction module in step S1 is additionally passed to the edge point set, which is generated as an intermediate product by the wear detection submodule during the calculation of wear width. It contains the edge coordinates after sub-pixel interpolation. Before outputting the final detection result, step S5 will temporarily store the point set in shared memory for use by step S1 in the next frame when dividing the first region. This feedback mechanism ensures that the region division of subsequent frames can be based on more accurate contact line position information, forming a closed-loop optimization.

[0082] Anomaly Handling and Degraded Output: When the system detects that the sharpness index of a certain area is lower than the second preset threshold for multiple consecutive frames (e.g., more than 10 frames). If an effective estimate cannot be obtained through interpolation, step S5 will downgrade the status of the area from "interpolation estimate" to "severe missing" and add a flag "severe_missing=true" to the output record. After receiving this flag, the ground monitoring center will prompt the maintenance personnel that there may be a continuous image acquisition failure in this section (such as lens dirt, camera defocus, etc.) and an on-site inspection needs to be arranged.

[0083] In addition, if the system finds that all regions in the current frame (including all stripes in the first region and the second region) are marked as missing or invalid data, it determines that the entire frame image is completely unusable. At this time, step S5 only outputs a very simple frame header information (frame number, timestamp, mileage) and a "frame invalid" flag, and skips the output of all detection values ​​to save storage and transmission resources.

[0084] Through step S5 above, the system realizes a complete data chain from raw detection data to structured output, from measured values ​​to alarm decisions, and from real-time transmission to offline storage. All outputs have clear source identification and credibility information, enabling downstream systems to distinguish between the three states of "direct measurement", "interpolation estimation" and "data missing" and take reasonable maintenance actions accordingly. At the same time, the output of feedback correction data provides key spatial prior information for step S1, forming a closed-loop iterative optimization of the entire system.

[0085] The steps S1 to S5 above constitute a complete zonal adaptive inspection method. By dividing the image into contact line regions and dropper regions, and calculating the directional gradient energy along the local normal direction and the fixed evaluation direction respectively, this method can filter out edge information that is insensitive to motion blur based on the actual geometric orientation of each region. Furthermore, by comparing the current directional gradient energy with the historical baseline gradient energy, and combining dynamic thresholds and state machine management, the system can distinguish between clear regions, slightly blurred regions, heavily blurred regions, and data missing states, thereby achieving differentiated processing strategies: clear regions directly perform defect detection, unclear regions obtain estimates with uncertainty through cross-frame interpolation, and data missing regions trigger warnings. As a result, the usable local clear information in blurred frames that would otherwise be discarded as a whole frame is effectively reused, the temporal continuity of the detection results is maintained, the missed detection rate of contact line wear and dropper clamp offset is significantly reduced, and false alarms caused by interpolation estimation are avoided through uncertainty propagation, providing continuous, reliable, and traceable defect data support for contact network operation and maintenance.

[0086] Example 2: Figure 2 As shown, this embodiment provides a visual inspection-based contact network 2C inspection system, which is used to execute the method of Embodiment 1 above; the system includes a hardware layer and a software functional module layer, wherein the hardware layer includes at least the following components: Image acquisition unit: The image acquisition unit consists of one or two vehicle-mounted industrial cameras, installed on the roof of the train or the top of the driver's cab, continuously acquiring grayscale images of the contact wire support device and suspension components at a fixed frame rate (25 frames / second in this embodiment); the camera uses a global shutter sensor with a resolution of not less than 1920×1080 pixels, and the exposure time can be automatically adjusted but not exceeding 1 / 2000 second to reduce motion blur; the camera is connected to the vehicle-mounted processing unit through Cameralink or GigE interface, and simultaneously receives synchronous trigger signals from the train control system (such as mileage pulses generated by wheel axle sensors) to ensure accurate alignment of the image with mileage information.

[0087] Onboard Processing Unit: The onboard processing unit is an embedded industrial control computer or a high-performance onboard computer, containing the following hardware: Processor: Multi-core CPU (clock speed not less than 2.0GHz) or edge computing acceleration chip (such as NVIDIA Jetson series), used to execute all algorithm logic of steps S1 to S5 as described in Embodiment 1.

[0088] Memory: No less than 8GB, used to store the current frame image, intermediate calculation results (such as fitting curve parameters, directional gradient energy, sharpness index, state variable cache, etc.) and detection result cache.

[0089] Non-volatile storage: Solid-state drive with a capacity of at least 512GB, used for circular storage of detection result logs, raw images (optional), and system configuration parameters. The storage uses a circular buffer to retain data from the most recent 90 days.

[0090] Communication interface: 4G / 5G wireless communication module, used to upload alarm information to the ground monitoring center in real time; it also has an Ethernet interface for batch data export after vehicles return to the depot.

[0091] Positioning and synchronization unit: GNSS receiver: Provides the train's geographical location (longitude, latitude) and accurate timestamp, with a sampling frequency of not less than 10Hz.

[0092] Odometer: Utilizing wheel axle speed sensors or radar speed sensors, it provides the train's travel distance (resolution not less than 0.1 meters) for association with image frames.

[0093] Data fusion module: It fuses GNSS signals and odometer data using Kalman filtering to generate smooth mileage and timestamps, maintaining short-term accuracy even when passing through areas where GNSS signals are lost, such as tunnels.

[0094] The software functional module layer includes multiple software functional modules: the system runs multiple software functional modules on the aforementioned hardware platform, each module corresponding to one or more steps in Embodiment 1; specifically including: Image Acquisition and Preprocessing Module: This module is responsible for acquiring raw image frames from the camera, performing median filtering preprocessing (kernel size 3×3), and storing the filtered image in a memory queue. Simultaneously, this module binds the timestamp and mileage information of the current frame to the image data, forming an image frame with metadata.

[0095] Contact line geometry fitting and region segmentation module: This module performs the function of step S1 in Example 1; it includes: The touch line edge point set cache stores the sub-pixel edge points detected in the previous frame and their confidence levels.

[0096] The weighted least squares fitting submodule is used to calculate the parameters of the quadratic curve. .

[0097] The region mask generation submodule generates the mask based on the fitted curve and the preset vertical distance. Generate a mask for the first region (contact line strip area); based on a fixed vertical distance Generate a mask for the second region (the hanging string rectangular region).

[0098] Directed gradient energy calculation module: This module performs the function of step S2 in Embodiment 1; it includes: The orientation-adjustable Sobel kernel generation submodule pre-calculates convolution kernels in all directions at 5° intervals and stores them in a lookup table.

[0099] The normal direction calculation submodule divides the first region into 20 horizontal strips and calculates the normal direction angle of each strip according to the quadratic curve derivative formula.

[0100] The gradient energy accumulation submodule performs directional convolution on each strip and the second region separately, and utilizes a global noise threshold. Filter valid pixels and output directional gradient energy. .

[0101] Sharpness Assessment and State Machine Module: This module performs the function of step S3 in Embodiment 1; it includes: Historical baseline storage units independently maintain historical baseline gradient energy for each region (20 strips + 1 dropper region). and continuous non-clear frame counter .

[0102] The sharpness index calculation submodule, based on calculate.

[0103] The state transition submodule implements the switching between four states: clear, slightly blurry, heavily blurry, and missing data, as well as the baseline update / locking logic.

[0104] Defect Detection Module: This module performs the detection task of the clear area in step S4 of Embodiment 1; it includes two sub-modules: Wear detection submodule: Input a sub-image of the first region, use Canny edge detection and quadratic curve fitting, and output the wear width. and confidence level.

[0105] Dropper clamp detection submodule: Input a sub-image of the second region, use normalized cross-correlation template matching (template size 30×30, matching threshold 0.7), and output the offset. The correlation coefficient is used as the confidence level. The matching threshold is obtained through offline experimental calibration: 1000 clear images of the string under different lighting conditions are collected, and the normalized cross-correlation (NCC) coefficient of the correct matching position in each image is calculated, resulting in a mean of 0.82 and a standard deviation of 0.06. The mean minus twice the standard deviation, 0.70, is taken as the threshold to ensure that no false matches occur in more than 99% of normal images. This threshold can be adjusted through the configuration file according to the actual application scenario.

[0106] Cross-frame interpolation module: This module performs the interpolation task for the non-sharp areas in step S4 of embodiment one; internally, it includes: a detection result cache, which cyclically stores the detection results of the most recent 20 frames (including timestamps, detection values, and sharpness labels); and a search submodule, which searches forward and backward for the detection values ​​of the most recent sharp frames in the same area. , And the corresponding timestamp.

[0107] The interpolation calculation submodule performs linear interpolation or extrapolation based on the number of valid frames and calculates the uncertainty. .

[0108] Alarm Decision Module: This module performs the function of step S5 in Embodiment 1; it includes: The data formatting submodule assembles the detection results of each frame into JSON or Protobuf format.

[0109] The alarm decision module determines whether to trigger an alarm based on the detected value and its confidence / uncertainty, combined with preset alarm thresholds (yellow warning for wear width ≥ 3.0 pixels, red emergency alarm for ≥ 4.0 pixels; warning for dropper offset ≥ 2.0 pixels). For interpolated estimated values, it uses... As an alarm condition.

[0110] The storage write submodule writes the output records to a circular log file on the local solid-state drive.

[0111] The wireless transmission submodule transmits alarm information and key frame image thumbnails to the ground monitoring center in real time via 4G / 5G.

[0112] Feedback Correction Module: This module performs the feedback correction function mentioned in steps S4 and S5 of Embodiment 1. When at least one stripe in the first region is marked as a clear area, this module extracts a precise set of contact line edge points from the intermediate results of the contact line wear detection submodule. It is then passed to the edge point set cache of module 2 to replace the point set of the previous frame for quadratic curve fitting in the next frame.

[0113] Ground Monitoring Center: The ground monitoring center includes a data server, monitors, and maintenance terminals. It receives alarm information from the onboard processing units of each train via a wireless network, categorizes and stores alarms by line, mileage, and time, and displays them in real time on an electronic map. When a "data missing" warning is received, a maintenance work order is automatically generated, notifying on-site inspection personnel to go to the corresponding section to check for camera or line abnormalities.

[0114] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined in the claims, all of which should fall within the protection scope of the present invention.

[0115] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0116] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for visual inspection-based 2C inspection of a contact network, characterized in that, Includes the following steps: The current frame image captured by the vehicle-mounted camera is acquired, and the current frame image is divided into at least a first region and a second region, wherein the first region is the strip-shaped region where the contact wire is located, and the second region is the region where the dropper is located; Determine the local normal direction of the contact line within the first region, and determine the fixed evaluation direction corresponding to the second region; calculate the directional gradient energy of the first region along the local normal direction and the directional gradient energy of the second region along the fixed evaluation direction, respectively. Based on the ratio of the directional gradient energy of each region to the corresponding historical baseline gradient energy, a sharpness index is generated for each region. Based on the sharpness index of each region, the corresponding region is marked as a sharp region or a non-sharp region; For image regions marked as clear areas, defect detection processing is performed to obtain the first detection result; for image regions marked as non-clear areas, cross-frame interpolation processing is performed based on the detection results of the corresponding regions in temporally adjacent clear frames to obtain the second detection result. Output the first detection result and the second detection result.

2. The visual detection-based inspection method of the overhead contact line 2C according to claim 1, characterized in that, The step of dividing the current frame image into at least a first region and a second region specifically includes: obtaining the set of contact line edge points detected in the previous frame image and the detection confidence of each point; fitting a quadratic curve model using the weighted least squares method based on the set of contact line edge points and the detection confidence; determining the strip-shaped region formed by pixels in the image that are less than a preset vertical distance from the quadratic curve as the first region; determining the column coordinates of the contact line in each pixel row according to the quadratic curve, and generating a rectangular region by shifting upwards based on the preset vertical distance between the contact line and the catenary cable, using the column coordinates as a reference, as the second region.

3. The visual detection-based overhead contact line 2C inspection method according to claim 2, characterized in that, The steps for determining the local normal direction of the contact line within the first region specifically include: dividing the first region into multiple horizontal strips along the vertical direction; for each horizontal strip, obtaining its center row coordinates, and substituting them into the derivative formula of the quadratic curve model to calculate the tangent slope of the contact line at the center of the strip; calculating the tangent direction angle of the contact line at the center of the strip based on the tangent slope; and increasing the tangent direction angle by 90 degrees to obtain the local normal direction angle of the strip.

4. The contact wire 2C inspection method based on vision detection according to claim 1, characterized in that, The steps for calculating the directional gradient energy of each region include: performing median filtering preprocessing on the current frame image to obtain a filtered image; obtaining the orientation angle corresponding to the region, wherein when the region is a first region, the orientation angle is the angle value of the local normal direction, and when the region is a second region, the orientation angle is the angle value corresponding to the fixed evaluation direction; performing a linear combination of the standard horizontal Sobel kernel and the standard vertical Sobel kernel according to the orientation angle to generate an orientation-adjustable Sobel convolution kernel; performing a convolution operation between the orientation-adjustable Sobel convolution kernel and the pixels in the region of the filtered image to obtain the orientation gradient magnitude of each pixel; obtaining a global noise threshold, and accumulating the magnitudes of all pixels in the region whose orientation gradient magnitude exceeds the global noise threshold to obtain the orientation gradient energy of the region.

5. The contact wire 2C inspection method based on vision detection according to claim 1, characterized in that, The steps for generating a sharpness index for each region based on the ratio of the directional gradient energy to the corresponding historical baseline gradient energy include: storing a historical baseline gradient energy value and a continuous non-sharp frame counter for each region; calculating the ratio of the current frame's directional gradient energy to the historical baseline gradient energy value as the sharpness index for that region; when the sharpness index is greater than or equal to a first preset threshold, updating the historical baseline gradient energy value according to a weighted moving average rule and resetting the continuous non-sharp frame counter to zero; when the sharpness index is less than the first preset threshold but greater than or equal to a second preset threshold, keeping the historical baseline gradient energy value unchanged and not updating the counter; when the sharpness index is less than the second preset threshold, keeping the historical baseline gradient energy value unchanged and incrementing the counter by one.

6. The contact wire 2C inspection method based on vision detection according to claim 5, characterized in that, The step of marking a region as a clear region or a non-clear region based on the clarity index of each region includes: marking the region as a clear region when the clarity index is greater than or equal to the first preset threshold; marking the region as a slightly non-clear region when the clarity index is less than the first preset threshold but greater than or equal to the second preset threshold; marking the region as a severely non-clear region when the clarity index is less than the second preset threshold; marking the region as a data missing region when the consecutive non-clear frame counter reaches a preset upper limit value, and locking the update of the historical baseline gradient energy value; and unlocking the region when it recovers to a clear region in a subsequent frame.

7. The contact wire 2C inspection method based on vision detection according to claim 1, characterized in that, The cross-frame interpolation process includes: maintaining a cache that stores the timestamps, detection results, and clear markings of each frame; for the current non-clear region, searching forward in the cache to obtain the first detection value and first timestamp whose timestamp is less than the current frame and whose region is marked as clear, and searching backward to obtain the second detection value and second timestamp whose timestamp is greater than the current frame and whose region is marked as clear; when both the first and second frames exist, performing linear interpolation on the first and second detection values ​​according to the ratio of the current timestamp to the first and second timestamps to obtain an estimated value, and using half the absolute value of the difference between the two detection values ​​as the uncertainty; when only the first frame exists, using the first detection value as the estimated value and using the product of this value and a preset extrapolation error ratio as the uncertainty; and outputting the estimated value and its uncertainty.

8. The contact wire 2C inspection method based on vision detection according to claim 3, characterized in that, It also includes a feedback correction step: when at least one sub-region in the first region of the current frame is marked as a clear region, the contact line edge point set of the current frame is extracted from the result of the defect detection process; the contact line edge point set detected in the previous frame image is replaced with the contact line edge point set of the current frame for quadratic curve fitting of the next frame image.

9. The contact wire 2C inspection method based on vision detection according to claim 1, characterized in that, The fixed evaluation direction corresponding to the second region is horizontal; the second region is the area where the dropper is located, the dropper is vertical in the image, and the normal direction of its edge is horizontal; the second region is a rectangular area offset upward by a preset vertical distance from the contact line position in the first region.

10. A visual inspection-based contact network 2C inspection system, characterized in that, Includes a processor, which executes the visual inspection-based contact network 2C inspection method as described in any one of claims 1-9.