Steel rail seam width detection method and system based on line-line distance

Through the detection method based on line distance, combined with multi-factor weighting and track geometry deduction, the problems of low efficiency and poor accuracy of rail rail joint width detection in the prior art are solved, and high-precision and high-reliability rail joint width detection are achieved.

CN120259404AActive Publication Date: 2025-07-04CRRC HANGZHOU DIGITAL TECH CO LTD

Patent Information

Application Number
CN202510748608.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-07-04
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

In the prior art, the detection method of rail rail joint width has low efficiency and poor accuracy, which cannot adapt to complex lighting conditions, and lacks utilization of the physical characteristics of the track, resulting in large deviations in positioning of the detection point, blurred images of the far end tracks and difficulty in accurately extracting features, and insufficient credibility of the detection results.

Method used

The detection method based on line distance is adopted, and the boundary points of the proximal and distal orbitals are obtained through image recognition strategies, combined with multi-factor weighting and orbit geometry derivation, and multi-level constraints of image gradient characteristics and orbit theoretical width are used to solve the problem that a single image feature is susceptible to noise interference, improve the positioning accuracy of points A and B, and ensure the accuracy of the detection results through symmetry verification strategies.

Benefits of technology

The accuracy and reliability of rail rail joint width detection are improved, positioning deviations and noise interference in traditional methods are overcome, and a closed-loop mechanism of detection-verification-correction is formed, which improves the credibility of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259404A_ABST
    Figure CN120259404A_ABST
Patent Text Reader

Abstract

The invention provides a steel rail seam width detection method and system based on line-line distance, and the method comprises the steps: shooting an image of a rail connection part, obtaining a near-end rail and a far-end rail through an image recognition strategy, defining the boundary points of the top edge of the near-end rail as A and B, and defining the boundary points of the bottom edge of the near-end rail as C and D, the B and the C are located on the same track connecting line, the far-end track is defined in the same mode, and the A point and the B point are obtained; according to the C point determination strategy, determining the C point based on multi-factor weighting, and obtaining a near-end key point set; acquiring a far-end key point set according to the image acquisition processing step; two sets of key lines of the near-end track and the far-end track are obtained respectively, and the distance between the two sets of key lines is calculated to serve as the width of the steel rail seam; through multi-level constraints of image gradient features and track theoretical width, the problem that a single image feature is susceptible to noise interference is solved, and the positioning precision of A and B points is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of train track detection, and in particular to a method and system for detecting the width of a rail gap based on the line-line distance. Background Art

[0002] In the field of rail transit, the width of the rail gap is a key parameter for measuring the safety of the track. Traditional detection methods mostly rely on manual visual inspection or single-point sensor measurement, which have defects such as low efficiency, poor accuracy, and inability to adapt to complex lighting conditions. In the prior art, although the detection scheme based on machine vision can achieve automation, the following problems generally exist: single reliance on image edge detection, lack of utilization of track physical characteristics (such as width, periodic structure), resulting in large positioning deviation of detection points; the images of the distal track are blurred due to the long distance, and it is difficult for traditional methods to accurately extract features, resulting in a significant decrease in detection accuracy; lack of systematic verification of the positioning results, unable to effectively identify abnormal detection points, resulting in insufficient credibility of the overall detection results. Summary of the Invention

[0003] Aiming at the deficiencies of the prior art, the purpose of the present invention is to provide a method and system for detecting the width of a rail gap based on the line-line distance to overcome the above-mentioned defects in the prior art.

[0004] To achieve the above purpose, the present invention provides the following technical solutions: A method for detecting the width of a rail gap based on the line-line distance, comprising: An image acquisition and processing step for taking images of the track connection, and obtaining the proximal track and the distal track through an image recognition strategy. Define the top boundary points of the proximal track as A and B, and the bottom boundary points of the proximal track as C and D, and B and C are located on the same track connection line. Define the 、 、 、 of the distal track in the same way, and obtain the A and B points, as well as 、 points; A key point acquisition step for determining the C point based on multi-factor weighting according to the C point determination strategy, and determining the D point through the track geometry derivation strategy to obtain the proximal key point set; A distal track determination step for obtaining 、 points, and determining points based on multi-factor weighting according to the point determination strategy, and determining points through the track geometry derivation strategy to obtain the distal key point set; Verification steps, including symmetry verification strategies to verify the proximal key point set and the distal key point set respectively. If the verification is qualified, enter the gap calculation step; if the verification is unqualified, enter the image acquisition and processing step; Gap calculation step: According to the proximal key point set and the distal key point set, obtain two sets of key lines of the proximal orbit and the distal orbit respectively, and calculate the distance between the two sets of key lines as the width of the rail gap.

[0005] Preferably, the C point determination strategy includes obtaining the geometric inflection point within the ROI area of the proximal orbit cross-section , where the inflection point is the pixel mutation point of the intersection line between the top surface and the side surface of the orbit, obtaining the intersection point of the orbit side surface and the orbit extension line , setting a circle with point B as the center and the length of BC as the radius, and obtaining the intersection point of the circle and the edge feature , and dynamically adjusting the , and weights according to the image clarity, and obtaining the coordinates of point C through the weighted centroid algorithm.

[0006] Preferably, the point determination strategy includes obtaining the geometric inflection point within the ROI area of the proximal orbit cross-section , where the inflection point is the pixel mutation point of the intersection line between the top surface and the side surface of the orbit, obtaining the intersection point of the orbit side surface and the orbit extension line , generating a circle with point as the center and length as the radius, and generating a point-based direction constraint vector based on the BC extension direction, and generating under the direction and length constraint conditions, and dynamically adjusting the , and weights according to the image clarity, and obtaining the coordinates of the point through the weighted centroid algorithm.

[0007] Preferably, the track geometry derivation strategy includes obtaining the BC vector, calculating point D through the perspective transformation formula based on the parallelism of the AD vector and the BC vector, and optimizing the coordinates of point D in combination with the track bottom boundary feature.

[0008] Preferably, the symmetry verification strategy includes obtaining the intersection points E and F between the orbit and the base, calculating the lengths of ED and FC respectively, obtaining the difference between ED and FC, and presetting a threshold. When the difference is greater than the threshold, it is determined that the verification is unqualified.

[0009] Preferably, in the image acquisition and processing step, an AB point candidate set generation strategy is set. Edge detection is performed on the track image, and the pixels before the gradient amplitude are extracted as the initial boundary points. Multiple groups of AB candidate points are generated within a preset pixel range on both sides of the initial boundary points, and a standard period threshold range of the track fastener is preset. The distance between the AB candidate points is within the standard period threshold range of the track fastener.

[0010] Preferably, the verification step further includes a periodic verification strategy. When the track is a straight track, the periodic verification strategy is used to obtain the first gap and the second gap of the proximal track of the captured track image, respectively obtain points C and D on the first gap and the second gap, respectively calculate the first distance between the two groups of points C on the first gap and the second distance between the two groups of points D, and a standard period of the track is preset. The differences between the first distance, the second distance and the standard period of the track fastener are respectively calculated, and a point set threshold is preset. When the difference is greater than the point set threshold, it is determined that the verification is unqualified.

[0011] A steel rail joint width detection system based on line-line distance includes: An image acquisition and processing module for taking images of the track connection, and obtaining the proximal track and the distal track through an image recognition strategy. Define the top boundary points of the proximal track as A and B, define the bottom boundary points of the proximal track as C and D, and B and C are on the same track connection line. Define the , , , of the distal track in the same way, and obtain the points A and B, as well as , points; A key point acquisition module determines the point C based on multi-factor weighting according to the point C determination strategy, and determines the point D through a track geometry derivation strategy to obtain a proximal key point set; A distal track determination module determines , points according to the image acquisition and processing module, and determines points based on multi-factor weighting according to the point point determination strategy, and determines points through a track geometry derivation strategy to obtain a distal key point set; A verification module includes a symmetry verification strategy to verify the proximal key point set and the distal key point set respectively. If the verification is qualified, it enters the gap calculation step. If the verification is unqualified, it enters the image acquisition and processing step; The gap calculation module respectively obtains two sets of key lines of the proximal track and the distal track according to the proximal key point set and the distal key point set, and calculates the distance between the two sets of key lines as the width of the rail gap.

[0012] Preferably, it further includes a camera parameter calibration module, which is used to obtain the camera shooting position, angle and scale factor, and the scale factor is the conversion factor between the actual distance and the pixel distance.

[0013] The beneficial effects of the present invention: By the multi-level constraints of the image gradient feature and the theoretical width of the track, the problem that a single image feature is vulnerable to noise interference is solved, and the positioning accuracy of points A and B is improved. The multi-factor weighted model fuses geometric inflection points, extension line intersection points and physical priors, and the positioning accuracy of point C is improved compared with traditional edge detection. Using the proximal track parameters (the direction of the BC vector, width ratio) to map to the distal end, combined with dynamic weight adjustment, the positioning accuracy of the points is improved. The symmetry verification constrains the vertical consistency of points CD through points EF, forming a "detection-verification-correction" closed loop. Description of the Drawings

[0014] Figure 1 is the overall flowchart of the present invention; Figure 2 is the flowchart of the verification steps of the present invention; Figure 3 is the flowchart of the C-point verification strategy of the present invention; Figure 4 is the schematic diagram of gap calculation of the present invention. Detailed Embodiments

[0015] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0016] It should be noted that when a component is referred to as being "fixed to" another component, it can be directly on the other component or there may also be an intermediate component. When a component is considered to be "connected" to another component, it can be directly connected to the other component or there may be an intermediate component at the same time. When a component is considered to be "disposed on" another component, it can be directly disposed on the other component or there may be an intermediate component at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used in the description of the present invention herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0018] The following further details the embodiments of the present invention with reference to the accompanying drawings: As Figures 1-4 shown, the present invention provides a method for detecting the width of the rail gap based on the line-line distance, including: An image acquisition and processing step, which is used to capture an image of the track connection, and obtain the proximal track and the distal track through an image recognition strategy. Define the top boundary points of the proximal track as A and B, and define the bottom boundary points of the proximal track as C and D, and B and C are on the same track connection line. Define the , , , of the distal track in the same way, and obtain the points A and B, as well as , points; Use an industrial camera to capture the track connection, covering the proximal track area and the distal track area; The camera needs to be pre-calibrated for position and angle, and establish the proportional relationship between the pixel distance and the actual distance through a calibration object (such as a standard gauge ruler); Gray-scale the original image, perform Gaussian filtering, and Canny edge detection to enhance the track boundary features; According to the image depth information, such as the camera focal length and the shooting distance, separate the proximal and distal track areas; During the shooting process, simultaneously shoot the tracks on both sides of the train, define the side close to the camera as the proximal track, define the side far from the camera as the distal track, and identify the rail gap, define the two sides of the gap as the first track and the second track respectively, A and B are the top side edges of the first track and the second track respectively, A and B are the two end points of the top edge of the proximal track. Theoretically, the line AB is the straight line of the track top edge, which is used to determine the track top surface reference, and C and D are the two end points of the bottom edge of the proximal track.

[0019] In the image acquisition and processing step, there is an AB point candidate set generation strategy. Perform edge detection on the track image, and extract the pixels before the gradient amplitude as the initial boundary points. Generate multiple groups of AB candidate points within the preset pixel range on both sides of the initial boundary points, and there is a preset standard period threshold range for track fasteners. The distance between AB candidate points is within the standard period threshold range of track fasteners.

[0020] The Canny algorithm is used to obtain the edge contour. This algorithm adopts a multi-stage processing flow. First, a Gaussian filter is used to smooth the image to reduce noise interference. Then, the gradient magnitude and direction of the image are calculated to determine the possible edge positions. Next, through non-maximum suppression, the edges are refined, and only the local maximum points in the gradient direction are retained. Finally, the double-threshold algorithm is used to determine the true edge points and possible edge points, and the edge points are connected to form a complete edge contour.

[0021] After edge detection is completed, from the detected edge pixels, the pixels with the top gradient magnitudes are extracted as the initial boundary points. They can be sorted according to the gradient magnitude, and a certain proportion (such as the top 10%) of the pixels with larger magnitudes are selected as the initial boundary points. These pixels with larger gradient magnitudes are more likely to be the true boundary points of important objects (such as track fasteners, track edges, etc.) in the track image, providing a reliable starting point for subsequent operations.

[0022] Within the preset pixel range on both sides of each initial boundary point, multiple groups of AB candidate points are generated. The preset pixel range can be set according to the actual image resolution and the approximate size of the track fastener. For example, if the size of the track fastener in the image is approximately 20 - 50 pixels, the preset pixel range can be set to 30 - 60 pixels on both sides of the initial boundary point. Within this range, two points are selected at a certain interval (such as every 5 pixels) as a group of AB candidate points. In this way, multiple groups of candidate points are generated around the initial boundary point, increasing the possibility of screening out the required A and B points in the subsequent process.

[0023] There is a preset standard period threshold range for the track fastener. The distance between the generated AB candidate points needs to be within this threshold range. The standard period threshold range for the track fastener can be obtained through statistical analysis of the fastener spacings in a large number of normal track images. For example, after statistics, it is found that the spacing range of normal track fasteners is between 80 - 120 pixels, then this range is set as the standard period threshold range. For each group of generated AB candidate points, calculate the distance between the two points. If the distance is within the threshold range, retain this group of candidate points; if not, discard it. Through this screening mechanism, it is ensured that the distances between the finally obtained AB candidate points conform to the normal distribution law of the track fasteners, improving the accuracy and reliability of subsequent processing.

[0024] Steps for obtaining key points: Determine point C based on multiple factors weighting according to the C point determination strategy, and determine point D through the track geometry derivation strategy to obtain the proximal key point set; obtain the coordinates of point C through multiple groups of data, and determine the coordinates of point C based on the weight algorithm of multiple groups of data. And based on the geometric characteristics of the track, AD is set to be parallel to BC, and the coordinates of point D can be derived from BC, and the proximal key point set is obtained. The proximal key point set contains the coordinates of points A, B, C, and D; The C-point determination strategy includes obtaining the geometric inflection points within the ROI region of the proximal orbit cross-section , where the inflection point is the pixel mutation point of the intersection line between the top surface and the side surface of the orbit, and obtaining the intersection point of the orbit side surface and the orbit extension line , and there is a circle with point B as the center and the length of BC as the radius, and obtaining the intersection points of the circle and the edge features , dynamically adjusting according to the image clarity 、 and weights, and obtaining the coordinates of point C through the weighted centroid algorithm; in the orbit image, the region of interest (ROI) of the proximal orbit cross-section is delimited. Usually, a local area near the track fastener or with clear track edges is selected. The Canny algorithm is used to detect the track edges, generating a binary edge image to highlight the boundary line between the top surface (horizontal area) and the side surface (vertical area) of the orbit; in the edge image, each row of pixels is scanned horizontally to find the step mutation point where the gray value changes from high (top surface) to low (side surface). This point is the pixel-level inflection point of the intersection line between the top surface and the side surface ; perform linear fitting on the extracted track side points, use the least squares method to fit the side edge line of the track side surface, and preset the horizontal line of the track top surface, and obtain the intersection point of the side edge line and the horizontal line , draw a circle with point B as the center and the theoretical length of BC as the radius, and the intersection points with the track edge features. The length of BC is the track design standard value (such as 50mm). Combining with the camera scale factor (such as 1 pixel = 0.1mm), it is converted into a pixel radius. In the edge detection image, find the intersection points of the circle with point B as the center and the pixel radius as the radius and the track edge, and take the intersection points located within the ROI region as ; the image clarity determines the reliability of each factor, and the clarity is quantified by the average gradient magnitude G of the ROI region; at high clarity, give priority to trusting the directly extracted from the image ; at medium clarity, utilize the three factors evenly; at low clarity, enhance the geometric extension and the physical prior constraint weights; through multi-factor weighted fusion, suppress the errors of a single factor. For example: when deviates from the true position due to noise, and can be pulled back to a reasonable range through geometric and physical constraints; when the local lack of the track edge leads to computation deviation, and can provide compensation.

[0025] The steps for determining the distal orbit. According to the image acquisition and processing steps, determine 、 points, and according to Point determination strategy based on multi-factor weighted determination point and determined by the orbit geometry derivation strategy Point, get the remote key point set; in the same way, determine , point, and according to the vector direction of BC, Point relative The extension direction of the point is determined, and according to Point determination strategy, based on multiple factors, determined by weighted algorithm point, and based on the geometric properties of the track, Parallel to Settings can be set by Derived Point coordinates, and obtain the remote key point set; Point determination strategies include obtaining geometric inflection points within the proximal orbital cross-section ROI area The inflection point is the pixel mutation point of the intersection line between the top and side surfaces of the track, and the intersection point of the side surface of the track and the extension line of the track is obtained. , generated by The point is the center of the circle, The length of the circle is the radius, and based on the BC extension direction, generate a circle based on Point as reference point The direction constraint vector of the point is generated based on the direction and length constraints. , dynamically adjusted according to image clarity , as well as The weight is obtained by weighted centroid algorithm Point coordinates; define the region of interest (ROI) of the proximal rail cross section in the rail image, usually select the local area near the rail fastener or the clear rail edge, use the Canny algorithm to detect the rail edge, generate a binary edge image, and highlight the intersection of the top surface (horizontal area) and the side surface (vertical area) of the rail; in the edge image, scan each row of pixels in the horizontal direction to find the step mutation point of the gray value from high (top surface) to low (side surface), which is the pixel-level inflection point of the intersection of the top surface and the side surface. ; Perform straight line fitting on the extracted track side points, use the least squares method to fit the side edge straight line of the track side, preset the horizontal straight line on the top surface of the track, and obtain the intersection of the side edge straight line and the horizontal straight line Based on the determined points B and C as the reference, calculate the vector BC, which represents the extension direction of the track side. Theoretically The vector is parallel to the BC vector and obtains Point coordinates, Taking a point as the reference, generate a ray along the direction of the BC vector, The initial value of the point is located on the ray to ensure the direction consistency with BC, and the distance is a fixed value. Based on the limitations in length and direction vector, determine ; The reliability of each factor is determined by the image clarity, and the clarity is quantified by the average gradient magnitude G of the ROI region; At high clarity, give priority to trusting the directly extracted from the image; At medium clarity, utilize the three factors evenly; At low clarity, enhance the geometric extension and the physical prior constraint weights; Through multi-factor weighted fusion, suppress the errors of a single factor. For example: when deviates from the true position due to noise, and can be pulled back to a reasonable range through geometric and physical constraints; When the calculation deviation occurs due to the local missing of the track edge, and can provide compensation, and since the shooting of the distal track is relatively blurred, the weights of and can be appropriately reduced to improve credibility.

[0026] The track geometry derivation strategy includes obtaining the BC vector, and based on the parallelism of the AD vector and the BC vector, calculating the D point through the perspective transformation formula, and combining the track bottom boundary features to optimize the D point coordinates; The track top edge vector (BC) and the bottom edge vector (AD) should be parallel in theory, that is, have the same direction. The D point needs to be located on the true boundary of the track bottom and is verified through the image edge detection result; Calculate the BC vector from the located B point and C point, and perform direction feature extraction. Based on perspective transformation, obtain the D point; Perform gray threshold segmentation on the track bottom area, extract the hinge points of the track top and side, divide the ROI, focus on the potential boundary, project the D point along the direction perpendicular to the BC vector, that is, the rail gap width direction, to the edge detection result, and find the nearest edge point as the optimized D point. Calculate the angle between the AD vector and the BC vector. If the angle is less than , it is judged to be normal. If the angle is greater than , re-obtain the D point.

[0027] ​Verification steps, including symmetry verification strategies to verify the proximal key point set and the distal key point set respectively. If the verification is qualified, enter the gap calculation step; if the verification is unqualified, enter the image acquisition and processing step; through the dual constraints of geometric symmetry and orbital structure periodicity, verify the rationality of the positioning of the detection points (A, B, C, D and the distal point), ensuring that: the detection points conform to the geometric laws of the orbital physical structure; exclude abnormal positioning caused by image noise, edge misdetection, etc.; establish a "detection-verification-correction" closed loop to improve the reliability of the overall detection result; conduct symmetry verification and periodic verification on the detection point positioning. If both are qualified, enter the gap calculation step; if any one is unqualified, return to the image acquisition step, adjust the AB point candidate set, and recalculate.

[0028] The symmetry verification strategy includes obtaining the intersection points E and F between the track and the base, calculating the lengths of ED and FC respectively, obtaining the difference between ED and FC, and presetting a threshold. When the difference is greater than the threshold, it is judged that the verification is unqualified; points E and F are the intersection points of the track bottom surface and the base (or roadbed). Theoretically, the line segment EF is a horizontal straight line, and ED and FC should be vertically symmetric line segments; in the detection result of the track bottom surface edge, find the horizontal line segment with the most significant gray level mutation (such as the boundary between the track metal and the track fastener); take the left end point of this line segment as E and the right end point as F, or take the end points after detecting the horizontal straight line through the Hough transform, obtain the coordinate points of E, F, D, and C respectively, calculate the pixel points of ED and FC. ED and FC respectively represent the vertical heights on the left and right sides of the track bottom surface, and should be approximately equal under ideal symmetry, and a threshold is set. When the difference is greater than the threshold, it is judged as unqualified. Through the symmetry verification strategy, identify the abnormal positioning with inconsistent left and right heights of the track bottom surface, and indirectly verify the accuracy of the bottom surface edge detection through the horizontal constraint of the EF points, suppressing the misjudgment of tilt or distortion.

[0029] The verification step also includes a periodic verification strategy. When the track is a straight track, the periodic verification strategy is used to obtain the first gap and the second gap of the proximal track of the captured track image, respectively obtain points C and D on the first gap and the second gap, respectively calculate the first distance between two groups of points C on the first gap and the second gap and the second distance between two groups of points D, and preset a standard track period. Respectively calculate the differences between the first distance, the second distance and the standard period of the track fastener, and preset a point set threshold. When the difference is greater than the point set threshold, it is judged that the verification is unqualified; during the analysis and detection process in the straight track area, utilize the fixed distance feature of the track fastener to verify whether the distance between adjacent track analysis and detection points conforms to the design rule; ensure that the distance between the detection points (points C and D) in the track extension direction conforms to the periodicity of the track structure, and exclude abnormal positioning caused by image noise, edge misdetection or camera jitter; through the consistency verification of the distances between adjacent gaps, indirectly verify the accuracy of the detection point positioning and improve the reliability of the overall detection result.

[0030] Select two adjacent rail gaps in the straight track image, and define them as the first gap and the second gap respectively; each gap corresponds to a group of detection points: C, D; and a standard track period is preset. The standard track period is the designed distance of the track fastener and is the reference value for periodic verification. The first distance is the actual distance between point C of the first gap and point C of the second gap, and the second distance is the reagent distance between point D of the first gap and point D of the second gap. Within the allowable distance error range, judge whether the distance between the detection points meets the periodic requirements. If the periodic verification is qualified, it proves that the distance between the monitoring points conforms to the track fastener period rule. If it is unqualified, it indicates that there may be an error in the positioning of the monitoring points, and then enter the image acquisition and processing step. After re-obtaining points A and B, re-position points C and D.

[0031] Gap calculation step: According to the proximal key point set and the distal key point set, respectively obtain two groups of key lines of the proximal track and the distal track. The proximal track key line is and calculate the distance between the two groups of key lines as the rail gap width; the diagonal line connecting the left end A of the top edge of the proximal track and the left end point D of the bottom edge reflects the longitudinal extension feature of the left edge of the track; the diagonal line connecting the right end point B of the top edge of the proximal track and the right end point C of the bottom edge reflects the longitudinal extension feature of the right edge of the track; the vertical distance or length difference between lines AD and BC directly reflects the gap size between the top surface and the bottom surface of the track; if AD and BC are parallel and the spacing is uniform, it indicates that the two side edges of the track extend synchronously; if the spacing changes suddenly or the angle is abnormal, it may indicate track distortion, wear or installation deviation; fit line AD to the coordinates of points A and D by the least squares method, fit line BC to the coordinates of points B and C to obtain the straight line equation, the pixel distance is the vertical distance between the two lines, and use the scale factor obtained by camera calibration to convert the pixel distance into the actual distance.

[0032] A rail joint gap width detection system based on line-line distance, comprising: An image acquisition and processing module, which is used to capture an image of the track connection, and obtain the proximal track and the distal track through an image recognition strategy. Define the top boundary points of the proximal track as A and B, and define the bottom boundary points of the proximal track as C and D. And B and C are located on the same track connection line. Define the , , , of the distal track in the same way, and obtain the points A and B, as well as , points; Use an industrial camera to capture the track connection, covering the proximal and distal areas; Support on-vehicle dynamic shooting or fixed-point static shooting to adapt to different detection scenarios; Top boundary points A and B: Extracted through edge gradient thresholds, located at the left and right ends of the track top surface; Bottom boundary points C and D: Need to be positioned in cooperation with subsequent modules; Distal track: Defined with the same logic to cope with the positioning challenges brought by image blur. Generate multiple groups of candidate points within the range of ±2 pixels on the left and right of the initial boundary points (such as A and B), and screen reasonable combinations by combining the periodic characteristics of track fasteners.

[0033] A key point acquisition module, which determines point C based on a multi-factor weighted method according to the C point determination strategy, and determines point D through the track geometry derivation strategy to obtain the proximal key point set; Based on multi-source data fusion, achieve high-precision positioning of the bottom points (C, D) of the proximal track. Geometric inflection point ( ): The pixel mutation point of the intersection line of the track top surface and the side surface, extracted through Harris corner detection; Extension line intersection point ( ): The geometric intersection point of the extension lines of the side surface and the top surface edge, reflecting the track continuity; Theoretical width circle ( ): The intersection point of the circle with point B as the center and the theoretical length of BC as the radius and the edge, introducing physical prior constraints; Dynamic weight: Automatically adjust the weight according to the image clarity (such as the average gradient amplitude of the ROI area). When the clarity is high, give priority to trusting (weight 0.5), and enhance , weights (such as 0.4 each) when it is blurred.

[0034] The track geometry derivation strategy determines point D, and the directions of the AD vector and the BC vector are the same (the included angle ≤ 2°), and the initial value is calculated through the perspective transformation formula; Boundary feature optimization: Combine the gray mutation feature of the track bottom surface (such as Otsu threshold segmentation) to correct point D to the real edge.

[0035] A distal track determination module, which determines , points according to the image acquisition and processing module, and determines based on the point determination strategy based on multi-factor weighting points, and determine them through the track geometry derivation strategy points, and obtain the set of distal key points; extend the proximal detection logic to the distal end to solve the positioning problem caused by image blur.

[0036] Proximal parameter reuse: Assume that the proximal BC is parallel to the distal parallel, and use the vector direction of the proximal BC to generate the direction constraint of the distal point C'; D' point derivation: Similar to the proximal logic, use vector and vector parallelism, and optimize the coordinates in combination with the distal bottom edge feature.

[0037] The verification module includes a periodic verification strategy to verify the set of proximal key points and the set of distal key points respectively. If the verification is qualified, it enters the gap calculation step; if the verification is unqualified, it enters the image acquisition and processing step; build a reliability "firewall" for the detection results to ensure that the point set conforms to the track physical laws. When the verification is unqualified, return to the image acquisition module to adjust the candidate points to form a "detection-verification-correction" closed loop.

[0038] The gap calculation module, according to the set of proximal key points and the set of distal key points, respectively obtains two sets of key lines of the proximal track and the distal track, and calculates the distance between the two sets of key lines as the width of the rail gap; converts the pixel coordinates in the image space into physical quantities and outputs the final detection result. Perform linear fitting on the key lines, calculate the perpendicular distance or midpoint distance between parallel lines; convert through the camera scale factor (s = actual distance / pixel distance).

[0039] It also includes a camera parameter calibration module. The camera parameter calibration module is used to obtain the shooting position, angle and scale factor of the camera. The scale factor is the conversion factor between the actual distance and the pixel distance; establish the mapping relationship between the image pixel coordinates and the actual physical distance to ensure the physical quantity accuracy of the detection point positioning and the gap width calculation; adjust the camera angle to keep the top surface of the track horizontal in the image. Take calibration object images at the proximal, middle and distal ends respectively to ensure that the calibration object is clear and occupies the central area of the image. Perform preprocessing on the image (such as edge detection), extract the pixel coordinates of the two endpoints of the calibration object, calculate the pixel distance, and calculate the scale factor at each distance according to the ratio of the actual distance to the pixel distance. Store the shooting position, angle and the corresponding scale factor in the database to form a "distance-parameter" mapping relationship; during detection, obtain the current distance through a laser rangefinder and automatically query the mapping table to match the scale factor; after a certain period (such as every week) or when the camera position changes, re-execute the calibration process to avoid parameter drift affecting the accuracy.

[0040] The above are only the preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the concept of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements should also be regarded as within the protection scope of the present invention.

Claims

1. A method for detecting the width of the rail gap based on the line-line distance, characterized in that Including: Image acquisition and processing steps for taking images of track connections and obtaining the proximal track and the distal track through an image recognition strategy. Define the top boundary points of the proximal track as A and B, and the bottom boundary points of the proximal track as C and D, and B and C are on the same track connection line. Define the , , , of the distal track in the same way, and obtain points A and B, as well as , ; Key point acquisition step: determining the C point based on multi-factor weighting according to the C point determination strategy, and determining the D point through the track geometry derivation strategy to obtain the proximal key point set; Remote orbit determination step, obtaining , points, and based on point determination strategy, determined based on multi-factor weighting points, and determined through the orbit geometry derivation strategy points, obtaining the set of remote key points; Verification step: including symmetry verification strategies to verify the proximal key point set and the distal key point set respectively. If the verification is qualified, enter the gap calculation step; if the verification is unqualified, enter the image acquisition and processing step; Gap calculation step: respectively obtaining two groups of key lines of the proximal track and the distal track according to the proximal key point set and the distal key point set, and calculating the distance between the two groups of key lines as the rail gap width.

2. The method for detecting the width of the rail gap based on the line-line distance according to claim 1, wherein The C - point determination strategy includes obtaining geometric inflection points within the ROI region of the proximal - orbit cross - section , where the inflection point is the pixel mutation point of the intersection line between the top surface and the side surface of the orbit, and obtaining the intersection point of the orbit side surface and the orbit extension line , setting a circle with point B as the center and the length of BC as the radius, and obtaining the intersection points of the circle and the edge feature , dynamically adjusting the , and weights according to the image clarity, and obtaining the coordinates of point C through the weighted centroid algorithm.

3. A method for detecting the width of the rail gap based on the line-line distance according to claim 1, characterized in that, The point determination strategy includes obtaining geometric inflection points within the ROI region of the proximal orbit cross-section , where the inflection point is the pixel mutation point of the intersection line between the top surface and the side surface of the orbit, and obtaining the intersection point of the orbit side surface and the orbit extension line , generating a circle with the point as the center and length as the radius, and generating, based on the BC extension direction, a point-based direction constraint vector of the point, and generating, under the direction and length constraint conditions, , dynamically adjusting the weights of the , and according to the image sharpness, and obtaining the point coordinates through the weighted centroid algorithm.

4. A method for detecting the width of the rail gap based on the line-line distance according to claim 1, characterized in that, The track geometry derivation strategy includes obtaining the BC vector, and based on the parallelism of the AD vector and the BC vector, calculating the D point through the perspective transformation formula, and optimizing the D point coordinates in combination with the track bottom boundary features.

5. A method for detecting the width of the rail gap based on the line-line distance according to claim 1, characterized in that, The symmetry verification strategy includes obtaining the intersection points E and F between the track and the base, respectively calculating the lengths of ED and FC, obtaining the difference between ED and FC, and presetting a threshold. When the difference is greater than the threshold, it is judged as unqualified verification.

6. The method for detecting the width of the rail gap based on the line-line distance according to claim 1, wherein, In the image acquisition and processing step, there is an AB point candidate set generation strategy, which performs edge detection on the track image, extracts the pixels before the gradient amplitude as the initial boundary points, generates multiple groups of AB candidate points within the preset pixel range on both sides of the initial boundary points, and presets a threshold range of the standard period of the track fastener. The distance between the AB candidate points is within the threshold range of the standard period of the track fastener.

7. A method for detecting the width of the rail gap based on the line-line distance according to claim 6, characterized in that, The verification step further includes a periodic verification strategy. When the track is a straight track, the periodic verification strategy is used to obtain the first gap and the second gap of the proximal track of the captured track image, respectively obtain the C and D points on the first gap and the second gap, respectively calculate the first distance between the two groups of C points and the second distance between the two groups of D points on the first gap and the second gap, and preset the standard period of the track. Respectively calculate the differences between the first distance, the second distance and the standard period of the track fastener, and preset a point set threshold. When the difference is greater than the point set threshold, it is judged as unqualified verification.

8. A rail joint width detection system based on the line-line distance, characterized in that, Including: The image acquisition and processing module is used to capture images of the track connection, and obtain the proximal track and the distal track through an image recognition strategy. Define the top boundary points of the proximal track as A and B, and define the bottom boundary points of the proximal track as C and D, and B and C are located on the same track connection line. Define the , , , of the distal track in the same way, and obtain the A and B points, as well as , points; Key point acquisition module: determining the C point based on multi-factor weighting according to the C point determination strategy, and determining the D point through the track geometry derivation strategy to obtain the proximal key point set; The distal orbit determination module determines, based on the image acquisition and processing module, , points, and based on the point determination strategy, determines the points through multi-factor weighting, and determines the points through the orbit geometry derivation strategy, obtaining the distal key point set; Verification module: including symmetry verification strategies to verify the proximal key point set and the distal key point set respectively. If the verification is qualified, enter the gap calculation step; if the verification is unqualified, enter the image acquisition and processing step; Gap calculation module: respectively obtaining two groups of key lines of the proximal track and the distal track according to the proximal key point set and the distal key point set, and calculating the distance between the two groups of key lines as the rail gap width.

9. The rail gap width detection system based on the line-line distance according to claim 8, characterized in that, It further includes a camera parameter calibration module, which is used to obtain the camera shooting position, angle and scale factor. The scale factor is the conversion factor between the actual distance and the pixel distance.

Citation Information

Patent Citations

  • WIFI hotspot information pushing method, receiving method and devices

    CN107613471A

  • Track center line automatic detection method based on vehicle-mounted mobile laser point cloud

    CN110647798A

  • Rail and water combined transport railway vehicle tracking and positioning method and system

    CN110758473A

  • Method and device for detecting width of rail joint seam of steel rail

    CN112435289A

  • Three-dimensional point cloud calibration processing method and device for steel rail detection

    CN115830019A

Cited By

  • Method and system for detecting looseness of air cylinder hoop of rail train

    CN120853120A

  • Path planning method and system for four-direction vehicle of intelligent warehouse

    CN121091851A

  • A method and system for path planning of a four-way vehicle of an intelligent warehouse

    CN121091851B