Pantograph self-adaptive cavel state detection method and system
By combining high-definition cameras and LED flashes to obtain pantograph pictures, template matching and deep learning methods are used to solve the problems of insufficient detection accuracy and high resource requirements, and efficient and low-cost detection of horn states is achieved.
Patent Information
- Application Number
- CN202510400483.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-08
AI Technical Summary
When detecting the state of pantograph horns, the prior art has problems such as insufficient detection accuracy and high computing resource requirements, making it difficult to fully cover all types of failures and increase system costs.
Combining high-definition cameras and LED flashes to obtain pantograph pictures, traditional image methods and deep learning methods are used to filter the areas to be matched through template matching and fast search strategies, and using conditions such as the number of edge lines, angles and length to judge the status of the sheep horns, reducing hardware costs.
It improves detection accuracy and efficiency, enhances detection capabilities for undefined exception types, has better adaptability and robustness, and reduces system costs.
Smart Images

Figure CN120279326A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent operation and maintenance of urban rail transit, and particularly relates to a method and system for detecting the state of a pantograph adaptor horn. Background Art
[0002] With the rapid development of urban rail transit, the problem of train on-line operation safety has become increasingly prominent. As a key connecting component between the catenary and the train, the state of the pantograph adaptor horn directly affects the stability of power transmission and the safety of train operation. The adaptor horns are installed on both sides of the bow head and are key components to maintain the balance of the bow head. Abnormal states of the adaptor horns may lead to problems such as poor contact and arc discharge, which may further cause equipment damage or operation failures. By detecting the state of the adaptor horns in real time, defects such as wear, deformation or cracks can be discovered in time to prevent potential safety hazards. In addition, regular detection helps to optimize the maintenance plan, extend the service life of equipment and reduce the operation and maintenance costs. Therefore, detecting the state of the pantograph adaptor horns is crucial for ensuring the safe and efficient operation of urban rail transit trains.
[0003] Currently, the mainstream approach for detecting the pantograph attitude is to extract the key points of the adaptor horns through related technologies, and then detect the pantograph attitude based on the key points of the adaptor horns. The Euler angle information is used to represent the pantograph attitude, and then the operating state of the pantograph adaptor horns is evaluated. Existing research results mainly focus on the local features near the boundary points, and do not consider the spatial position changes and deformation states of the adaptor horns. In this case, although the key point detection algorithm can correctly extract the boundary points of the adaptor horns and calculate the Euler angles of the pantograph, the obtained angle parameters may not accurately reflect the true state of the pantograph. Therefore, it is necessary to detect key components such as the adaptor horns of the bow head. On the one hand, it can ensure the accuracy of the attitude parameters calculated based on the key points for the feedback of the pantograph state. On the other hand, the state of the pantograph mechanical structure can be preliminarily judged through the state detection of the key components to avoid directly entering the complex key point extraction process, which can improve the detection efficiency.
[0004] Patent CN202411307956.6 discloses a method and system for detecting the state of a pantograph adaptor horn. This method uses an overall pantograph detection model to identify the pantograph region image in the adaptor horn state image; uses a target adaptor horn detection model to perform semantic segmentation on the pantograph region image to form an adaptor horn image; performs fine segmentation on the adaptor horn image to form an adaptor horn feature image, and uses an abnormal state detection model to determine whether each adaptor horn in the adaptor horn feature image is in an abnormal contour structure state. However, this method mainly relies on image recognition and segmentation technologies and may not comprehensively cover all types of pantograph faults.
[0005] Patent CN202110919528.9 discloses a real-time detection method, device, computer equipment and storage medium for pantograph horns. Based on the machine vision target detection method, the video of the pantograph horns obtained in real time on the roof is used to identify and locate the horn area. Then, the obtained horn image is subjected to binary processing, opening and closing operation processing, and contour fitting extraction to obtain the real-time values of the horn geometric contour and horn geometric parameters. Finally, according to the comparison between the real-time values of the horn geometric parameters and the designed allowable variation range, it is judged whether the horn is qualified in the current state, so as to achieve the purpose of real-time detection of the pantograph horns. However, this method requires high computing resources for real-time video processing and image analysis, puts forward high requirements for the hardware performance of on-vehicle equipment, and increases the system cost. Summary of the Invention
[0006] The purpose of the present invention is to provide a method and system for adaptive horn state detection of a pantograph, realizing the intelligent analysis of the horn state of the pantograph and improving the detection accuracy and efficiency.
[0007] The technical solution for realizing the purpose of the present invention is: a method for adaptive horn state detection of a pantograph, including:
[0008] Step 1: Based on the on-site acquisition module, collect the overall state image of the pantograph in real time during the train operation;
[0009] Step 2: Identify the horn state image from the overall state image of the pantograph;
[0010] Step 3: Classify and detect the defined horn fault types; for the undefined horn fault types, search and screen the regions to be matched in the horn state image;
[0011] Step 4: Perform template matching between the template image and the image of the region to be matched to obtain the maximum similarity during the matching process;
[0012] Step 5: Compare the maximum similarity with the set similarity threshold:
[0013] When the maximum similarity is not greater than the similarity threshold, it indicates that the horn has an abnormal state, and the detection ends;
[0014] When the maximum similarity is greater than the threshold, then proceed to the next step;
[0015] Step 6: Take the region with the maximum similarity during the matching process as the accurate horn region, and extract the horn edge line of the accurate horn region image;
[0016] Step 7: Judge the horn state according to the horn edge line characteristics: if the number of horn edge lines is less than 2, it is determined that the horn has an abnormal state, and the detection ends; otherwise, it is determined that the horn is in a normal state.
[0017] A pantograph adaptive horn state detection system, which is used to implement the pantograph adaptive horn state detection method described above. The system includes a field acquisition module and a central processing module, where:
[0018] The field acquisition module collects the overall state image of the pantograph during the train operation in real time and outputs it to the central processing module;
[0019] Based on the received overall state image of the pantograph, the central processing module performs the following processing:
[0020] Identify the horn state image from the overall state image of the pantograph;
[0021] Classify and detect the defined horn fault types; for the undefined horn fault types, search and filter the regions to be matched in the horn state image;
[0022] Perform template matching between the template image and the image of the region to be matched to obtain the maximum similarity during the matching process;
[0023] Compare the maximum similarity with the set similarity threshold: when the maximum similarity is not greater than the similarity threshold, it indicates that there is an abnormal state in the horn and the detection ends; when the maximum similarity is greater than the threshold, then proceed to the next step;
[0024] Take the region with the maximum similarity during the matching process as the precise horn region, and extract the horn edge line of the precise horn region image;
[0025] Judge the horn state according to the horn edge line characteristics: if the number of horn edge lines is less than 2, it is determined that there is an abnormal state in the horn and the detection ends; otherwise, it is determined that the horn is in a normal state.
[0026] Compared with the prior art, the significant advantages of the present invention are: (1) Obtain the pantograph picture through a high-definition camera and an LED flash, combine the traditional image method with the deep learning method, detect the horn fault model, and realize the intelligent analysis of the pantograph horn state, improving the detection accuracy and efficiency; (2) Adopt a fast search strategy to screen the regions to be matched and perform template matching, preliminarily judge the horn state by comparing with the threshold, and then take the region with the maximum matching similarity as the precise region, and comprehensively judge according to conditions such as the number, angle, and length of the edge lines, which has the advantages of improving the detection efficiency and effectively judging abnormalities; (3) Not only improves the classification performance of the target positioning model, but also enhances the detection ability for undefined abnormal types, making the horn state detection have better self-adaptability and robustness, and can effectively cope with complex actual working environments; (4) The system structure design is simple, and only two groups of high-definition cameras and LED fill lights are required to realize the detection of the pantograph horn state, reducing the cost. Description of the Drawings
[0027] Figure 1 It is the flowchart of the pantograph horn state detection method in the present invention.
[0028] Figure 2 It is the installation schematic diagram of the acquisition module for pantograph horn state detection in the present invention.
[0029] Figure 3 It is the image obtained by the acquisition module in the present invention.
[0030] Figure 4 It is the horn template diagram used for pantograph horn state detection in the present invention.
[0031] Figure 5 It is the flowchart of the fast search strategy in the present invention.
[0032] Figure 6 It is the result diagram of the calculation of the length of the horn edge line in the present invention.
[0033] Figure 7 It is the result diagram of the calculation of the angle of the horn edge line in the present invention.
[0034] Figure 8 It is the result diagram of the calculation of the matching similarity of the horn in the present invention.
[0035] Figure 9 It is the diagram of the missing front horn or rear horn in the present invention.
[0036] Figure 10 It is the result diagram of the normal template matching in the present invention.
[0037] Figure 11 It is the result diagram of the matching of the horn missing template in the present invention.
[0038] Figure 12 It is the result diagram of the matching of the deformed horn template in the present invention.
[0039] Figure 13 It is the flowchart of the horn abnormal state diagnosis based on template matching in the present invention. Specific embodiments
[0040] The present invention provides a pantograph adaptive horn state detection method, including:
[0041] Step 1: Based on the on-site acquisition module, real-time collect the overall state image of the pantograph during the train operation;
[0042] Step 2: Identify the horn state image from the overall state image of the pantograph;
[0043] Step 3: Classify and detect the defined horn fault types; for the undefined horn fault types, search and screen the regions to be matched in the horn state image;
[0044] Step 4: Perform template matching between the template image and the image of the area to be matched to obtain the maximum similarity during the matching process;
[0045] Step 5: Compare the maximum similarity with the set similarity threshold:
[0046] When the maximum similarity is not greater than the similarity threshold, it indicates that the horn is in an abnormal state, and the detection ends;
[0047] When the maximum similarity is greater than the threshold, proceed to the next step;
[0048] Step 6: Take the area with the maximum similarity during the matching process as the precise area of the horn, and extract the horn edge line of the image of the precise area of the horn;
[0049] Step 7: Judge the horn state according to the horn edge line characteristics: If the number of horn edge lines is less than 2, it is determined that the horn is in an abnormal state and the detection ends; otherwise, it is determined that the horn is in a normal state.
[0050] As a specific example, Step 1 is specifically as follows:
[0051] S11: The on-site acquisition module includes a photoelectric sensor, an attitude camera, and an LED flash. The attitude camera acquires the full-bow image of the pantograph, the LED flash provides additional light source for the attitude camera, and the photoelectric sensor is used to detect whether the pantograph reaches the detection position;
[0052] S12: The attitude camera is installed 100 mm above the catenary, and the bow head image is acquired at a set depression angle. Two groups of LED flashes are selected to enhance the brightness of the bow head area and are installed on both sides of the track respectively;
[0053] S13: The photoelectric sensors are installed on both sides of the track, 5 - 10 mm below the lowest point of the catenary. When the photoelectric sensors detect that the pantograph reaches the measurement position, the attitude camera and the LED flash are synchronously triggered to acquire the real-time image of the overall state of the pantograph.
[0054] As a specific example, Step 2 is specifically as follows:
[0055] S21: Form a training set and a test set according to the overall state image of the pantograph;
[0056] S22: There is an overlapping phenomenon between the two horns on the same side of the skateboard in the picture, and it is impossible to define the labels for the faults of each horn separately; the two horns on the same side are regarded as a whole, and the horn abnormalities are divided into four horn fault types: missing left horn, missing right horn, deformed left horn, and deformed right horn;
[0057] S23: Based on the training set and the validation set, use the improved YOLOv5s model to classify and detect the defined horn fault types; the improved YOLOv5s model specifically uses the EfficientNetV2 network as the backbone network, the Dysample sampler, and the ECIoU loss function, which can more stably and effectively guide the learning process of the model, reduce the training time, and improve the training efficiency.
[0058] As a specific example, the searching and screening of the region to be matched in the horn status image in step 3 are as follows:
[0059] S31: Affected by the running attitude of the pantograph, the relative attitude of the front and rear horns on the same side is not fixed. The front horn can collect a complete contour every time, while the rear horn is blocked by the front horn to varying degrees. To balance the real-time performance and accuracy of the algorithm, a single-horn image is used as the template image T.
[0060] S32: Match the horn status image with the template image based on the image gray-level matching method, search and screen the region to be matched in the horn status image, and traverse the template image T on the image S to be searched in the order from top to bottom and from left to right.
[0061] S33: Use the similarity metric function to calculate the similarity between the sub-image S i,j in the current window (i, j) of the image S to be searched and the template image T, and take the position of the sub-image with the maximum similarity as the final matching position. The similarity calculation is as follows:
[0062]
[0063] In the formula, is the pixel mean value of the template image T, is the pixel mean value of S i,j
[0064] As a specific example, the template matching in step 4 is as follows:
[0065] S41: Detect whether the improved YOLOv5 model described in step S23 provides the position information of the horn;
[0066] S42: If the position information of the horn is provided, combine the structural dimensions of the pantograph head to obtain the preliminary positions of the left and right horns;
[0067] Use the upper left and lower right coordinates to define the horn rectangular area. The formula for defining the left horn rectangular area is as follows:
[0068]
[0069] In the formula, (xhl_tl , y hl_tl ), (x hl_br , y hl_br ) represent the pixel coordinates of the upper left corner and the lower right corner of the left sheep's horn rectangular area respectively, and (x sl_tl , y sl_tl ) is the pixel coordinate of the upper left corner of the left spring cylinder rectangular area. w and h represent the pixel width and height of the sheep's horn respectively, and δ x , δ y represent the pixel margins in the horizontal and vertical directions respectively;
[0070] The formula for defining the right sheep's horn rectangular area is as follows:
[0071]
[0072] In the formula, (x hr_tl , y hr_tl ), (x hr_br , y hr_br ) represent the pixel coordinates of the upper left corner and the lower right corner of the right sheep's horn rectangular area respectively, and (x sr_tl , y sr_tl ) is the pixel coordinate of the upper left corner of the left spring cylinder rectangular area. w and h represent the pixel width and height of the sheep's horn respectively;
[0073] S43: If the position information of the sheep's horn is not provided, adopt the image block strategy, and extract the area to be matched based on the number of sheep's horn pixel points and edge features:
[0074] First, perform block processing on the sheep's horn state image based on the pixel size of the template image;
[0075] Then, binarize each sub-image and count the number of white pixel points N w . When N w > N Set1 or N w < N Set2 , the area where the sub-image is located belongs to the invalid area, otherwise, proceed to the next step of sheep's horn edge extraction. Among them, N Set1 , N Set2 are the set upper threshold and lower threshold of pixel points respectively, used to filter out sub-images with mostly black or white pixel points in the area.
[0076] As a specific example, the threshold setting in step 5 is as follows:
[0077] Set the following thresholds for the diagnostic method of abnormal sheep's horn state based on template matching:
[0078] The pixel width w and height h of the sheep's horn, and the pixel margins δ x , δy , the upper and lower threshold values N of the pixel points Set1 and N Set2 , the length threshold l of the left and right horn edge lines Set1 and l Set2 , the maximum and minimum angle thresholds θ of the horn edge line Set1 and θ Set2 , the template matching similarity threshold S t ;
[0079] The pixel width w and height h of the horn are used to represent the geometric dimensions of the horn. Analyze the left and right horn template images, calculate the pixel width and height of the left and right horns respectively, and assign the larger values to the parameters w and h; for the parameter l Set1 and l Set2 , θ Set1 , θ Set1 and S t , analyze using a normal pantograph image and give specific numerical values based on the statistical analysis results.
[0080] As a specific example, the horn edge extraction process in step 6 is as follows:
[0081] S61: After screening according to the number of pixel points in step S43, use the Canny edge operator to extract the edge image of each sub - graph, and use the Hough transform to extract the straight - line edge. Analyze whether there is a straight - line edge in the sub - graph that satisfies the following formula. If there is, take this sub - graph as the region to be matched, otherwise it is an invalid region:
[0082]
[0083] In the formula, l l and l r are the lengths of the left and right horn edge lines respectively, θ l and θ r are the angles of the left and right horn edge lines respectively, l set1 and l set2 are the length thresholds of the horn edge line, θ set1 and θ set2 are the angle thresholds of the horn edge line;
[0084] S62: After screening, the obtained regions to be matched may still have some interference images. However, compared with the complete pantograph image, the number of calculations has been greatly reduced, and subsequent filtering can be performed according to the similarity of template matching. Affected by the running posture of the pantograph, the regions to be matched may only contain partial horn images. Therefore, the actual matching region needs to be expanded to include the complete horn image. The limitation of the actual matching region is shown in the following formula:
[0085]
[0086] Wherein, (x p_tl , y p_tl ), (x p_br , y p_br ) respectively represent the pixel coordinates of the upper left corner and the lower right corner of the actual registration rectangular area, and (x s_tl , y s_tl ), (x s_br , y s_br ) respectively represent the pixel coordinates of the upper left corner and the lower right corner of the rectangular area to be registered, and w and h respectively represent the pixel width and height of the sheep's horn.
[0087] As a specific example, the process of judging the state of the sheep's horn in step S7 is as follows:
[0088] When the number of the edge lines of the sheep's horn is less than 2, it indicates that the state of the sheep's horn is abnormal, otherwise the state of the sheep's horn is normal. The screening conditions for the edge lines of the sheep's horn are as follows, and the relevant thresholds are determined based on the normal edge of the sheep's horn.
[0089]
[0090] Wherein, is the pixel mean value of the template T, is the pixel mean value of the search image S under the current window (i, j).
[0091]
[0092] Wherein, (x hl_tl , y hl_tl ), (x hl_br , y hl_br ) respectively represent the pixel coordinates of the upper left corner and the lower right corner of the left sheep's horn rectangular area, (x sl_tl , y sl_tl ) is the pixel coordinate of the upper left corner of the left spring cylinder rectangular area, w and h respectively represent the pixel width and height of the sheep's horn, and δ x , δ y respectively represent the pixel margins in the horizontal and vertical directions.
[0093] When the structural features of the sheep's horn change, the detected edge straight line is quite different from the edge line of the sheep's horn in parameters such as angle and length. Based on this feature, a simple discrimination of the abnormal state of the sheep's horn is realized.
[0094] The present invention also provides a pantograph adaptive sheep's horn state detection system, which is used to implement the pantograph adaptive sheep's horn state detection method. The system includes a field acquisition module and a central processing module, wherein:
[0095] The on-site acquisition module collects the overall state images of the pantograph during the train operation in real time and outputs them to the central processing module;
[0096] Based on the received overall state images of the pantograph, the central processing module performs the following processing:
[0097] Identify the horn state images from the overall state images of the pantograph;
[0098] Classify and detect the defined horn fault types; for the undefined horn fault types, search and filter the regions to be matched in the horn state images;
[0099] Perform template matching between the template image and the image of the region to be matched to obtain the maximum similarity during the matching process;
[0100] Compare the maximum similarity with the set similarity threshold: when the maximum similarity is not greater than the similarity threshold, it indicates that the horn is in an abnormal state and the detection ends; when the maximum similarity is greater than the threshold, then proceed to the next step;
[0101] Take the region with the maximum similarity during the matching process as the precise horn region, and extract the horn edge lines of the precise horn region image;
[0102] Judge the horn state according to the horn edge line features: if the number of horn edge lines is less than 2, it is determined that the horn is in an abnormal state and the detection ends; otherwise, it is determined that the horn is in a normal state.
[0103] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0104] Embodiment
[0105] Combined with Figure 1 , a method for adaptively detecting the horn state of a pantograph according to the present invention includes the following steps:
[0106] S1: Two sets of attitude cameras and LED flashlights are symmetrically installed about the center line of the rail in a mirror image and collect pantograph images vertically downward. The installation schematic is as Figure 2 shown, and the specific process is as follows:
[0107] S11: The attitude camera is of the Basler acA1600-20gm type, the flashlights are of the YH-TD8J250-1703 type, and the photoelectric sensor is of the Keyence PZ-G52CP type;
[0108] S12: The attitude cameras are installed 100 mm above the contact wire and collect the images of the pantograph head with a slight downward angle. Two sets of LED flashlights are selected to enhance the brightness of the pantograph head area and are installed on both sides of the track respectively;
[0109] S13: The photoelectric sensors are installed on both sides of the track, 5-10 mm below the lowest point of the catenary. When the photoelectric sensors detect that the pantograph reaches the measurement position, the attitude camera and the LED flash are triggered synchronously to collect the real-time image of the pantograph head.
[0110] S13: When the photoelectric sensors detect that the pantograph reaches the measurement position, the attitude camera and the LED flash are triggered synchronously to collect the real-time image of the pantograph head. The center of the LED flash is flush with the lowest point of the contact wire, and a special rectangular light-transmitting panel is used to control the shape of the light spot near the skateboard;
[0111] S13: The LED flash and the high-definition camera are symmetrically installed about the center of the rail. By controlling the installation height of the camera and the LED flash, the interference above the skateboard is effectively reduced, the image quality of the skateboard is improved, and the collected image is as Figure 3 shown.
[0112] S2: Using the overall pantograph image, identify the horn state image in the pantograph area image, and classify and detect the defined abnormal horn fault types. The specific process is as follows:
[0113] S21: According to the historical pantograph images, form a training set and a test set;
[0114] S22: There is an overlapping phenomenon between the two horns on the same side of the skateboard in the picture, and it is impossible to define the labels for the faults of each horn separately. The two horns on the same side are regarded as a whole, and the horn abnormalities are divided into four types: missing left horn, missing right horn, deformed left horn, and deformed right horn;
[0115] S23: Using the training set and the validation set, detect the defined horn types by using the improved YOLOv5s model.
[0116] S3: For the undefined horn faults, quickly search and filter one or several areas in the image where the horns may appear as the areas to be matched. The specific process is as follows:
[0117] S31: Affected by the running attitude of the pantograph, the relative attitude of the front and rear horns on the same side is not fixed. The complete contour of the front horn can be collected each time, while the rear horn is blocked by the front horn to varying degrees. In practical applications, in order to balance the real-time performance and accuracy of the algorithm, a single-horn image is used as the template image, and the binarized image is used for template matching. The left and right horn templates are as Figure 4 shown;
[0118] S32: Traverse the template image T on the image S to be searched in the order from top to bottom and from left to right, and take the position of the sub-image with the maximum similarity as the final matching position;
[0119] S4: Perform template matching between the template image and the image of the area to be matched, obtain the maximum similarity during the matching process, and compare it with the set threshold. The specific process is as follows:
[0120] S41: Analyze the YOLOv5s detection results described in step S23 to determine whether the spring cylinders corresponding to the left and right sheep horns exist.
[0121] S42: When the spring cylinder exists, limit the rectangular areas of the left and right sheep horns according to the following formula:
[0122]
[0123] S43: When the position information of the spring cylinder is missing, adopt an image block strategy to extract the area to be matched based on the number of pixel points and edge features. The specific process is as Figure 5 shown.
[0124] S5: The method for diagnosing the abnormal state of the sheep horn based on template matching mainly involves the following thresholds: the pixel width w and height h of the sheep horn, and the pixel margins δ x 、δ y , the pixel point threshold N Set1 and N Set2 , the length threshold l Set1 、l Set2 , the angle threshold θ Set1 、θ Set2 , and the template matching similarity threshold S t ;
[0125] S51: Analyze the left and right sheep horn template images, calculate the pixel width and height of the left and right sheep horns respectively, and assign the larger value to the parameters w and h. In the used template images, the pixel widths of the left and right sheep horns are 121 and 128 respectively, and the pixel heights are 135 and 144 respectively. Therefore, set the parameters w = 130, h = 145, and set the pixel margin δ x =δ y =30;
[0126] S52: The pixel point thresholds N set1 and N set2 are mainly used to filter out sub - images with mostly black or white pixel points in the area. Their screening conditions are relatively loose. Set N set1 =2000 and N set2 =10000. For the parameters l set1 、l set2 、θ Set1 、θ Set2 and S t, the normal pantograph image is used for analysis, and specific numerical values are given based on the statistical analysis results. The lengths, angles of the ram's horn edge lines, and the calculation results of the maximum similarity of ram's horn matching are shown respectively as Figure 6 、 Figure 7 、 Figure 8 shown;
[0127] S53: According to the length of the ram's horn edge line described in S52, the minimum values of the edge line lengths of the left and right ram's horns are 51.43 and 84.90 respectively, the maximum values are 122.64 and 126.75 respectively, and the 95% confidence intervals are [56.13, 123.99] and [95.43, 121.29] respectively; according to the angle of the ram's horn edge line described in S52, the minimum values of the edge line angles of the left and right ram's horns are 26° and -38° respectively, the maximum values are 40° and -24° respectively, and the 95% confidence intervals are [26.63, 35.30] and [-33.25, -27.55] respectively; according to the maximum similarity result of ram's horn matching described in S52, the minimum values of the template matching similarities of the left and right ram's horns are 0.682 and 0.712 respectively, the maximum values are 0.865 and 0.798 respectively, and the 95% confidence intervals are [0.672, 0.868] and [0.719, 0.812] respectively. Therefore, the parameters lset1, lset2, θ Set1 、θ Set2 and S t are set to 50, 80, 20, 40, and 0.6 respectively;
[0128] S54: Use the template image to perform ram's horn matching on the pantograph image. When the similarity is less than 0.65, it indicates that the normal ram's horn matching fails and the ram's horn state is abnormal. When the similarity is greater than 0.65, it indicates that there is a complete ram's horn contour in the pantograph image, but it cannot indicate that the states of the two ram's horns on the same side are both normal. Subsequently, the ram's horn is judged abnormal according to the number of ram's horn edge lines.
[0129] S6: For the ram's horn with a similarity greater than the threshold, the area with the maximum matching similarity is used as the precise area of the ram's horn to extract the straight edge of the image. The specific process is as follows:
[0130] S61: After screening according to the number of pixel points in step S43, use the Canny edge operator to extract the edge image of each sub - graph, and use the Hough transform to extract the straight edge. Analyze whether there is a straight edge in the sub - graph that satisfies the following formula. If it exists, regard the sub - graph as the area to be matched, otherwise it is an invalid area:
[0131]
[0132] In the formula, l l 、l rThey are the lengths of the left and right horn edge lines, θ l , θ r are the angles of the left and right horn edge lines respectively, l set1 , l set2 is the length threshold of the horn edge line, θ set1 , θ set2 are the angle thresholds of the horn edge line respectively;
[0133] S62: After screening, there may still be some interference images in the obtained area to be matched. However, compared with the complete pantograph image, the number of calculations has been greatly reduced, and they can be filtered out according to the similarity of template matching subsequently. Affected by the running posture of the pantograph, only partial horn images may be included in the area to be matched. Therefore, the actual matching area needs to be expanded to include the complete horn image. The definition of the actual matching area is shown in the following formula:
[0134]
[0135] In the formula, (x p_tl , y p_tl ), (x p_br , y p_br ) represent the pixel coordinates of the upper left corner and the lower right corner of the actual registration rectangle area respectively, (x s_tl , y s_tl ), (x s_br , y s_br ) represent the pixel coordinates of the upper left corner and the lower right corner of the rectangle area to be registered respectively, and w and h represent the pixel width and height of the horn. The edge line extraction result is as shown in Figure 9 shown.
[0136] S7: Judge the horn state according to the edge line features described above. The specific steps are as follows:
[0137] S71: When the number of horn edge lines is less than 2, it indicates that the horn state is abnormal; otherwise, the horn state is normal;
[0138] S72: During the train operation, affected by factors such as train vibration, the pose of a normal horn will move within a small range. Translation and rotation at a small angle will not affect the result of template matching. The normal horn data set consists of 219 real-time pantograph images. Although there are differences in the brightness and pose of the pantograph images, the template matching method used can correctly identify the horn, Figure 10 showing the matching similarity during the detection of normal horns and the algorithm processing time of each picture.
[0139] For horn missing and horn deformation, the change in the horn structure results in a small similarity with the horn template, that is, the template matching fails. For horn missing and horn deformation, their template matching results are respectively as shown inFigure 11 and Figure 12 as shown
[0140] As can be seen from the Figure 11 above, there are 16 and 7 pictures respectively in the left and right missing horn datasets whose matching similarities are greater than the threshold of 0.65. Analyzing the original images, it is found that these pictures all have the following horn features: only one of the front and rear horns is missing, and there are horns with a complete contour. For horn pictures with such features, the template matching similarity greater than 0.65 is in line with the reality and does not belong to the misdetection category. Only using the template matching method cannot correctly judge the state of such horns, and it is necessary to further judge whether the horns are abnormal according to the number of horn edge lines. As Figure 9 shown by the red straight lines in
[0141] As can be seen from the Figure 12 above, there are 5 pictures in the left deformed horn dataset whose matching similarities are greater than the threshold of 0.65, and the detection accuracy is 0.86. The matching similarities of the right deformed horn dataset are all less than 0.65, and the detection accuracy is 1. Analyzing the original images, it is found that the deformation scale of the horns in these pictures is small, and the difference from the horn template after binarization is small. The overall process is as Figure 13 shown
[0142] It can be seen from Figures 10 to 12 the above that the maximum matching times of the left and right missing horn images are 7.82 s and 8.08 s respectively, and the average matching times are 2.62 s and 2.68 s respectively; the maximum matching times of the left and right deformed horn images are 5.95 s and 8.13 s respectively, and the average matching times are 2.18 s and 4.37 s respectively; the maximum matching times of the left and right normal horn images are 7.69 s and 8.44 s respectively, and the average matching times are 3.58 s and 4.82 s respectively.
[0143] In summary, for the abnormal horn dataset, the number of correctly identified samples of the horn abnormal state diagnosis method based on template matching is 185, the number of misdetections is 6, the detection accuracy is 0.968, and the average matching time is 2.89 s; for the normal horn dataset, the number of correctly identified samples of the horn abnormal state diagnosis method based on template matching is 438, the number of misdetections is 0, the detection accuracy is 1, and the average matching time is 4.2 s.
[0144] For other structures of the pantograph adaptive horn state detection method described in the present invention, reference can be made to the prior art and will not be elaborated here.
[0145] The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Therefore, any modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A pantograph self - adaptive horn state detection method, characterized in that Including: Step 1: Based on the on-site acquisition module, the overall state image of the pantograph during train operation is acquired in real time. Step 2: From the overall state image of the pantograph, the horn state image is identified. Step 3: Classify and detect the defined horn fault types; for the undefined horn fault types, search and screen the regions to be matched in the horn state image. Step 4: Perform template matching between the template image and the image of the region to be matched to obtain the maximum similarity during the matching process. Step 5: Compare the maximum similarity with the set similarity threshold: When the maximum similarity is not greater than the similarity threshold, it indicates that the horn is in an abnormal state, and the detection ends. When the maximum similarity is greater than the threshold, proceed to the next step. Step 6: Take the region with the maximum similarity during the matching process as the precise horn region, and extract the horn edge line of the precise horn region image. Step 7: Judge the horn state according to the horn edge line characteristics: If the number of horn edge lines is less than 2, it is determined that the horn is in an abnormal state, and the detection ends; otherwise, it is determined that the horn is in a normal state.
2. The pantograph adaptive horn state detection method according to claim 1, wherein, Step 1 is specifically as follows: S11: The on-site acquisition module includes a photoelectric sensor, an attitude camera, and an LED flash. The attitude camera acquires the full-bow image of the pantograph, the LED flash provides additional light source for the attitude camera, and the photoelectric sensor is used to detect whether the pantograph reaches the detection position. S12: The attitude camera is installed 100 mm above the catenary wire, and the bow head image is acquired at a set depression angle. Two groups of LED flashes are selected to enhance the brightness of the bow head area and are installed on both sides of the track respectively. S13: The photoelectric sensors are installed on both sides of the track, 5 - 10 mm below the lowest point of the catenary. When the photoelectric sensor detects that the pantograph reaches the measurement position, the attitude camera and the LED flash are triggered synchronously to acquire the overall state image of the pantograph in real time.
3. The pantograph self-adaptive horn state detection method according to claim 2, wherein Step 2 is specifically as follows: S21: Based on the overall state image of the pantograph, a training set and a test set are formed. S22: Take the two horns on the same side as a whole, and divide the horn abnormalities into four horn fault types: left horn missing, right horn missing, left horn deformed, and right horn deformed. S23: Based on the training set and the validation set, an improved YOLOv5s model is used to classify and detect the defined horn fault types; the improved YOLOv5s model is specifically a model that uses the EfficientNetV2 network as the backbone network, the Dysample sampler, and the ECIoU loss function.
4. The pantograph self-adaptive horn state detection method according to claim 3, characterized in that The search and screening of the regions to be matched in the horn state image in Step 3 are specifically as follows: S31: Affected by the running attitude of the pantograph, the relative attitude of the front and rear horns on the same side is not fixed. The front horn can always acquire a complete contour each time, while the rear horn is blocked by the front horn to varying degrees. Therefore, a single-horn image is used as the template image T. S32: The horn state image is matched with the template image based on the image gray-scale matching method, and the regions to be matched in the horn state image are searched and screened. The template image T is traversed on the image S to be searched in the order from top to bottom and from left to right. S33: Use a similarity metric function to calculate the similarity between the sub - image \(S\) of the image \(S\) to be searched under the current window \((i,j)\) and the template image \(T\). Take the position of the sub - image with the maximum similarity as the final matching position. The similarity calculation is as follows: i,j The similarity between the sub - image \(S\) of the image \(S\) to be searched under the current window \((i,j)\) and the template image \(T\) is calculated. The position of the sub - image with the maximum similarity is used as the final matching position. The similarity calculation is as follows: wherein, is the pixel mean value of the template image T, is the pixel mean value of S i,j .
5. The pantograph self-adaptive horn state detection method according to claim 4, characterized in that The template matching described in step 4 is as follows: S41: Detect whether the improved YOLOv5 model described in step S23 provides the position information of the sheep's horn; S42: If the position information of the sheep's horn is provided, combine the structural dimensions of the pantograph head to obtain the preliminary positions of the left and right sheep's horns; Use the upper left and lower right coordinates to define the rectangular area of the sheep's horn. The defining formula for the left sheep's horn rectangular area is as follows: In the formula, (x hl_tl ,y hl_tl )、(x hl_br ,y hl_br ) represent the pixel coordinates of the upper left corner and lower right corner of the left horn rectangular area, respectively. sl_tl ,y sl_tl ) is the pixel coordinate of the upper left corner of the rectangular area of the left spring tube, w and h represent the pixel width and height of the horn respectively, δ x , δ y Represent the pixel margin in the horizontal and vertical directions respectively; The defining formula for the right sheep's horn rectangular area is as follows: Wherein, (x hr_tl , y hr_tl ), (x hr_br , y hr_br ) respectively represent the pixel coordinates of the upper left corner and the lower right corner of the right sheep's horn rectangular area, (x sr_tl , y sr_tl ) is the pixel coordinate of the upper left corner of the left spring cylinder rectangular area, and w and h respectively represent the pixel width and height of the sheep's horn; S43: If the position information of the sheep's horn is not provided, adopt an image block strategy to extract the area to be matched based on the number of sheep's horn pixel points and edge features: First, perform block processing on the sheep's horn state image based on the pixel size of the template image; Then, binarize each sub - figure and count the number of white pixel points \(N\). w , when \(N\) w \(>\) \(N\) Set1 or \(N\) w \(<\) \(N\) Set2 , then the area where the sub - figure is located belongs to the invalid area. Otherwise, proceed to the next step of extracting the ram's horn edge; where \(N\) Set1 , \(N\) Set2 are respectively the set upper threshold and lower threshold of pixel points, which are used to filter out sub - figures with mostly black or white pixel points in the area.
6. The pantograph adaptive horn state detection method according to claim 5, wherein The threshold setting in step 5 is as follows: Set the following thresholds for the diagnostic method of abnormal sheep's horn state based on template matching: The pixel width w and height h of the goat's horn, as well as the pixel margin δ in the x and y directions x , δ y , pixel upper and lower thresholds N Set1 、N Set2 , the length threshold l of the left and right horn edge lines Set1 , l Set2 , the maximum and minimum angle thresholds of the horn edge line θ Set1 ,θ Set2 , template matching similarity threshold S t ; The pixel width w and height h of the horn are used to represent the geometric dimensions of the horn. Analyze the left and right horn template images, calculate the pixel width and height of the left and right horns respectively, and assign the larger values to the parameters w and h; for the parameter l Set1 、l Set2 、θ Set1 、θ Set1 and S t , analyze using a normal pantograph image and give specific numerical values based on the statistical analysis results.
7. The pantograph self-adaptive horn state detection method according to claim 6, characterized in that, The process of extracting the sheep's horn edge in step 6 is as follows: S61: After screening according to the number of pixel points in step S43, use the Canny edge operator to extract the edge image of each sub-image, and use the Hough transform to extract the straight edge. Analyze whether there is a straight edge in the sub-image that satisfies the following formula. If so, regard the sub-image as the area to be matched, otherwise it is an invalid area: where l l and l r are the lengths of the left and right horn edge lines respectively, θ l and θ r are the angles of the left and right horn edge lines respectively, l set1 and l set2 are the length thresholds of the horn edge line, θ set1 and θ set2 are the angle thresholds of the horn edge line; S62: Expand the actual matching area to include the complete sheep's horn image. The definition of the actual matching area is shown in the following formula: where (x p_tl , y p_tl ) and (x p_br , y p_br ) respectively represent the pixel coordinates of the upper left corner and the lower right corner of the actual registration rectangular area, (x s_tl , y s_tl ) and (x s_br , y s_br ) respectively represent the pixel coordinates of the upper left corner and the lower right corner of the rectangular area to be registered, and w and h respectively represent the pixel width and height of the ram's horn.
8. An pantograph adaptive horn state detection system, characterized in that, This system is used to implement the pantograph adaptive sheep's horn state detection method described in any one of claims 1 to 7. The system includes a field acquisition module and a central processing module, where: The field acquisition module collects the overall state image of the pantograph during the train operation in real time and outputs it to the central processing module; The central processing module performs the following processing based on the received overall state image of the pantograph: Identify the sheep's horn state image from the overall state image of the pantograph; Classify and detect the defined sheep's horn fault types; for the undefined sheep's horn fault types, search and screen the area to be matched in the sheep's horn state image; Perform template matching on the template image and the image of the area to be matched to obtain the maximum similarity during the matching process; Compare the maximum similarity with the set similarity threshold: when the maximum similarity is not greater than the similarity threshold, it indicates that the sheep's horn is in an abnormal state, and the detection ends; when the maximum similarity is greater than the threshold, proceed to the next step; Regard the area with the maximum similarity during the matching process as the precise area of the sheep's horn, and extract the sheep's horn edge line of the precise area image of the sheep's horn; Judge the sheep's horn state according to the sheep's horn edge line characteristics: if the number of sheep's horn edge lines is less than 2, it is determined that the sheep's horn is in an abnormal state, and the detection ends; otherwise, it is determined that the sheep's horn is in a normal state.
Citation Information
Patent Citations
Pantograph cavel real-time detection method and device, computer equipment and storage medium
CN113362330A
Method and system for detecting pantograph cleat state
CN119295803A