Method, system and device for calculating the residual of a catenary component of a railway based on pixel density

CN122598002APending Publication Date: 2026-08-18中国铁路北京局集团有限公司天津供电段 +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0004]为了解决现有技术中的上述问题,即传统方法无法实现对余量状态的持续监测和动态分析,只能在特定时间点进行静态评估,很难对结构的变化趋势和隐患进行及时发现和预警的问题,本发明提供了一种基于像素密度的铁路接触网部件余量计算的方法、系统及设备

Benefits of technology

自动化程度高:图像获取与处理:通过自动化的图像采集设备和预处理算法,能够快速准确地定位到待检测的接触网部件,并提取出用于计算余量的关键区域。这减少了人工干预的需求,提高了工作效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122598002A_ABST
    Figure CN122598002A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of image processing, and particularly relates to a method, system and device for calculating the residual amount of railway catenary components based on pixel density, aiming to solve the problem of difficult timely discovery and early warning of the changing trend and hidden danger of the structure. The present application comprises: obtaining an image of a region of interest; dividing the image of the region of interest into grid units of a preset density, calculating the pixel density value of each grid unit, and taking the region where the grid unit with the highest density value is located as a connection point region; extracting the line edge features of the connection point region, obtaining the coordinates of each line intersection point as the connection point coordinates; calculating the length from the connection point to the residual amount point, and judging whether the catenary component needs to be repaired according to the proportion of the length in the column top height and in combination with a preset threshold value. The present application improves the detection accuracy, can timely warn, reduces the labor cost and risk, and ensures the safety of personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing, and specifically relates to a method, system and equipment for calculating the margin of railway catenary components based on pixel density. Background Technology

[0002] The locations where the horizontal and oblique cantilever arms connect, the locations where the positioner connects to the positioning tube, and the distance between the positioner and the outermost edge of the contact wire—when the allowance is less than zero, components will detach, causing malfunctions. Traditional allowance calculation methods generally rely on manual measurement and analysis, which has the following problems: The measurement process is cumbersome and time-consuming, requiring engineers to personally go to the site to manually measure various dimensions and angles. This is not only inefficient but also easily affected by complex on-site environmental conditions, resulting in significant measurement errors. Manual judgment and calculation are easily influenced by subjective factors; measurement results and analysis conclusions between different engineers may vary significantly, lacking scientific rigor and repeatability. Traditional methods cannot achieve continuous monitoring and dynamic analysis of the allowance status; they can only perform static assessments at specific points in time, making it difficult to promptly detect and warn of structural changes and potential hazards.

[0003] Based on this, the present invention proposes a method, system and equipment for calculating the margin of railway catenary components based on pixel density. Summary of the Invention

[0004] To address the aforementioned problems in existing technologies, namely that traditional methods cannot achieve continuous monitoring and dynamic analysis of the margin status and can only perform static evaluations at specific points in time, making it difficult to promptly detect and warn of structural changes and potential hazards, this invention provides a method, system, and equipment for calculating the margin of railway catenary components based on pixel density.

[0005] In a first aspect, the present invention provides a method for calculating the margin of railway catenary components based on pixel density, the method comprising:

[0006] Obtain an image of the contact wire component whose remaining capacity is to be calculated, obtain the region of interest in the image, and perform image preprocessing to obtain the region of interest image; The region of interest image is divided into grid cells of a preset density, the pixel density value of each grid cell is calculated, and the region where the grid cell with the highest density value is located is taken as the connection point region. Extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; Based on the coordinates of the connection point and the coordinates of the outer edge of the margin, the length from the connection point to the margin point is calculated. Based on the proportion of the length in the column top height, and combined with a preset threshold, it is determined whether the contact wire component needs maintenance.

[0007] Furthermore, the method for obtaining the region of interest image is as follows: A margin position recognition model is constructed, and the margin position recognition model is trained based on a dataset; wherein, the dataset consists of images of various types, sizes, and materials of contact wire components with margins taken under different angles, lighting, and environmental conditions; The contact wire component whose surplus needs to be calculated is input into the trained surplus location recognition model to obtain the surplus area image; The region of interest is segmented from the surplus region image, and the region of interest is a portion of the surplus component itself; The region of interest is preprocessed to obtain the region of interest image.

[0008] Furthermore, the preprocessing methods include image scaling and cropping, color space conversion, histogram equalization, filtering, and data augmentation.

[0009] Furthermore, the pixel density value of each grid cell is calculated as follows: Calculate the number of black pixels in each grid cell and divide it by the area of ​​the grid cell to obtain the pixel density value of that grid cell.

[0010] Furthermore, the line edge features are obtained based on edge detection operators.

[0011] Furthermore, the coordinates of the outermost point of the margin are obtained based on a corner detection algorithm.

[0012] Furthermore, the method for determining whether the contact wire component needs maintenance by combining a preset threshold is as follows: Based on the proportion p of the aforementioned length in the column top height: ; Where t is the length from the connection point to the allowance point, and T is the height of the column top; If the percentage is less than the first preset threshold, the contact wire component needs to be given special attention; if the percentage is less than the second preset threshold, the contact wire component needs to be repaired; if the percentage is greater than the first preset threshold, the contact wire component is in good condition. Wherein, the first preset threshold is greater than the second preset threshold.

[0013] In a second aspect, the present invention proposes a system for calculating the margin of railway catenary components based on pixel density, and a method for calculating the margin of railway catenary components based on pixel density. The system includes: The region of interest (ROI) image acquisition module is configured to acquire an image of the contact wire component whose remaining capacity is to be calculated, acquire the ROI in the image, and obtain the ROI image after image preprocessing. The connection point region acquisition module is configured to divide the image of the region of interest into grid cells of a preset density, calculate the pixel density value of each grid cell, and take the region where the grid cell with the highest density value is located as the connection point region. The coordinate acquisition module is configured to extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; The maintenance module is configured to calculate the length from the connection point to the margin point based on the coordinates of the connection point and the coordinates of the margin outer point, and determine whether the contact wire component needs maintenance based on the proportion of the length in the column top height and a preset threshold.

[0014] A third aspect of the present invention provides an electronic device comprising: At least one processor; and A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor to implement a method for calculating the margin of railway catenary components based on pixel density.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer instructions for execution by a computer to implement a method for calculating the margin of railway catenary components based on pixel density.

[0016] The beneficial effects of this invention are: High degree of automation: Image acquisition and processing: Through automated image acquisition equipment and preprocessing algorithms, the contact wire components to be inspected can be located quickly and accurately, and key areas for calculating allowances can be extracted. This reduces the need for manual intervention and improves work efficiency.

[0017] Significantly improved accuracy: Utilizing pixel density analysis in computer vision, the system can assess the wear condition of contact wire components at the sub-millimeter level. Compared to traditional manual measurement, this method is not only faster but also significantly improves measurement accuracy, unaffected by human factors.

[0018] Continuous monitoring and dynamic analysis capabilities: By meshing the region of interest and updating the pixel density value of each grid cell in real time, the system enables continuous monitoring of the status of overhead contact line components. This dynamic data collection method allows the system to capture trends in structural changes and provide early warnings of potential faults.

[0019] Enhanced scientific rigor and repeatability: Relying on objective, quantitative data provided by computer vision technology for margin assessment avoids inconsistencies in results caused by differences in individual experience among different engineers. Each test result is based on the same set of standard procedures and technical parameters, ensuring consistency and reliability.

[0020] High integration and strong adaptability: This method was designed with compatibility with other monitoring systems in mind. It can be easily integrated into existing railway maintenance and management systems via API interfaces to achieve data sharing and coordinated control. Furthermore, it is applicable to various types of overhead contact line structures, exhibiting excellent versatility and scalability.

[0021] Reduced labor costs and risks: With the help of remote image transmission technology and automated analysis methods, most tasks can be completed in the background, significantly reducing the frequency and intensity of on-site work. This improves work efficiency while effectively reducing the chances of workers being exposed to hazardous environments, thus ensuring personnel safety.

[0022] Optimized maintenance strategy: Based on pre-set safety thresholds, the system can automatically determine which components require immediate repair or replacement, and which can continue to be used for a period of time. This not only allows for the rational allocation of maintenance resources but also maximizes equipment lifespan and reduces costs. Attached Figure Description

[0023] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the region of interest for a method of calculating the margin of railway catenary components based on pixel density according to the present invention. Figure 2 yes Figure 1 Enlarged image; Figure 3This is a region of interest image after preprocessing in a method for calculating the margin of railway catenary components based on pixel density according to the present invention; Figure 4 This is a schematic diagram of the connection point area of ​​a method for calculating the margin of railway catenary components based on pixel density according to the present invention. Figure 5 This is a schematic diagram of obtaining connection points in a method for calculating the margin of railway catenary components based on pixel density according to the present invention; Figure 6 This is a schematic diagram of the outer point of the margin in a method for calculating the margin of railway catenary components based on pixel density according to the present invention. Figure 7 This is a schematic diagram of the connection between the connection point and the outer point of the margin in a method for calculating the margin of railway catenary components based on pixel density according to the present invention. Detailed Implementation

[0024] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0026] This invention provides a method for calculating the margin of railway catenary components based on pixel density, the method comprising: Obtain an image of the contact wire component whose remaining capacity is to be calculated, obtain the region of interest in the image, and perform image preprocessing to obtain the region of interest image; The region of interest image is divided into grid cells of a preset density, the pixel density value of each grid cell is calculated, and the region where the grid cell with the highest density value is located is taken as the connection point region. Extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; Based on the coordinates of the connection point and the coordinates of the outer edge of the margin, the length from the connection point to the margin point is calculated. Based on the proportion of the length in the column top height, and combined with a preset threshold, it is determined whether the contact wire component needs maintenance.

[0027] To more clearly explain the method for calculating the margin of railway catenary components based on pixel density according to the present invention, the following is in conjunction with... Figures 1-7 The embodiments of the present invention will be described in detail below: Obtain an image of the contact wire component whose remaining capacity is to be calculated, obtain the region of interest in the image, and perform image preprocessing to obtain the region of interest image; The method for obtaining the region of interest image is as follows: A margin position recognition model is constructed, and the margin position recognition model is trained based on a dataset; wherein, the dataset consists of images of various types, sizes, and materials of contact wire components with margins taken under different angles, lighting, and environmental conditions; The contact wire component whose surplus needs to be calculated is input into the trained surplus location recognition model to obtain the surplus area image; The region of interest is segmented from the surplus region image, and the region of interest is a portion of the surplus component itself; The region of interest is preprocessed to obtain the region of interest image.

[0028] The preprocessing methods include image scaling and cropping, color space conversion, histogram equalization, filtering, and data augmentation.

[0029] In this embodiment, to meet the needs of intelligent detection and evaluation of surplus materials based on computer vision technology, we will focus on constructing a large-scale, high-quality surplus material image dataset. This dataset will contain images of surplus materials of various models, sizes, and materials, taken under different angles, lighting conditions, and environmental conditions. The dataset was compiled by a professional photography team that systematically photographed the locations of surplus materials in use at construction sites from all angles and under various lighting conditions. Surplus material image data provided by industry experts and relevant companies will also be collected, covering samples of different types and states. For the collected basic image data, digital enhancement techniques such as rotation, scaling, and noise addition will be used to further expand the dataset. Through these methods, a dataset covering a massive and diverse range of surplus material images will be constructed. This will provide a solid foundation for the subsequent training and validation of deep learning-based intelligent detection algorithms, laying the groundwork for a more accurate and automated surplus material evaluation method.

[0030] The margin location identification model in this embodiment uses the advanced deep learning object detection algorithm YOLO to automatically identify the margin location of railway equipment. Through steps such as data collection and preprocessing, model training and optimization, real-time detection, and performance evaluation, it achieves fast and accurate margin detection, significantly improving the efficiency and reliability of railway power supply equipment monitoring. It also has strong portability and scalability, and in the future, it can be combined with cutting-edge technologies such as machine vision and the Internet of Things to build a more intelligent railway equipment status management system. The detection results are as follows: Figure 2 As shown.

[0031] After constructing a large-scale dataset of images of surplus areas, the next step is to effectively extract and preprocess the Regions of Interest (ROIs) from these original images. This step is crucial for subsequent image analysis and algorithm training. First, we need to accurately segment the ROI regions of the surplus areas themselves from the original images. In this way, we can automatically and efficiently extract the core regions of the surplus areas from a large number of complex background images, laying the foundation for subsequent processing. Second, we will perform a series of preprocessing operations on the images within the ROI regions to improve data quality and algorithm performance. This includes: Image scaling and cropping: normalizing the ROI regions to a uniform size and removing irrelevant information. Color space conversion: converting the image from the RGB color space to a space more conducive to feature extraction, such as HSV, LAB, etc. Histogram equalization: enhancing image contrast and highlighting key details. Filtering: applying Gaussian blur, median filtering, and other methods to remove noise and smooth the image. Data augmentation: expanding the dataset using random rotation, flipping, affine transformation, and other techniques to improve the model's generalization ability. The ROI regions and preprocessed images are shown below. Figure 3 and Figure 4 As shown.

[0032] The region of interest image is divided into grid cells of a preset density, the pixel density value of each grid cell is calculated, and the region where the grid cell with the highest density value is located is taken as the connection point region. like Figure 5 As shown in this embodiment, structural analysis of the surplus portion reveals that the black pixel density per unit area typically reaches its highest at the connection points where two structures intersect. Therefore, we can further explore the characteristics of these connection points to better understand the geometry and material properties of the surplus. Specifically, we can perform detailed pixel density analysis on the detected surplus targets.

[0033] First, each target region in the margin detection results is divided into smaller grid cells. Then, the number of black pixels in each grid cell is calculated and divided by the grid cell area to obtain the pixel density value of that cell. By comparing and analyzing the pixel density of each grid cell, we can find the region with the highest density, which is the location of the connection point.

[0034] Specifically, the region of interest image is divided into grid cells of a preset density. The grid density is dynamically calculated based on image feature parameters, including image resolution, edge distribution entropy, and component structural complexity. The grid cell size G is determined using the following formula: ; W and H are the pixel counts of the width and height of the region of interest image, respectively; Ee= ∑(pilogpi) is the entropy value of the edge pixel distribution; pi is the edge proportion of each sub-region; For component structural complexity, , For standard part dimensions, , and All are preset adjustment coefficients. In this embodiment, C is preferably 25. The preferred value is 0.6. The preferred value is 1.2; The key structural dimensions of the contact wire components actually detected from the region of interest image can be calculated using endpoint coordinates and scaling. The key structures include pipe length.

[0035] The range of values ​​for the mesh element size G is constrained as follows: .

[0036] This adaptive mesh algorithm achieves the following through multi-feature fusion, physical constraints, and dynamic response mechanisms: Significant improvement in accuracy: The error in the allowance calculation under complex working conditions is controlled within ±1.5mm; Efficiency optimization: Calculation time is reduced by 30%-50%, meeting the real-time inspection needs of high-speed railways; Enhanced robustness: The false detection rate is reduced to below 5% in scenarios such as changes in lighting and component deformation.

[0037] Technological advancement: Compared with the traditional fixed grid method, its innovation lies in the joint modeling of image features and physical parameters, which solves the industry pain point of "precision-efficiency" in the inspection of catenary components.

[0038] In this embodiment, the area calculation process for the grid cells is as follows: Since each pixel corresponds to a fixed spatial proportion in the image, the actual area represented by each pixel can be defined based on the physical size of the image or a known scale.

[0039] The total area of ​​a grid cell can be obtained by multiplying the number of non-background pixels within the grid cell by the actual area represented by a single pixel.

[0040] This connection point feature analysis not only helps us more accurately locate critical parts of the allowance, but also provides valuable clues for subsequent defect detection and condition assessment. For example, the material properties and mechanical behavior of the connection point area are often closely related to the overall structure, and any abnormalities may indicate potential safety hazards in the equipment.

[0041] Therefore, in-depth analysis of connection point characteristics is crucial for improving the accuracy and reliability of margin monitoring. By combining techniques such as target detection and pixel density analysis, we can gain a more comprehensive understanding of the physical characteristics of margins, laying a solid technical foundation for intelligent and automated condition management of railway equipment.

[0042] Extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; Figure 5 The detection results shown only provide a bounding box, while our ultimate goal is to precisely locate the connection points. To achieve this, we need to further optimize the analysis algorithm based on basic object detection, refining the coarse bounding box results to the precise coordinates of the connection points. First, we can perform a more detailed pixel-level analysis of the detected bounding box. By calculating the pixel density of each grid cell, as mentioned earlier, we can find the region with the highest density, which is the location of the connection point.

[0043] However, this analysis based on the entire rectangular bounding box may still have some errors, as the connection points only occupy a small portion of the area within the box. To further improve positioning accuracy, we can try introducing an auxiliary algorithm based on edge detection. Specifically, we first use the Canny edge detection operator or a similar method to extract obvious line edge features within the detection box. Then, by analyzing the intersection points of these edge features, we can obtain more accurate connection point coordinates. This hybrid method combining object detection and edge analysis can fully utilize the geometric information in the image, overcome the limitations of a single algorithm, and provide more accurate and reliable positioning results. Furthermore, we can introduce prior knowledge or empirical rules to further optimize connection point detection. For example, by combining a thorough understanding of the railway equipment structure, we can set geometric constraints that the connection point positions should satisfy, thereby narrowing the search range and improving the accuracy and stability of positioning.

[0044] In summary, by continuously optimizing the algorithm details, we can accurately pinpoint the specific coordinates of connection points from coarse bounding box detection results. This precise positioning technology not only better supports subsequent defect analysis and condition assessment but also lays a solid foundation for intelligent railway equipment management. In the future, we can explore combining this method with equipment modeling, simulation, and other techniques to build a more intelligent and visualized operation and maintenance decision support system. (See the attached image.) Figure 6 As shown.

[0045] Specifically, "the coordinates of the intersection point of two pipes are determined by filtering the area of ​​each line" means: Because the tubing is thicker and continuous, it typically occupies a larger black area than the thinner wires. When multiple components intersect, especially at the junctions between tubing, the resulting black area (i.e., the portion displayed as black after binarization) will be significantly larger than the junction between the tubing and the wire. Therefore, among multiple junction points, the junction with the largest black area or the most black pixels is selected as the junction point between the two tubing components, and its coordinates are calculated.

[0046] The coordinates of the connection point and the coordinates of the outer edge of the margin are both obtained based on a coordinate system constructed on the region of interest image. Specifically: Define a two-dimensional Cartesian coordinate system on the region of interest image. Typically, the origin of this coordinate system can be located at the top left corner or the center of the image; in this embodiment, the top left corner is chosen.

[0047] The X-axis points horizontally to the right, and the Y-axis points vertically downward. The position of each pixel can be represented by this pair of coordinates, where each unit of length represents the distance of one pixel.

[0048] like Figure 7As shown, based on the coordinates of the connection point and the coordinates of the outer edge of the margin, the length from the connection point to the margin point is calculated. Based on the proportion of the length in the column top height, combined with a preset threshold, it is determined whether the contact wire component needs maintenance.

[0049] Connection points may gradually shift outwards due to factors such as train movement, wind erosion, and vibration. Once a connection point detaches from the outermost edge, it can cause a malfunction, preventing the train from operating normally or causing power supply anomalies. Therefore, we need to closely monitor the distance between the connection point and the outermost edge to ensure safe and reliable train operation. By calculating and analyzing this distance, we can predict when maintenance or replacement of the connection point is needed, thereby avoiding potential malfunctions. This will help improve the operational efficiency and safety of trains.

[0050] Based on the proportion p of the aforementioned length in the column top height: ; Where t is the length from the connection point to the allowance point, and T is the height of the column top; If the percentage is less than the first preset threshold, the contact wire component needs to be given special attention; if the percentage is less than the second preset threshold, the contact wire component needs to be repaired; if the percentage is greater than the first preset threshold, the contact wire component is in good condition. Wherein, the first preset threshold is greater than the second preset threshold.

[0051] In this embodiment, the first preset threshold is preferably 0.5, and the second preset threshold is preferably 0.2.

[0052] In another embodiment, a dynamic threshold for environmental factor correction is introduced: the first preset threshold Second preset threshold Dynamically adjusted based on ambient temperature (Tenv) and train speed (v): ; ; When a wind force of ≥5 is detected and With an additional 20% reduction, this method improves early warning sensitivity by 3 times in high temperature (40℃) and high speed (350km / h) scenarios, while also reducing the false alarm rate caused by low temperature contraction in cold regions (from 12% to 3%).

[0053] Although the steps in the above embodiments are described in the above order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not need to be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order. These simple variations are all within the protection scope of this invention.

[0054] The second embodiment of the present invention proposes a system for calculating the margin of railway catenary components based on pixel density, which is based on a method for calculating the margin of railway catenary components based on pixel density in the first embodiment. The system includes: The region of interest (ROI) image acquisition module is configured to acquire an image of the contact wire component whose remaining capacity is to be calculated, acquire the ROI in the image, and obtain the ROI image after image preprocessing. The connection point region acquisition module is configured to divide the image of the region of interest into grid cells of a preset density, calculate the pixel density value of each grid cell, and take the region where the grid cell with the highest density value is located as the connection point region. The coordinate acquisition module is configured to extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; The maintenance module is configured to calculate the length from the connection point to the margin point based on the coordinates of the connection point and the coordinates of the outer margin point, and determine whether the contact wire component needs maintenance based on the proportion of the length in the column top height and a preset threshold. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related explanations of the system described above can be found in the corresponding processes of the foregoing method embodiments, and will not be repeated here.

[0055] It should be noted that the system for calculating the margin of railway catenary components based on pixel density provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the various modules or steps and are not considered as an improper limitation of the present invention.

[0056] An electronic device according to a third embodiment of the present invention includes: At least one processor; and A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor to implement the above-described method for calculating the margin of railway catenary components based on pixel density.

[0057] A fourth embodiment of the present invention provides a computer-readable storage medium storing computer instructions, which are executed by the computer to implement the above-described method for calculating the margin of railway catenary components based on pixel density.

[0058] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the storage device and processing device described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0059] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. The programs corresponding to the software modules and method steps can be placed in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the invention.

[0060] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.

[0061] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.

[0062] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A method for calculating the margin of railway catenary components based on pixel density, characterized in that, The method includes: Obtain an image of the contact wire component whose remaining capacity is to be calculated, obtain the region of interest in the image, and perform image preprocessing to obtain the region of interest image; The region of interest image is divided into grid cells of a preset density, the pixel density value of each grid cell is calculated, and the region where the grid cell with the highest density value is located is taken as the connection point region. Extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; Based on the coordinates of the connection point and the coordinates of the outer edge of the margin, the length from the connection point to the margin point is calculated. Based on the proportion of the length in the column top height, and combined with a preset threshold, it is determined whether the contact wire component needs maintenance.

2. The method for calculating the margin of railway catenary components based on pixel density according to claim 1, characterized in that, The method for obtaining the region of interest image is as follows: A margin position recognition model is constructed, and the margin position recognition model is trained based on a dataset; wherein, the dataset consists of images of various types, sizes, and materials of contact wire components with margins taken under different angles, lighting, and environmental conditions; The contact wire component whose surplus needs to be calculated is input into the trained surplus location recognition model to obtain the surplus area image; The region of interest is segmented from the surplus region image, and the region of interest is a portion of the surplus component itself; The region of interest is preprocessed to obtain the region of interest image.

3. The method for calculating the margin of railway catenary components based on pixel density according to claim 2, characterized in that, The preprocessing methods include image scaling and cropping, color space conversion, histogram equalization, filtering, and data augmentation.

4. The method for calculating the margin of railway catenary components based on pixel density according to claim 1, characterized in that, The pixel density value of each grid cell is calculated as follows: Calculate the number of black pixels in each grid cell and divide it by the area of ​​the grid cell to obtain the pixel density value of that grid cell.

5. The method for calculating the margin of railway catenary components based on pixel density according to claim 1, characterized in that, The line edge features are obtained based on edge detection operators.

6. The method for calculating the margin of railway catenary components based on pixel density according to claim 1, characterized in that, The coordinates of the outermost point of the margin are obtained based on a corner detection algorithm.

7. The method for calculating the margin of railway catenary components based on pixel density according to claim 1, characterized in that, The method for determining whether the contact wire component needs maintenance based on a preset threshold is as follows: Based on the proportion of the aforementioned length in the column top height p : ; in, t The length from the connection point to the margin point. T The height of the column top; If the percentage is less than the first preset threshold, the contact wire component needs to be given special attention; if the percentage is less than the second preset threshold, the contact wire component needs to be repaired; if the percentage is greater than the first preset threshold, the contact wire component is in good condition. Wherein, the first preset threshold is greater than the second preset threshold.

8. A system for calculating the margin of railway catenary components based on pixel density, based on the method for calculating the margin of railway catenary components based on pixel density as described in any one of claims 1-7, characterized in that, The system includes: The region of interest (ROI) image acquisition module is configured to acquire an image of the contact wire component whose remaining capacity is to be calculated, acquire the ROI in the image, and obtain the ROI image after image preprocessing. The connection point region acquisition module is configured to divide the image of the region of interest into grid cells of a preset density, calculate the pixel density value of each grid cell, and take the region where the grid cell with the highest density value is located as the connection point region. The coordinate acquisition module is configured to extract the line edge features of the connection point region, obtain the coordinates of each line intersection point, filter out the coordinates of two pipe intersection points by the area of ​​each line, and use them as the connection point coordinates; obtain the coordinates of the outer edge of the surplus point in the region of interest image; wherein, the connection point coordinates and the outer edge of the surplus point coordinates are both obtained based on the coordinate system constructed on the region of interest image; The maintenance module is configured to calculate the length from the connection point to the margin point based on the coordinates of the connection point and the coordinates of the margin outer point, and determine whether the contact wire component needs maintenance based on the proportion of the length in the column top height and a preset threshold.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor to implement the method for calculating the margin of railway catenary components based on pixel density as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are executed by the computer to implement the method for calculating the margin of railway catenary components based on pixel density as described in any one of claims 1-7.