A method for detecting the tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds

Through the fusion method of two-dimensional images and three-dimensional point clouds, the characteristics of elastic strip fasteners are extracted and mapped, and their tightness status is calculated, which solves the detection problems in the existing technology and achieves fast and accurate fastener tightness detection.

CN117635520BActive Publication Date: 2024-09-17NANCHANG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310270470.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2024-09-17
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

Existing two-dimensional image detection is difficult to detect the tightness of fasteners, and the large amount of three-dimensional point cloud data results in low operating efficiency, making it difficult to achieve rapid detection.

Method used

Using the fusion method of two-dimensional images and three-dimensional point clouds, by acquiring RGB depth images and three-dimensional point cloud data, the two-dimensional skeleton image and normal vector of the elastic fastener are extracted, mapped to the three-dimensional point cloud, and fitted to form a three-dimensional elastic fastener. The cross-section circle of the component is used to calculate the distance between the front jaw point and the contact surface to determine the tightness of the fastener.

Benefits of technology

It achieves fast and accurate detection of the tightness of fasteners, improves detection efficiency, reduces interference from track garbage and debris, and enhances detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117635520B
    Figure CN117635520B
Patent Text Reader

Abstract

The present invention discloses a method for detecting the tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds, and relates to the technical fields of machine vision defect detection and big data processing. The method comprises: using a line laser sensor to scan a track to obtain the track contour, constructing a three-dimensional point cloud image and an RGB depth image according to the contour, establishing a semantic segmentation model Unet network, using the Unet network to segment the spring clip in the RGB depth image, and extracting the skeleton of the spring clip; mapping the spring clip skeleton in the two-dimensional image to the three-dimensional point cloud image, obtaining the initial skeleton of the spring clip, fitting the spring clip cross-section circle using the initial skeleton and normal vector, replacing the initial skeleton point with the center of the circle, and improving the speed and robustness of fastener detection; extracting the front jaw point and feature points of the spring clip skeleton of the three-dimensional point cloud, the distance between the front jaw point of the spring clip and the contact surface, and quickly detecting the tightness of the spring clip according to the distance distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine vision defect detection and big data processing, and in particular to a method for detecting tightness of rail spring clip fasteners based on the fusion of two-dimensional images and three-dimensional point clouds. Background Art

[0002] Railways are the main arteries of the national economy, key infrastructure and major livelihood projects. They are the backbone of the comprehensive transportation system and occupy an important position in my country's economic and social development. According to the track design specifications, the types of fasteners used on railways are mainly Vossloh-300 and WJ-7 / 8 spring clip fasteners. There are five main types of spring clip fastener defects: loss, dislocation and breakage of buckles, and loss and loosening of fastener bolts. The failure of fasteners first manifests itself as loose bolts, and then evolves into dislocation and loss of buckles. The failure of fasteners not only aggravates the vibration of the train, affecting the service life and riding comfort of the train, but also causes the left and right rails to shift, and in severe cases causes the train to derail. Therefore, it is necessary to monitor the status of track fasteners and detect failed fasteners in a timely manner to ensure safe railway transportation.

[0003] At present, each maintenance section mainly relies on manual inspection during the "window" time to visually check the abnormal status of fasteners one by one along the line. The traditional manual visual inspection method is inefficient and subjective, and it is obviously unable to meet the application needs of my country's rapidly developing railways. How to quickly detect and maintain railway infrastructure within the limited "window" time has become an urgent problem that needs to be solved by track maintenance departments at home and abroad. In recent years, with the development of computer vision and image processing technology, visual inspection technology has been initially developed in the railway industry. By installing various cameras on the track inspection vehicle to collect track image data, using image processing and pattern recognition technologies, the area of ​​interest is located, morphologically recognized, and quantitatively analyzed to obtain the relevant parameters of the object being measured, so that front-line maintenance personnel can quickly understand the line status, thereby improving railway maintenance efficiency.

[0004] Rail fastener defect detection technology based on machine vision can be roughly divided into two-dimensional and three-dimensional visual imaging detection. The former uses a two-dimensional image sensor to obtain a two-dimensional image of the track, extracts the color and texture features of the track image, or uses a deep convolutional neural network to mine deeper information from the track image, thereby achieving fastener positioning and detection. The latter generally uses a line scan camera to obtain the contour of the track to form a three-dimensional point cloud, directly performs region segmentation and feature extraction on the three-dimensional point cloud data, and calculates the fastener's gap height, i.e. the fastener's tightness, based on the spatial structure and feature points of the spring clip fastener. The above two detection methods have been tried on railways, but there are still the following technical problems:

[0005] (1) Two-dimensional images lack the third-dimensional depth information and can only detect defects such as fastener loss, breakage, and dislocation that are easily discernible to the naked eye, but it is difficult to detect the tightness of the fasteners.

[0006] (2) The amount of 3D point cloud data is large. Directly processing the 3D point cloud results in low operating efficiency and makes it difficult to quickly detect the tightness of fasteners. Summary of the invention

[0007] Based on this, it is necessary to provide a method for detecting the tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds in response to the technical problems raised in the above background technology.

[0008] The embodiment of the present invention provides a method for detecting the tightness of a spring clip fastener by fusing a two-dimensional image and a three-dimensional point cloud, which comprises:

[0009] Obtain a three-dimensional point cloud image and an RGB depth image of the track including the spring clip fasteners;

[0010] Segment the spring clip fastener image from the RGB depth image, and extract the spring clip fastener two-dimensional skeleton image and skeleton normal vector from the spring clip fastener image;

[0011] The two-dimensional skeleton image and skeleton normal vector of the spring clip fastener are mapped to the three-dimensional point cloud image to obtain an initial three-dimensional skeleton image; and the cross-sectional circle of the three-dimensional spring clip fastener is formed by fitting the initial three-dimensional skeleton image and the normal vector of each skeleton point thereof, and the center of the circle is used as the skeleton point of the cross-sectional area of ​​the three-dimensional spring clip fastener, and the initial skeleton image is updated to obtain the three-dimensional point cloud skeleton image of the spring clip fastener;

[0012] Determine the front jaw point of the three-dimensional point cloud skeleton of the spring clip fastener, and extract multiple feature points from different positions in the three-dimensional point cloud skeleton image of the spring clip fastener;

[0013] The contact plane between the spring clip fastener and the track elastic pad is formed by fitting multiple feature points, and the distance between the front jaw point and the contact surface is calculated; and the tightness of the spring clip fastener is determined according to the distance between the front jaw point and the contact surface.

[0014] Furthermore, the acquisition of the three-dimensional point cloud image includes:

[0015] The line laser scanning sensor is vertically mounted on the inspection vehicle, and the encoder mounted on the inspection vehicle is used to trigger the line laser sensor to dynamically scan the track profile;

[0016] Set the acquisition range of the line laser sensor in the horizontal and height directions, establish the data acquisition coordinate system, set the forward direction of the inspection vehicle as the Y direction, the vertical track direction as the X direction, and the height direction as the Z direction; set the point spacing of the line laser sensor in the X direction to be Δx, the encoder trigger spacing to be Δy, the number of point clouds in the X direction to be N, and the M lines of contours in the Y direction to form a three-dimensional point cloud image of the track;

[0017] Among them, in the track 3D point cloud diagram, the coordinate of the i-th point in the X direction is expressed as X i =X0+i*Δx, the Y coordinate of the jth row is expressed as Y j =Y0+j*Δy, X0 and Y0 are the starting coordinates in the X and Y directions, i=1,2,…,N-1, j=1,2,…,M-1, then the height of the point in the i-th row and j-th column is expressed as Z ij , whose point cloud is represented as (X i ,Y j ,Z ij ).

[0018] Furthermore, the acquisition of the RGB depth image includes:

[0019] Convert a 3D point cloud image of size N×M to a 2D RGB image of size N×M; each point in the 2D image corresponds one-to-one to the 3D point cloud, and map the height value corresponding to the i-th row and j-th column of the 3D point cloud to the RGB pixel point of the i-th row and j-th column of the 2D image;

[0020] Assume that the measurement range of the laser sensor is h and the point cloud height is Z ij ∈(-h / 2,h / 2), with Δh as the equal interval, divide the height into K equal parts, K = h / Δh, establish a color table, randomly select K different colors and put them into the color table, so that different height segments are represented by different colors, and the same height segments are represented by the same color. The corresponding relationship between height and color is:

[0021]

[0022] Where [·] is the rounding function, t represents the tth color in the color table, t∈[0,K-1].

[0023] Furthermore, segmenting the spring clip fastener image from the RGB depth image includes:

[0024] Create sample labels for the RGB depth image to mark the spring clip fasteners and obtain a label sample dataset, denoted as D t ={X t ,Y t}, where X t is the RGB depth image, Y t For Xt The ground truth label image of the bullet-hit bar fastener;

[0025] With labeled sample dataset D t ={X t ,Y t} Train the Unet network to obtain the trained clip fastener segmentation Unet network model;

[0026] The unlabeled sample dataset D v ={X v Input the trained clip fastener segmentation Unet network model to predict and segment the clip fastener image I in the RGB depth image A .

[0027] Further, extracting a two-dimensional skeleton image of the spring clip fastener from the spring clip fastener image includes:

[0028] Clip fastener image I A Convert it into a binary image, set the pixels of the spring clip fastener to white, and the rest of the pixels to black. Let the binary image be A, and use the following formula to extract the skeleton of A:

[0029]

[0030] Among them, AΘkB represents the two-dimensional image of the spring clip fastener skeleton obtained by corroding A k times with the structural element B, and its point set is represented by Skeleton_p={p0,…,p n}, n is the number of points on the skeleton line, Represents the opening operation.

[0031] Furthermore, mapping the two-dimensional skeleton image of the spring clip fastener into the three-dimensional point cloud image to obtain an initial three-dimensional skeleton image includes:

[0032] Traverse the skeleton image and find the normal of each skeleton point; let the current skeleton point be represented by p i (x i ,y i )∈Skeleton_p, Skeleton_p is the two-dimensional image point set of the spring clip fastener skeleton; search for the distance p in the neighboring skeleton points of the current skeleton point i (x i ,y i ) The two nearest points, let the two nearest points be represented by p i1 (x i1 ,y i1 ), p i2 (x i2 ,y i2 ), using p i1 , p i2 Point calculation of the current skeleton point pi (x i ,y i ) It is expressed as:

[0033]

[0034] Traversing the Clip Fastener Image I A , taking the skeleton coordinates of the spring clip as the reference point, search for the points in the spring clip image that fall on each skeleton normal vector or the k1 points closest to the normal vector. Let the k1 points be represented as k1 is set by the user;

[0035] The two-dimensional image point set of the spring clip skeleton Skeleton_p={p0,…,p n} and the k nearest points of each skeleton point Dist_p = {skep0,…,skep n} are mapped into the three-dimensional point cloud image to obtain an initial three-dimensional skeleton image; wherein the mapping includes:

[0036] According to X i =X0+Δx*x i and Y i =Y0+Δy*y i Map the points of the two-dimensional image to the three-dimensional point cloud image of the fastener, and obtain the coordinates P of the two-dimensional image in the three-dimensional point cloud. i (X i ,Y i ,Z i ), where Δx is the point spacing set by the line laser sensor in the X direction, Δy is the encoder trigger spacing, X0 is the minimum coordinate value in the X direction, Y0 is the minimum coordinate value in the Y direction, and x i and i Represent the coordinates of the two-dimensional image in the x direction and the y direction respectively. The initial three-dimensional skeleton point mapped by Skeleton_p is represented as Skeleton_P initial = {P0,…,P n}, the three-dimensional point set of Dist_p mapping is expressed as Dist_P = {skeP0,…,skeP n}.

[0037] Furthermore, the determination of the three-dimensional point cloud skeleton image of the spring clip fastener includes:

[0038] Using the initial 3D skeleton point Skeleton_P initial = {P0,…,P n} and multiple points on its cross section Dist_P={skeP0,…,skeP n} Fit a circle into the cross section of the elastic strip, with the center of the circle as the skeleton point of the cross section;

[0039] Traverse the initial 3D point cloud skeleton point Skeleton_P initial = {P0,…,P n}, let the current skeleton point be P i , using P i and P i k points skeP on the normal tangent plane i = {P0,…,P k}Fitting circle, the center P ci Instead of P i As the skeleton point of the current section, the three-dimensional point cloud skeleton point of the spring clip fastener is obtained, which is represented by Skeleton_P c = {P c0 ,…,P cn}.

[0040] Furthermore, the step of determining the front jaw point of the three-dimensional point cloud skeleton of the spring clip fastener includes:

[0041] The front of the spring clip fastener is facing the track, and the vertical line (X center ,Y center ),and

[0042] X center =(max(Skeleton_P c .X)-min(Skeleton_P c .X)) / 2

[0043] Y center =(max(Skeleton_P c .X)-min(Skeleton_P c .X)) / 2

[0044] Among them, Skeleton_P c .X,Skeleton_P c .Y represents Skeleton_P c X, Y coordinate values ​​of the skeleton point;

[0045] Determine whether there is a skeleton point on the plane y=Y center If it exists, it means that there is an intersection between the skeleton point and the center plane of the spring clip, and the intersection is used as the front jaw center point A of the spring clip fastener 3D point cloud skeleton; if it does not exist, then on the plane y = Y center Search for a skeleton point closest to the plane on both sides, and set these two points to be P C1 (X C1 ,Y C1 ,Z C1 ), PC2 (X C2 ,Y C2 ,Z C2 ), use these two points to construct a straight line, and take the intersection of the straight line and the plane as the center point A of the front jaw of the three-dimensional point cloud skeleton of the spring clip fastener. Let point A be represented by P A (X A ,Y A ,Z A ).

[0046] Furthermore, the step of extracting feature points from the three-dimensional point cloud skeleton image of the spring clip fastener includes:

[0047] According to the front jaw point A of the spring clip fastener 3D point cloud skeleton and the center plane X=X center and Y = Y center , the following formula is used to divide the three-dimensional point cloud skeleton of the spring clip fastener into four parts:

[0048]

[0049] Among them, Skeleton_P c .X, Skeleton_P c .Y represents the X,Y coordinates of each skeleton point respectively; according to the following formula, select an initial feature point B, C, D, E from the skeleton points of the four parts respectively, and each feature point is represented by P B (X B ,Y B ,Y B ), P C (X C ,Y C ,Y C ), P D (X D ,Y D ,Y D ), P E (X E ,Y E ,Y E );

[0050]

[0051]

[0052]

[0053]

[0054] Among them, max and min represent the maximum value and minimum value respectively;

[0055] The neighborhoods of the anterior jaw point A and the four initial feature points B, C, D, and E are established respectively, and the point with the minimum value in the Z direction or the average value in the Z direction in the neighborhood of each point is taken to update the coordinates of the original feature point.

[0056] Further, the determining of the tightness of the spring clip fastener includes:

[0057] The coordinates P of the known feature points D and E D , P E , find the midpoint F of the line segment between points D and E, whose coordinates are expressed as P F (X F ,Y F ,Y F );

[0058] Using the characteristic points B, C and the midpoint F, a plane is constructed. Let this plane be the contact plane between the spring clip fastener and the track elastic pad. The coordinates P of the three points B, C and F are known. B ,P C ,P F , construct the BCF plane, expressed as:

[0059] αX+βY+χZ+δ=0

[0060] Among them, α, β, χ, δ are plane parameters respectively;

[0061] Calculate the distance from the center point A of the anterior jaw to the BCF plane:

[0062]

[0063] The Deviation value is used to represent the tightness of the spring clip fastener. The Deviation values ​​of all spring clip fasteners to be inspected are calculated, and the upper and lower thresholds t1 and t2 are set. When the deviation is less than t1, the fastener pressure is too large. When the deviation value is greater than t2, the fastener is too loose.

[0064] Compared with the prior art, the method for detecting the tightness of spring clip fasteners by fusing the above-mentioned two-dimensional image and three-dimensional point cloud provided by the embodiment of the present invention has the following beneficial effects:

[0065] A line scanning 3D camera is used to obtain the track contour and construct a clear RGB depth image and 3D point cloud data to obtain the dual-modal data of the track. The trained Unet semantic segmentation model is used to segment the spring bar in the 2D depth image, replacing the clustering segmentation or semantic segmentation of the 3D point cloud to achieve rapid segmentation of the fastener spring bar. The skeleton of the 2D image is extracted, and the skeleton features in the 2D image are quickly mapped to the 3D point cloud image according to the coordinate relationship to obtain the initial skeleton of the spring bar. The initial skeleton and feature points such as the normal vector are used to fit the circle of the spring bar cross section, and the center of the cross section circle is used instead of the skeleton of the upper surface of the spring bar as the central skeleton of the spring bar, thereby reducing the interference of track garbage and debris and improving the accuracy of tightness detection. According to the symmetrical structure and spatial position of the spring bar, the characteristics of the spring bar skeleton and the front jaw of the spring bar are extracted, and the gap height value of the front jaw of the spring bar is calculated. According to the distribution of the gap height value, the loose fasteners of the spring bar are checked. In particular, by fusing two-dimensional images with three-dimensional point clouds, the key features of fastener spring clips can be quickly and accurately mined, thereby improving the efficiency of fastener detection; and by fitting the cross-sectional circle of the spring clip and using the point set formed by the cross-sectional circle center as the skeleton instead of the conventional spring clip contour skeleton, the spatial structure of the spring clip can be more accurately described, thereby reducing the impact of the track environment on the detection results, thereby improving the readiness of fastener loosening defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flow chart of a method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds provided in one embodiment;

[0067] Figure 2 A track data acquisition coordinate system provided in one embodiment;

[0068] Figure 3 An RGB depth image and a three-dimensional point cloud rail clip fastener dual-modal image provided in one embodiment;

[0069] Figure 4 A depth image elastic strip skeleton extraction algorithm flow provided in one embodiment;

[0070] Figure 5 In one embodiment, Figure 3 The semantic segmentation results of the elastic strip in the RGB depth image;

[0071] Figure 6 The RGB depth image elastic strip image skeleton extraction result provided in one embodiment;

[0072] Figure 7 A three-dimensional structural diagram of a spring bar provided in an embodiment;

[0073] Figure 8 A three-dimensional point cloud image of a spring bar obtained by scanning a track provided in one embodiment;

[0074] Fig. 9 A three-dimensional point cloud skeleton of a rail spring clip fastener provided in one embodiment;

[0075] Fig.10 A schematic diagram of plane projection of a three-dimensional point cloud skeleton region division provided in one embodiment;

[0076] Fig.11 Feature points are extracted from a three-dimensional point cloud of a spring bar skeleton provided in an embodiment. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0078] See also Figure 1 The present invention proposes a method for detecting the tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds, the method comprising:

[0079] S1. The line laser sensor is installed on the inspection vehicle to obtain a three-dimensional point cloud image, establish a mapping relationship between the three-dimensional point cloud image and the two-dimensional depth image, and construct an RGB depth image.

[0080] S2. Establish a Unet deep convolutional neural network semantic segmentation model, create sample labels for the elastic bar area in the RGB depth image, use the labeled samples to train the Unet model to segment the elastic bars in the depth image, and extract the skeleton of the elastic bar to obtain the two-dimensional image elastic bar skeleton and skeleton normal vector.

[0081] S3. Map the skeleton and skeleton normal vector in the two-dimensional image to the three-dimensional point cloud to obtain the initial skeleton. Using the initial skeleton as a reference, construct a circle of the elastic bar cross section, use the center of the circle as the skeleton point of the three-dimensional elastic bar cross section, and update the initial skeleton to obtain the three-dimensional point cloud skeleton of the elastic bar.

[0082] S4. Locate the front jaw point of the three-dimensional point cloud elastic strip skeleton and extract feature points from the three-dimensional skeleton.

[0083] S5. Fit the contact plane according to the feature points, calculate the Deviation of the distance between the front jaw of the spring clip and the contact surface, and use the Deviation value to judge the tightness of the spring clip.

[0084] Compared with other methods for detecting loose rail spring clip fasteners, the advantages of the above steps S1 to S5 are: simultaneous use of two-dimensional images and three-dimensional point cloud data, so that the advantages of the two types of data complement each other, thereby faster detection speed and better robustness, and the ability to eliminate interference from factors such as track garbage and gravel, and accurately detect defective fasteners with loose spring clips.

[0085] Combination Figure 2-3 The implementation method of the above step S1 includes the following steps:

[0086] S11. Vertically install the line laser scanning sensor on the inspection vehicle, calibrate the sensor, and use the encoder installed on the inspection vehicle to trigger the line laser sensor to dynamically scan the track profile.

[0087] S12. Set the acquisition range of the sensor in the horizontal and height directions, establish a data acquisition coordinate system, set the forward direction of the inspection vehicle as the Y direction, the vertical rail direction as the X direction, the height direction as the Z direction, and the calibration plane as the X, Y coordinate plane. Set the point spacing of the sensor in the X direction to be Δx, the encoder trigger spacing to be Δy, the number of point clouds in the X direction to be N, and the M lines of contours in the Y direction to form a three-dimensional point cloud data map of the track.

[0088] S13, the coordinate of the i-th point in the X direction is expressed as X i =X0+i*Δx, the Y coordinate of the jth row is expressed as Y j =Y0+j*Δy, where X0 and Y0 are the starting coordinates in the X and Y directions, i=1,2,…,N-1, j=1,2,…,M-1, then the height of the point in the i-th row and j-th column is expressed as Z ij , whose point cloud is represented as (X i ,Y j ,Z ij ); Convert a 3D point cloud image of size N×M into a 2D RGB image of size N×M, where each point of the 2D image corresponds one-to-one to the 3D point cloud, and map the height value corresponding to the i-th row and j-th column of the 3D point cloud to the RGB pixel point of the i-th row and j-th column of the 2D image.

[0089] S14, let the sensor's measurement range be h, and the point cloud height be Z ij ∈(-h / 2,h / 2), with Δh as the equal interval, divide the height into K equal parts, K = h / Δh, establish a color table, randomly select K different colors and put them into the color table, so that different height segments are represented by different colors, and the same height segments are represented by the same color. The corresponding relationship between height and color is:

[0090]

[0091] Where [·] is the rounding function, t represents the tth color in the color table, t∈[0,K-1].

[0092] S15, determine the coordinates (X i ,Y j) is present. If the current point has a height value, the color of the i-th row and j-th column of the two-dimensional image is selected using formula (1). If there is no height value, the corresponding point in the two-dimensional image is represented by a color other than the color table indicated in step S14.

[0093] In this implementation, the LMI Gogator 2450 line laser sensor is installed on a hand-push track detector for data collection, and the sensor is calibrated with the plane where the rail bottom is located. The differential encoder output of the detector triggers the line laser sensor to collect the rail bottom profile data. At the same time, an RGB depth image is constructed based on the sensor parameters and profile data, so that the sensor simultaneously outputs a 3D point cloud image and a corresponding RGB depth image. The corresponding relationship between the RGB depth image and the 3D point cloud image is shown in Figure 3 .

[0094] Combination Figures 2 to 4 The implementation method of step S2 includes the following steps:

[0095] S21. Create sample labels for the RGB depth image, completely mark the entire elastic strip, and obtain a label sample dataset, denoted as D t ={X t ,Y t}, where X t is the RGB depth image, Y t For X t Ground truth label image of the bullet bar.

[0096] S22, with label D t ={X t ,Y t The Unet network is trained based on the sample set to obtain the trained fastener spring segmentation Unet network model.

[0097] S23, the unlabeled sample RGB depth image dataset D v ={X v} Input the trained Unet model to predict and segment the elastic strips in the RGB depth image and obtain I A .

[0098] S24, convert the RGB image of the elastic strip area into a binary image, set the pixels of the elastic strip area obtained by semantic segmentation to white, and the remaining pixels to black. Let the elastic strip binary image represent A, and use formula (2) to extract the skeleton of A:

[0099]

[0100] Where AΘkB represents the K-times erosion of A by the structural element B, thereby obtaining a strip-thinned skeleton image, and the skeleton point set is represented by Skeleton_p = {p0,…,p n}, (n is the number of points on the skeleton line), Represents the opening operation.

[0101] In this implementation, 2000 sample images with marked spring bars are used to train the Unet network to obtain a trained Unet network. The fastener to be inspected is input into the Unet network to quickly segment the spring bar area. Figure 5 As shown in the figure, the elastic strip image is binarized, and then the binary elastic strip image is refined with an elliptical structural element to obtain the skeleton image of the elastic strip, as shown in Figure 6 shown.

[0102] Combination Figures 5 to 8 , the implementation method of step S3 comprises the following steps:

[0103] S31, traverse the skeleton image, find the normal of each skeleton point, and let the current skeleton point be represented by p i (x i ,y i )∈Skeleton_p, search for the distance p in its neighborhood skeleton points i (x i ,y i ) The two nearest points, let the two nearest points be represented by p i1 (x i1 ,y i1 ), p i2 (x i2 ,y i2 ), using p i1 , p i2 Point calculation of the current skeleton point p i (x i ,y i ), expressed as:

[0104]

[0105] S32, image I obtained by traversing the semantic segmentation of the elastic strip A , taking the coordinates of the spring bar skeleton as the reference point, search for the points in the spring bar image that fall on each skeleton normal vector or the k1 points closest to the normal vector. Let these k1 points be represented as k1 is set by the user.

[0106] S33, the elastic skeleton points of the two-dimensional image Skeleton_p={p0,…,p n} and the k nearest points of each skeleton point Dist_p = {skep0,…,skepn} are mapped to a three-dimensional point cloud image. The mapping of a two-dimensional image to a three-dimensional point cloud includes:

[0107] According to X i =X0+Δx*x i and Y i =Y0+Δy*y i Map the points of the two-dimensional image to the three-dimensional point cloud image of the fastener, and obtain the coordinates P of the two-dimensional image in the three-dimensional point cloud. i (X i ,Y i ,Z i ), where Δx is the point spacing set by the line laser sensor in the X direction, Δy is the encoder trigger spacing, X0 is the minimum coordinate value in the X direction, Y0 is the minimum coordinate value in the Y direction, and x i and i Represents the coordinates of the two-dimensional image in the x direction and the y direction respectively. The three-dimensional skeleton point mapped by Skeleton_p is represented as Skeleton_P initial = {P0,…,P n}, the three-dimensional point set of Dist_p mapping is expressed as Dist_P = {skeP0,…,skeP n}.

[0108] S34, the cross section of the spring bar type fastener ring is circular or nearly circular. The spring bar data obtained by the line laser sensor scan only has partial surface data. In order to reduce the impact of the track environment on the fastener loosening detection, the spring bar surface skeleton point Skeleton_P is used. initial = {P0,…,P n} and multiple points on its cross section Dist_P={skeP0,…,skeP n} Fit a circle into the cross section of the elastic strip, with the center of the circle as the skeleton point of the cross section; traverse the skeleton points of the 3D point cloud Skeleton_P initial = {P0,…,P n}, let the current skeleton point be P i , with P i As the reference point, use P i and P i k points skeP on the normal tangent plane i = {P0,…,P k}Fitting the circle, the center of the circle P ci Instead of P i As the skeleton point of the current section, the skeleton point of the spring bar is expressed as Skeleton_P c = {P c0 ,…,P cn}.

[0109] In this implementation, considering that the cross-section of the elastic clip is circular, and the scanned point cloud of the elastic clip only has partial data on the upper surface, the skeleton extracted from the upper surface data as the skeleton of the elastic clip is easily affected by the track environment. Therefore, by fitting the cross-sectional circle of the elastic clip, the set of center points of each cross section is used instead of the upper surface skeleton points as the skeleton of the elastic clip, which has better robustness.

[0110] Combination Fig. 9 and Fig.11 , the implementation method of step S4 comprises the following steps:

[0111] S41. With the rail as the center, there is a row of fasteners on each side. Therefore, when analyzing the spring clip skeleton, it is necessary to consider the left and right directions of the spring clip. For normal fasteners and bolt loose fasteners, the front of the spring clip faces the rail. The vertical line where the center point of the spring clip skeleton is calculated is marked as (X center ,Y center ),and

[0112] X center =(max(Skeleton_P c .X)-min(Skeleton_P c .X)) / 2

[0113] Y center =(max(Skeleton_P c .X)-min(Skeleton_P c .X)) / 2

[0114] Among them, Skeleton_P c .XSkeleton_P c .Y represents Skeleton_P c The X, Y coordinate values ​​of the skeleton point.

[0115] S42, determine whether there is a skeleton point falling on the plane y=Y center If it exists, it means that there is an intersection between the skeleton point and the center plane of the spring bar, and the intersection is used as the center point A of the front jaw of the spring bar; if it does not exist, then on the plane y = Y center Search for a skeleton point closest to the plane on both sides, and set these two points to be P C1 (X C1 ,Y C1 ,Z C1 ), P C2 (X C2 ,Y C2 ,Z C2 ), use these two points to construct a straight line, take the intersection of the straight line and the plane as the center point A of the front jaw of the spring bar, and let point A be represented by P A (X A ,YA ,Z A ).

[0116] S43, according to the front jaw point A of the spring bar skeleton and the center plane X=X center and Y = Y cen t er , using formula (4) to divide the spring bar skeleton into four parts:

[0117]

[0118] Among them, Skeleton_P c .X, Skeleton_P c .Y represents the X and Y coordinates of each skeleton point respectively; according to formulas (5)-(8), an initial feature point B, C, D, E is selected from the skeleton points of the four parts, and each feature point is represented by P B (X B ,Y B ,Y B ), P C (X C ,Y C ,Y C ), P D (X D ,Y D ,Y D ), P E (X E ,Y E ,Y E )

[0119]

[0120]

[0121]

[0122]

[0123] Among them, max and min represent the maximum and minimum values ​​respectively.

[0124] S44, respectively establish neighborhoods of the anterior jaw point A and the four initial feature points B, C, D, and E, and take the point with the minimum value in the Z direction or the average value in the Z direction in the neighborhood of each point to update the coordinates of the original feature point.

[0125] Combination Fig.11 , the implementation method of step S5 comprises the following steps:

[0126] S51, the coordinates P of the known point spring strip feature points D and E D , P E, find the midpoint F of the line segment between points D and E, whose coordinates are expressed as P F (X F ,Y F ,Y F ).

[0127] S52. Use the characteristic points B, C and the midpoint F to construct a plane. Let the plane be the contact surface between the elastic bar and the rail elastic pad. The coordinates P of the three points B, C and F are known. B ,P C ,P F , the BCF plane can be constructed and expressed as:

[0128] αX+βY+χZ+δ=0 (8)

[0129] Among them, α, β, χ, and δ are plane parameters respectively;

[0130] S53, calculate the distance from the center point A of the front jaw to the BCF plane:

[0131]

[0132] The Deviation value indicates the tightness of the fastener. Calculate the Deviation values ​​of all the fasteners to be inspected, set the upper and lower thresholds t1 and t2. When the deviation is less than t1, the fastener pressure is too large. When the deviation value is greater than t2, the fastener is too loose.

[0133] In summary, since the data formats of two-dimensional images and three-dimensional point cloud images are completely different, the embodiments of the present invention make full use of the color and texture of two-dimensional images and the spatial structure of three-dimensional point clouds to achieve complementary advantages of the two types of data, thereby achieving faster detection speed and better robustness, and can eliminate interference from factors such as track garbage and gravel, and accurately detect defective fasteners with loose spring bars.

[0134] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for detecting the tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds, characterized in that: include: Obtain a three-dimensional point cloud image and an RGB depth image of the track including the spring clip fasteners; Segment the spring clip fastener image from the RGB depth image, and extract the spring clip fastener two-dimensional skeleton image and skeleton normal vector from the spring clip fastener image; The two-dimensional skeleton image and skeleton normal vector of the spring clip fastener are mapped to the three-dimensional point cloud image to obtain an initial three-dimensional skeleton image; and the cross-sectional circle of the three-dimensional spring clip fastener is formed by fitting the initial three-dimensional skeleton image and the normal vector of each skeleton point thereof, and the center of the circle is used as the skeleton point of the cross-sectional area of ​​the three-dimensional spring clip fastener, and the initial skeleton image is updated to obtain the three-dimensional point cloud skeleton image of the spring clip fastener; Determine the front jaw point of the three-dimensional point cloud skeleton of the spring clip fastener, and extract multiple feature points from different positions in the three-dimensional point cloud skeleton image of the spring clip fastener; The contact plane between the spring clip fastener and the track elastic pad is formed by fitting multiple feature points, and the distance between the front jaw point and the contact surface is calculated; and the tightness of the spring clip fastener is determined according to the distance between the front jaw point and the contact surface; The method of determining the front jaw point of the three-dimensional point cloud skeleton of the spring clip fastener includes: The front of the spring clip fastener is facing the track, and the vertical line (X center ,Y center ),and X center =(max(Skeleton_P c .X)-min(Skeleton_P c .X)) / 2 Y center =(max(Skeleton_P c .Y)-min(Skeleton_P c .Y)) / 2 Among them, Skeleton_P c .X,Skeleton_P c .Y represents Skeleton_P c X, Y coordinate values ​​of the skeleton point; Determine whether there is a skeleton point on the plane y=Y center If it exists, it means that there is an intersection between the skeleton point and the center plane of the spring clip, and the intersection is used as the front jaw center point A of the spring clip fastener 3D point cloud skeleton; if it does not exist, then on the plane y = Y center Search for a skeleton point closest to the plane on both sides, and set these two points to be P C1 (X C1 ,Y C1 ,Z C1 ), P C2 (X C2 ,Y C2 ,Z C2 ), use these two points to construct a straight line, and take the intersection of the straight line and the plane as the center point A of the front jaw of the three-dimensional point cloud skeleton of the spring clip fastener. Let point A be represented by P A (X A ,Y A ,Z A ); The step of extracting feature points from the three-dimensional point cloud skeleton image of the spring clip fastener comprises: According to the front jaw point A of the spring clip fastener 3D point cloud skeleton and the center plane X=X center and Y = Y center , the following formula is used to divide the three-dimensional point cloud skeleton of the spring clip fastener into four parts: Among them, Skeleton_P c .X, Skeleton_P c .Y represents the X,Y coordinates of each skeleton point respectively; according to the following formula, select an initial feature point B, C, D, E from the skeleton points of the four parts respectively, and each feature point is represented by P B (X B ,Y B ,Y B ), P C (X C ,Y C ,Y C ), P D (X D ,Y D ,Y D ), P E (X E ,Y E ,Y E ); Among them, max and min represent the maximum value and minimum value respectively; Establish the neighborhoods of the anterior jaw point A and the four initial feature points B, C, D, and E respectively, and take the point with the minimum value in the Z direction or the average value in the Z direction in the neighborhood of each point to update the coordinates of the original feature point; The determining the tightness of the spring clip fastener includes: The coordinates P of the known feature points D and E D , P E , find the midpoint F of the line segment between points D and E, whose coordinates are expressed as P F (X F ,Y F ,Y F ); Using the characteristic points B, C and the midpoint F, a plane is constructed. Let this plane be the contact plane between the spring clip fastener and the track elastic pad. The coordinates P of the three points B, C and F are known. B ,P C ,P F , construct the BCF plane, expressed as: αX+βY+χZ+δ=0 Among them, α, β, χ, δ are plane parameters respectively; Calculate the distance from the center point A of the anterior jaw to the BCF plane: The Deviation value is used to represent the tightness of the spring clip fastener. The Deviation values ​​of all the spring clip fasteners to be inspected are calculated, and the upper and lower thresholds t1 and t2 are set. When the Deviation value is less than t1, the fastener pressure is too large. When the Deviation value is greater than t2, the fastener is too loose.

2. The method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds as claimed in claim 1, characterized in that: The acquisition of the three-dimensional point cloud image includes: The line laser scanning sensor is vertically mounted on the inspection vehicle, and the encoder mounted on the inspection vehicle is used to trigger the line laser sensor to dynamically scan the track profile; Set the acquisition range of the line laser sensor in the horizontal and height directions, establish the data acquisition coordinate system, set the forward direction of the inspection vehicle as the Y direction, the vertical track direction as the X direction, and the height direction as the Z direction; set the point spacing of the line laser sensor in the X direction to be Δx, the encoder trigger spacing to be Δy, the number of point clouds in the X direction to be N, and the M lines of contours in the Y direction to form a three-dimensional point cloud image of the track; Among them, in the track 3D point cloud diagram, the coordinate of the i-th point in the X direction is expressed as X i =X0+i*Δx, the Y coordinate of the jth row is expressed as Y j =Y0+j*Δy, X0 and Y0 are the starting coordinates in the X and Y directions, i=1,2,…,N-1, j=1,2,…,M-1, then the height of the point in the i-th row and j-th column is expressed as Z ij , whose point cloud is represented as (X i ,Y j ,Z ij ).

3. The method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds as claimed in claim 2, characterized in that: The acquisition of the RGB depth image includes: Convert a 3D point cloud image of size N×M to a 2D RGB image of size N×M; each point in the 2D image corresponds one-to-one to the 3D point cloud, and map the height value corresponding to the i-th row and j-th column of the 3D point cloud to the RGB pixel point of the i-th row and j-th column of the 2D image; Assume that the measurement range of the laser sensor is h and the point cloud height is Z ij ∈(-h / 2,h / 2), with Δh as the equal interval, divide the height into K equal parts, K = h / Δh, establish a color table, randomly select K different colors and put them into the color table, so that different height segments are represented by different colors, and the same height segments are represented by the same color. The corresponding relationship between height and color is: Where [·] is the rounding function, t represents the tth color in the color table, t∈[0,K-1].

4. The method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds as claimed in claim 1, characterized in that: The step of segmenting the spring clip fastener image from the RGB depth image includes: Create sample labels for the RGB depth image to mark the spring clip fasteners and obtain a label sample dataset, denoted as D t ={X t ,Y t }, where X t is the RGB depth image, Y t For X t The ground truth label image of the bullet-hit bar fastener; With labeled sample dataset D t ={X t ,Y t } Train the Unet network to obtain the trained clip fastener segmentation Unet network model; The unlabeled sample dataset D v ={X v Input the trained clip fastener segmentation Unet network model to predict and segment the clip fastener image I in the RGB depth image A .

5. The method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds as claimed in claim 4, characterized in that: The step of extracting a two-dimensional skeleton image of the spring clip fastener from the spring clip fastener image comprises: Clip fastener image I A Convert it into a binary image, set the pixels of the spring clip fastener to white, and the rest of the pixels to black. Let the binary image be A, and use the following formula to extract the skeleton of A: Among them, AΘkB represents the two-dimensional image of the spring clip fastener skeleton obtained by corroding A k times with the structural element B, and its point set is represented by Skeleton_p={p0,…,p n }, n is the number of points on the skeleton line, Represents the opening operation.

6. The method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds as claimed in claim 1, characterized in that: Mapping the two-dimensional skeleton image of the spring clip fastener to the three-dimensional point cloud image to obtain an initial three-dimensional skeleton image includes: Traverse the skeleton image and obtain the normal vector of each skeleton point; let the current skeleton point be represented by p i (x i ,y i )∈Skeleton_p, Skeleton_p is the two-dimensional image point set of the spring clip fastener skeleton; search for the distance p in the neighboring skeleton points of the current skeleton point i (x i ,y i ) The two nearest points, let the two nearest points be represented by p i1 (x i1 ,y i1 ), p i2 (x i2 ,y i2 ), using p i1 , p i2 Point calculation of the current skeleton point p i (x i ,y i ) It is expressed as: Traversing the Clip Fastener Image I A , taking the skeleton coordinates of the spring clip as the reference point, search for the points in the spring clip image that fall on each skeleton normal vector or the k1 points closest to the normal vector. Let the k1 points be represented as k1 is set by the user; The two-dimensional image point set of the spring clip skeleton Skeleton_p={p0,…,p n } and the k nearest points of each skeleton point Dist_p = {skep0,…,skep n } are mapped into the three-dimensional point cloud image to obtain an initial three-dimensional skeleton image; wherein the mapping includes: According to X i =X0+Δx*x i and Y i =Y0+Δy*y i Map the points of the two-dimensional image to the three-dimensional point cloud image of the fastener, and obtain the coordinates P of the two-dimensional image in the three-dimensional point cloud. i (X i ,Y i ,Z i ), where Δx is the point spacing set by the line laser sensor in the X direction, Δy is the encoder trigger spacing, X0 is the minimum coordinate value in the X direction, Y0 is the minimum coordinate value in the Y direction, and x i and i Represent the coordinates of the two-dimensional image in the x direction and the y direction respectively. The initial three-dimensional skeleton point mapped by Skeleton_p is represented as Skeleton_P initial = {P0,…,P n }, the three-dimensional point set of Dist_p mapping is expressed as Dist_P = {skeP0,…,skeP n }.

7. The method for detecting tightness of spring clip fasteners by fusing two-dimensional images and three-dimensional point clouds as claimed in claim 6, characterized in that: The determination of the three-dimensional point cloud skeleton image of the spring clip fastener includes: Using the initial 3D skeleton point Skeleton_P initial = {P0,…,P n } and multiple points on its cross section Dist_P={skeP0,…,skeP n } Fit a circle into the cross section of the elastic strip, with the center of the circle as the skeleton point of the cross section; Traverse the initial 3D point cloud skeleton point Skeleton_P initial = {P0,…,P n }, let the current skeleton point be P i , using P i and P i k points skeP on the normal tangent plane i = {P0,…,P k }Fitting circle, the center P ci Instead of P i As the skeleton point of the current section, the three-dimensional point cloud skeleton point of the spring clip fastener is obtained, which is represented by Skeleton_P c = {P c0 ,…,P cn }.