Railway freight car wheel set front cover bolt coordinate extraction method and system
By constructing a nutrient potential field and a digital slime mold particle swarm, combined with gray-scale weighted centroid and rigid geometric topological constraints, the problem of unstable positioning of front cover bolts of railway freight car wheelsets in complex imaging environments was solved, and efficient and accurate bolt coordinate extraction was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENHUA RAIL & FREIGHT WAGONS TRANSPORT
- Filing Date
- 2026-03-20
- Publication Date
- 2026-07-24
AI Technical Summary
The existing railway freight car wheelset front cover bolt positioning technology is not stable enough in complex imaging environments. Especially under the conditions of heavy oil pollution during secondary repair and strong reflection during tertiary repair, traditional methods are prone to positioning drift or missed detection. The lack of geometric verification mechanism in deep learning models leads to a high false detection rate.
Image preprocessing techniques were used to extract the bolt distribution area, construct a nutrient potential field and initialize a digital slime mold particle swarm. Pheromones were formed through chemotactic migration evolution. Combined with gray-scale weighted centroids and rigid geometric topological constraints, accurate reconstruction and collaborative positioning of multi-target bolts were achieved.
It achieves bolt coordinate extraction with strong noise resistance, high computational efficiency and good robustness under complex working conditions, and is suitable for industrial precision inspection.
Smart Images

Figure CN122453705A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the interdisciplinary field of computer vision, bionic computing and industrial automation inspection, and in particular to a method and system for extracting the coordinates of the front cover bolts of railway freight cars. Background Technology
[0002] Currently, in the field of intelligent maintenance of wheelset components for rail transit vehicles, bolt positioning technology for key parts such as the front cover of railway freight car wheelsets mainly focuses on two technical paths: First, traditional visual algorithms based on image geometry and hard-coded rules. In automated disassembly or warehousing maintenance scenarios of wheelsets, this type of method typically uses gray-level gradient operators to extract edge features of the metal surface, combined with Hough transform or rigid template matching, to lock the hexagonal contour or circular gasket structure of the bolt head, thereby calculating the gripping coordinates for disassembly robots or the reference centroid for anti-loosening inspection. Second, data-driven detection networks based on deep learning. With the application of intelligent inspection robots in undercarriage maintenance, algorithms represented by convolutional neural networks have been widely introduced. Through supervised learning on wheelset image datasets containing oil stains and rust samples, the model can directly regress the rectangular bounding box or key points of the bolt target, realizing end-to-end fastener recognition tasks.
[0003] While the aforementioned technologies have demonstrated some effectiveness under ideal experimental conditions, robustness bottlenecks remain in the complex imaging conditions of real-world industrial scenarios. Their main technical shortcomings are manifested in the following dimensions: In the in-situ inspection of Level II repairs and the disassembly operations of Level III repairs, metal surfaces often face extreme imaging interference: on the one hand, the heavy oil stains accumulated over long-term operation and the brushed textures left by machining can cause a sharp decrease in local contrast and a proliferation of false edge noise. Faced with such unstructured interference, traditional methods based on fixed threshold segmentation or single geometric fitting (such as Hough transform) struggle to achieve a dynamic balance between "suppressing background textures" and "preserving weak targets," easily leading to positioning drift or fitting collapse. While deep learning-based detection models possess nonlinear feature extraction capabilities, they heavily rely on large-scale, full-condition labeled samples. When faced with rare, severely corroded or deformed bolts, the lack of training data often results in missed or false detections.
[0004] Furthermore, existing technologies also suffer from deep-seated shortcomings in terms of efficiency for engineering deployment. Current detection algorithms, whether traditional feature-based methods or CNN networks, primarily focus on feature extraction from isolated single-point targets, essentially lacking the utilization of deep topological constraints for specific components such as axle box end caps with "multi-bolt spatial layouts" (e.g., three bolts distributed at 120°). In complex working conditions with multiple targets coexisting or partial occlusion (e.g., a bolt completely covered by sludge), the lack of geometric verification mechanisms prevents the algorithms from leveraging the spatial coupling relationships between targets for collaborative inference, leading to a significant increase in false detection rates.
[0005] In summary, existing bolt positioning technology is not stable enough when facing the complex imaging environment of rail transit wheelset maintenance sites (especially the heavy oil and slick conditions of secondary maintenance and the strong reflective conditions of tertiary maintenance). Summary of the Invention
[0006] The purpose of this invention is to provide at least one method and system for extracting the coordinates of front cover bolts of railway freight cars. This method can at least solve the problem of insufficient stability of existing bolt positioning technology when facing the complex imaging environment of rail transit wheelset maintenance sites (especially the heavy oil pollution during secondary maintenance and the strong reflective conditions during tertiary maintenance). It can at least achieve the goal of actively suppressing unstructured environmental noise through the dynamic evolution mechanism of digital slime mold, and deeply utilizing the geometric priors of components such as axle box end covers to achieve accurate reconstruction and collaborative positioning of multi-target fastening bolts.
[0007] To address the aforementioned technical problems, at least one embodiment of this application provides a method for extracting the coordinates of the front cover bolts of railway freight cars, comprising: Image preprocessing is performed on the original image of the front cover area of the railway freight car wheelset to extract the image of the front cover bolt distribution area; The edge gradient features and texture features of the front cover bolt distribution area image are extracted using an image feature extraction operator, and the extracted edge gradient features and texture features are weighted and fused to construct the nutrient potential field of the target image; Initialize the digital slime mold particle swarm distributed in the nutrient potential energy field, drive the digital slime mold particle swarm to undergo chemotactic migration evolution, and form a stable global pheromone network after the evolution is completed; during the chemotactic migration evolution, according to the nutrient potential energy value at the location of the digital slime mold particle, dynamically release pheromone to the location, and at the same time follow the natural forgetting mechanism to deposit and decay the pheromone at each location. The global pheromone network is subjected to a first threshold segmentation and connected component labeling to obtain a set of connected components; For each connected component in the set of connected components, the gray-level weighted centroid is calculated to obtain the sub-image level coordinates of the candidate feature points corresponding to each connected component, and a set of candidate feature points is formed. By utilizing the rigid geometric topological constraints of the three bolts on the front cover, the candidate nodes in the candidate node set are filtered to obtain the coordinates of the center point of the three bolts on the front cover.
[0008] At least one embodiment of this application also provides a system for extracting the coordinates of front cover bolts for railway freight cars, comprising: The image processing module is used to preprocess the original image of the front cover area of the railway freight car wheelset and extract the image of the front cover bolt distribution area. The nutrient potential field construction module is used to extract the edge gradient features and texture features of the image of the front cover bolt distribution area using image feature extraction operators, and to perform weighted fusion of the extracted edge gradient features and texture features to construct the nutrient potential field of the target image. The evolution module is used to initialize the digital slime mold particle swarm distributed in the nutrient potential energy field, drive the digital slime mold particle swarm to undergo chemotactic migration evolution, and form a stable global pheromone network after the evolution is completed. During the chemotactic migration evolution, pheromones are dynamically released to the location of the digital slime mold particles according to the nutrient potential energy value at the location of the particles, while following the natural forgetting mechanism to deposit and decay the pheromones at each location. The node extraction module is used to perform the first threshold segmentation and connected component labeling on the global pheromone network to obtain a set of connected components, and to perform gray-level weighted centroid calculation on each connected component in the set of connected components to obtain the sub-image level coordinates of the candidate feature points corresponding to each connected component, and to form a set of candidate feature points. The filtering module is used to filter candidate feature points in the candidate feature point set by utilizing the rigid geometric topological constraints of the three bolts of the front cover, and obtain the coordinates of the center point of the three bolts of the front cover.
[0009] The method and system for extracting the coordinates of the front cover bolts of railway freight cars provided in this application construct a nutrient potential energy field by fusing multi-scale gradients and texture features of images. Utilizing the chemotactic migration characteristics and "deposition-evaporation" competition mechanism of digital slime molds, the system guides the self-organized evolution of digital slime mold particles within the nutrient potential energy field, generating a noise-suppressing pheromone network. Sub-pixel coordinates are then extracted using biomass-weighted centroids. Finally, topological verification is performed using the rigid geometric prior of the three bolts on the front cover of the wheelset. Furthermore, an automatic completion mechanism for occluded targets is achieved through collaborative inference. Therefore, it possesses advantages such as strong noise resistance, high computational efficiency, and good robustness, making it suitable for precision industrial inspection under complex working conditions. Attached Figure Description
[0010] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.
[0011] Figure 1This is a flowchart of a method for extracting the coordinates of the front cover bolts of a railway freight car wheelset, provided in one embodiment of this application.
[0012] Figure 2 This is a flowchart illustrating a method for extracting the coordinates of the front cover bolts of a railway freight car wheelset, provided as an application example of this application.
[0013] Figure 3 (1) is an original image of the front cover area of a railway freight car wheelset acquired in step T1 of S0 in an application example of this application.
[0014] Figure 3 (2) is a schematic diagram of the front cover bolt distribution area obtained by step T2 in S0 in an application example of this application.
[0015] Figure 3 (3) is a schematic diagram of the distribution area of the front cover bolts after the T3 step in S0 in an application example of this application.
[0016] Figure 4 This is a grayscale image of a two-dimensional nutrient potential energy field constructed by S1 in one application embodiment of this application.
[0017] Figure 5 This is a schematic diagram illustrating the dynamic process of the evolution of digital slime mold particle swarms after S2 in a nutrient potential energy field to form a pheromone network in one application embodiment of this application.
[0018] Figure 6 This is a schematic diagram of the pheromone network field finally formed after pheromone deposition-evaporation in one application embodiment of this application.
[0019] Figure 7 This is a schematic diagram of the final result after S4 biomass topology extraction and geometric co-inference in one application embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0021] To facilitate understanding of the embodiments of this application, the relevant content regarding automatic bolt positioning will be introduced first.
[0022] In industrial equipment and structural component assembly systems, critical fasteners are widely used in power equipment, rail transportation, and various large-scale mechanical systems. Bolt heads and their adjacent metal surfaces typically contain key character or symbolic information such as model batch numbers, supplier identification, and inspection codes. This information serves as a core data source for equipment traceability, quality control, and automated inspection, possessing significant engineering application value. In industrial field operation and maintenance, utilizing machine vision technology to achieve automatic bolt positioning offers substantial engineering application value in replacing intensive manual visual inspection and eliminating potential omissions.
[0023] Currently, in the field of intelligent maintenance of wheelset components for rail transit vehicles, bolt positioning technology for key parts such as the front cover of railway freight car wheelsets mainly focuses on two technical paths: First, traditional visual algorithms based on image geometry and hard-coded rules. In automated disassembly or warehousing maintenance scenarios of wheelsets, this type of method typically uses gray-level gradient operators to extract edge features of the metal surface, combined with Hough transform or rigid template matching, to lock the hexagonal contour or circular gasket structure of the bolt head, thereby calculating the gripping coordinates for disassembly robots or the reference centroid for anti-loosening inspection. Second, data-driven detection networks based on deep learning. With the application of intelligent inspection robots in undercarriage maintenance, algorithms represented by convolutional neural networks have been widely introduced. Through supervised learning on wheelset image datasets containing oil stains and rust samples, the model can directly regress the rectangular bounding box or key points of the bolt target, realizing end-to-end fastener recognition tasks.
[0024] While the aforementioned technologies have demonstrated some effectiveness under ideal experimental conditions, robustness bottlenecks remain in the complex imaging conditions of real-world industrial scenarios. Their main technical shortcomings are manifested in the following dimensions: In the in-situ inspection of Level II repairs and the disassembly operations of Level III repairs, metal surfaces often face extreme imaging interference: on the one hand, the heavy oil stains accumulated over long-term operation and the brushed textures left by machining can cause a sharp decrease in local contrast and a proliferation of false edge noise. Faced with such unstructured interference, traditional methods based on fixed threshold segmentation or single geometric fitting (such as Hough transform) struggle to achieve a dynamic balance between "suppressing background textures" and "preserving weak targets," easily leading to positioning drift or fitting collapse. While deep learning-based detection models possess nonlinear feature extraction capabilities, they heavily rely on large-scale, full-condition labeled samples. When faced with rare, severely corroded or deformed bolts, the lack of training data often results in missed or false detections.
[0025] Furthermore, existing technologies also suffer from deep-seated shortcomings in terms of efficiency for engineering deployment. Current detection algorithms, whether traditional feature-based methods or CNN networks, primarily focus on feature extraction from isolated single-point targets, essentially lacking the utilization of deep topological constraints for specific components such as axle box end caps with "multi-bolt spatial layouts" (e.g., three bolts distributed at 120°). In complex working conditions with multiple targets coexisting or partial occlusion (e.g., a bolt completely covered by sludge), the lack of geometric verification mechanisms prevents the algorithms from leveraging the spatial coupling relationships between targets for collaborative inference, leading to a significant increase in false detection rates.
[0026] In summary, existing bolt positioning technology is not stable enough when facing the complex imaging environment of rail transit wheelset maintenance sites (especially the heavy oil and slick conditions of secondary maintenance and the strong reflective conditions of tertiary maintenance).
[0027] To address the technical problem of insufficient stability of existing bolt positioning technology in the complex imaging environment of rail transit wheelset maintenance sites (especially heavy oil contamination during secondary maintenance and strong reflectivity during tertiary maintenance), this invention proposes a method for extracting the coordinates of the front cover bolts of railway freight cars. The implementation details of the method for extracting the coordinates of the front cover bolts of railway freight cars in this embodiment are described below. The following content is only for ease of understanding and is not necessary for implementing this solution.
[0028] Example 1: The method for extracting the coordinates of the front cover bolts of railway freight cars according to this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities. The specific process can be as follows: Figure 1 As shown, it includes: Step S100: Perform image preprocessing on the original image of the front cover area of the railway freight car wheelset to extract the image of the front cover bolt distribution area.
[0029] Specifically, high-resolution original images of the front cover area of railway freight car wheelsets are acquired to improve image data quality. Furthermore, the bolt distribution area of the front cover is extracted from the original images as the subsequent calculation area to reduce unnecessary computation. Additionally, noise in the bolt distribution area image is suppressed, and the geometric features of the metal surface are enhanced.
[0030] In one embodiment, step S1 includes the following steps S110 to S130.
[0031] Step S110: Acquire the original image of the front cover area of the railway freight car wheelset.
[0032] A high-resolution industrial camera mounted on a fixed structure is used as the acquisition device. A 12-megapixel resolution and global shutter are employed to ensure clear, motion-free images are captured even in dynamic or low-vibration environments. For the lens, a high-resolution dual telecentric lens is used to eliminate perspective errors and distortion caused by the thickness of the wheelset front cover. A high-intensity ring-shaped shadowless LED light source is used to vertically image the front cover area of the train wheelset.
[0033] Step S120: Extract the image of the front cover bolt distribution area from the original image.
[0034] Using the geometric center of the front cover of the positioned railway freight car wheelset as a reference, a mask containing the bolt distribution area is constructed based on the prior dimensional parameters of the front cover. The geometric center of the front cover itself can be known in advance through a fixed gripping pose of a robotic arm or by matching a simple coarse positioning template; it is a known and stable spatial reference point. The dimensional parameters of the front cover include the radius of the bolt distribution circle, the bolt distribution angle, and the outer diameter of the front cover.
[0035] Then, based on the mask, the image of the front cover bolt distribution area is extracted from the original image, which is the region of interest, to remove areas of the original image other than the front cover bolt distribution area, such as irrelevant axle box texture and other background interference, thereby limiting subsequent calculation processing to a small range of areas where the bolts may appear and reducing invalid calculations.
[0036] Step S130: Denoise removal and image feature enhancement processing are performed on the image of the front cover bolt distribution area.
[0037] To address the two types of unstructured noise on metal surfaces—"brushed texture" and "oil stains"—this embodiment employs bilateral filtering instead of traditional Gaussian filtering to denoise the image of the front cover bolt distribution area. Bilateral filtering considers both spatial distance weights and pixel value range difference weights, effectively smoothing out minute metal brushed textures while fully preserving the high-frequency edge information of the bolt hexagonal heads.
[0038] To prevent unnatural artificial textures from being generated in uniform areas (such as large oil stains) due to excessive noise amplification, a contrast-limited adaptive histogram equalization process is applied to the front cover bolt distribution area image after bilateral filtering. This optimizes the image contrast and provides a better gradient basis for subsequent calculations. Specifically, the front cover bolt distribution area image after bilateral filtering is divided into several 8×8 sub-blocks, and each sub-block undergoes individual histogram equalization to limit the increase of the histogram in each sub-block, avoiding excessive local contrast stretching.
[0039] Step S200: Use image feature extraction operators to extract edge gradient features and texture features of the front cover bolt distribution area image, and perform weighted fusion of the extracted edge gradient features and texture features to construct the nutrient potential field of the target image.
[0040] Specifically, the extracted edge gradient features and texture features are weighted and fused using the following calculation formula to construct the nutrient potential field of the target image:
[0041] Where α and β are weighting coefficients, The edge gradient feature term is obtained by the multi-scale Sobel operator, which is applied to different scales. Calculate gradient magnitude of smoothed image And merge. The specific calculation formula is as follows:
[0042] This is a texture item, obtained by the LoG (Laplacian of Gaussian) operator, used to emphasize the singular structure near corner points.
[0043] In some embodiments, in order to reduce the abrupt interference caused by reflective spots, steps S210 to S230 below step S200.
[0044] Step S210: The extracted edge gradient features and texture features are weighted and fused to construct the initial nutrient potential field of the target image. .
[0045] Step S220: Apply the constructed initial nutrient potential energy field conduct Normalization process.
[0046] Step S230: Apply the Sigmoid nonlinear transformation to the normalized nutrient potential field. The gradient magnitude of the first type of region in the image is dynamically compressed to obtain the final nutrient potential field. Alternatively, the normalized nutrient potential field The gradient magnitude of the first type of region in the image is subjected to soft thresholding to obtain the final nutrient potential field. The first type of region refers to areas in the nutrient potential field where the nutrient potential energy value is greater than a preset nutrient potential energy threshold. This step reduces abrupt interference caused by reflective spots, ensuring that particles converge towards the true hexagonal contour. In the nutrient potential field image, bright areas represent high nutrient concentrations, and dark areas represent the background.
[0047] Step S300: Initialize the digital slime mold particle swarm distributed in the nutrient potential field, drive the digital slime mold particle swarm to undergo chemotactic migration and evolution, and form a stable global pheromone network after the evolution is completed.
[0048] During the chemotactic migration and evolution process, based on the nutrient potential value at the location of the digital slime mold particle, pheromones are dynamically released and deposited at the location, while following the natural forgetting mechanism to deposit, decay and evaporate the pheromones at each location.
[0049] Specifically, the position of the digital slime mold particle swarm in the nutrient potential field is initialized by using a hybrid probability density function that combines a quasi-random probability distribution generated based on the Halton sequence with an importance sampling distribution based on the nutrient potential field.
[0050] The predefined set of digital slime mold particles is , where n is the total number of particles. The initial position of the i-th particle. It follows a mixture probability density function P(x), the specific formula of which is as follows:
[0051] in, The set of pixels representing the captured region of interest (i.e., the area where the front cover bolts are distributed) is the effective domain of the algorithm. This is a weighting factor used to adjust the ratio of global search to local convergence in the solution space; in this embodiment, it is taken as... =0.3. This is a quasi-random probability distribution generated based on Halton sequences. This distribution utilizes the characteristics of low-difference sequences to ensure that digital slime mold particles... The region maintains spatial consistency, effectively avoiding the local clustering phenomenon that easily occurs in traditional pseudo-random distributions, thus ensuring the uniformity of digital slime mold particles within the nutrient potential field. Even in areas with low response rates, basic search coverage is still maintained. This represents the importance sampling distribution term based on the nutrient potential field. This term transforms the physical features of the image into probability weights, ensuring that approximately 70% of the digital slime mold particles are guided to high-potential regions such as bolt edges and corners immediately upon initialization.
[0052] By employing the hybrid strategy of "global quasi-uniform randomness + local potential importance sampling", this invention enables the particle swarm to highly focus on the target contour in the early stages of evolution, while ensuring that no potential targets are missed. This significantly reduces the invalid iteration time of particle migration from the background area to the target edge, and significantly improves the convergence efficiency and positioning accuracy of the algorithm.
[0053] During the chemotactic migration evolution, the evolutionary update formula for the velocity vector of the data slime mold particles is as follows:
[0054] In the formula, Let represent the velocity vector of the digital slime mold particle i at time t+1. For the inertia retention term, ω represents the inertia weight, and in some examples, ω is chosen to be 0.4; denoted as the velocity vector of digital slime mold particle i at time t; the inertia retention term is used to simulate biological motion energy, ensuring that the digital slime mold particle can maintain its original motion trend when passing through the fracture point of the nutrient potential energy field (such as the break point of oil stains or tiny scratches), so that the digital slime mold particle can use momentum to cross the trough in the nutrient potential energy field (such as the fracture zone formed by oil stains) and maintain the continuity of the path. As a chemotactic driving term, The chemotactic sensitivity coefficient represents the sensitivity of digital slime mold particles to nutrient potential energy. The potential field gradient vector indicates the direction in which the nutrient concentration increases the fastest at the current location (i.e., the normal pointing to the high potential energy region); the chemotactic driving term forces digital slime mold particles to accelerate their aggregation towards the local potential energy peak (i.e., the center of the edge ridge). It is a random thermal motion term. Let N be a random vector that follows a Gaussian distribution N(0,1). To represent the intensity of random perturbation, a nondeterministic variable is introduced into the random thermal motion term to simulate the Brownian motion of microscopic particles, thereby increasing the diversity of the solution space and preventing the particle swarm from converging prematurely to local pseudo-edges.
[0055] During the chemotactic migration evolution process, the evolutionary update formula for the position vector of the data slime mold particles is as follows:
[0056] In the formula, This represents the position vector of the digital slime mold particle i at time t+1; Let represent the position vector of digital slime mold particle i at time t; Δt is the unit time step, used to maintain the search activity of the digital slime mold particle swarm. Wherein, if If a digital slime mold particle exceeds the image boundary or falls into a preset "dead zone" (a region with extremely low potential energy and no updates for a long time), a dynamic resampling strategy is introduced for that digital slime mold particle. This means that the digital slime mold particle is determined to be invalid and is immediately removed from the current digital slime mold particle population. Then, a new digital slime mold particle is randomly generated in the nutrient potential energy field based on the importance probability distribution of the nutrient potential energy field, thereby maintaining a constant effective search population density.
[0057] During chemotactic migration evolution, digital slime mold particles release pheromones towards their location as they move. The amount of pheromones released corresponds to the nutrient potential energy value at that location, dynamically releasing pheromones towards that location. It is not a constant value, but rather has a non-linear coupling relationship with the "nutrient concentration" at the current location, as shown in the following equation:
[0058] Q is the basic secretion constant, representing the maximum pheromone carrying capacity of a single digital slime mold particle. The current position of digital slime mold particle i The nutrient potential value at the location. k is the nonlinear gain exponent (k=2 in this embodiment). The state update of the pheromone network T(x,y) follows a partial differential discretization form with a natural forgetting mechanism, and the specific formula is as follows:
[0059] Let t be the pixel coordinates. The intensity of pheromones at that location; As an evaporation coefficient, it acts as a "forgetting factor," causing paths that are not repeatedly visited by digital slime mold particles (i.e., pseudo-edges, metallic brushed textures) to rapidly fade over time t. Let K be the pheromone intensity at coordinates (x, y) at time t-1; K is the pheromone intensity at pixel coordinates (x, y). The total number of slime mold particles; Let t be the coordinates of all pixels passed through. The total amount of pheromone deposited by digital slime mold particles at a given location constitutes the "enhancing factor". Let i be the coordinates of the i-th passed pixel. The pheromone deposition increment of digital slime mold particles at the pixel coordinates When located in the first type of nutrient potential region, When pixel coordinates When located in a region of the nutrient potential field other than the first type of region, The first type of region is the region in the nutrient potential energy field where the nutrient potential energy value is greater than the preset nutrient potential energy threshold.
[0060] Step S400, for the global pheromone network The first threshold segmentation and connected component labeling are performed to obtain the connected component set.
[0061] In some embodiments, in order to remove linear interference (such as metal scratches and cables) present in the image, step S400 includes the following steps S410 to S430.
[0062] Step S410, for the global pheromone network Perform Otsu thresholding and connected component labeling to obtain the initial set of connected components. .
[0063] Step S420: Calculate the circularity of each connected component in the initial set of connected components. Wherein, connected component... Circularity The definition is as follows:
[0064] In the formula, For connected components area, For connected components The perimeter.
[0065] Step S430: Using the prior roundness of the front cover bolt as the first constraint condition, the initial connected component set is filtered, and connected components in the initial connected component set whose roundness does not meet the first constraint condition are removed, thus obtaining the final connected component set.
[0066] Specifically, for an ideal circle (bolt feature). It approaches 1; however, for thin cables or scratches... Very large and Smaller, resulting in Approaching 0, based on this, in some embodiments, the first constraint condition is that the circularity of the connected domain is greater than 0.6, in order to eliminate elongated noise and achieve topology pruning for elongated heterogeneous noise such as cables or scratches.
[0067] Step S500: Calculate the gray-level weighted centroid of each connected component within the connected component set to obtain the sub-pixel level coordinates of the candidate feature points corresponding to each connected component, forming a candidate feature point set C. The sub-pixel level coordinates of the k-th candidate feature point are... The calculation formula is:
[0068] In the formula, For connected components All pixels within Accumulate. The pheromone intensity at pixel (x, y) is used as a weight term, which makes the calculation result biased towards the "grayscale centroid" position with the strongest response in the connected domain, thereby enabling the positioning accuracy to reach the sub-pixel level.
[0069] Step S600: Using the rigid geometric topological constraints of the three bolts of the front cover, the candidate feature points in the candidate feature point set C are filtered to obtain the coordinates of the center point of the three bolts of the front cover.
[0070] Specifically, step S600 includes the following steps S610 to S660.
[0071] Step S610: Traverse the candidate feature points in the candidate feature point set, and select any two candidate feature points... Form a candidate feature point pair ( ), and calculate each candidate feature point pair ( Euclidean distance .
[0072] Step S620: From all candidate feature point pairs in the candidate feature point set, select candidate feature point pairs whose Euclidean distance is within the preset allowable physical limit of the wheel assembly front cover bolt spacing. The selection formula is as follows:
[0073] in, , These are the minimum and maximum permissible physical limits for the wheel cover bolt spacing, used to tolerate minute scaling caused by camera angle tilt or manufacturing tolerances. This step uses a distance gating mechanism to disconnect candidate feature points that are too close or too far apart.
[0074] Step S630: Establish a connection edge between the selected candidate feature point pairs to form a set of effective edges. .
[0075] Step S640, in the set of valid edges In the resulting diagram, the three vertices of each triangle formed by connecting three edges end to end constitute a closed triplet. .
[0076] Step S650: Based on the rigid geometric constraints of the front cover bolts, quantitatively score the difference between the topology of each closed triplet and the ideal front cover bolt topology model.
[0077] Specifically, the quantitative scoring in this step aims to quantify the difference between the observed topology and the ideal physical model, integrating three indicators: "side length uniformity," "angular topological constraints," and "physical scale matching." In some embodiments, the quantitative scoring in this step uses a comprehensive scoring function. The expression is:
[0078] In the formula, It represents the deviation of the triangle formed by the closed triplet from an equilateral triangle, that is, the standard deviation of the lengths of the three sides of the triangle formed by the closed triplet, and is used to measure the deviation of the triangle formed by the triplet from an equilateral triangle. , represents the sum of the angular deviations between the interior angles of the triangle formed by the closed triplet and the 60-degree angle, and is used to measure the geometric constraints of the interior angles of the triangle formed by the closed triplet; This represents the dimensional deviation between the side length of the triangle formed by the closed triplet and the prior spacing of the wheelset front cover bolts. Represents the average side length With physical reference side length The scale deviation is used to measure the degree of matching between the current triangle side length and the physical true value of the wheel cover bolt spacing; They are respectively The penalty weighting coefficients for the three items.
[0079] Step S660: Based on the comprehensive score of all closed triplets, select a set of closed triplets with the lowest comprehensive score and a comprehensive score less than the preset confidence threshold, and use the coordinates of the three candidate feature points in the selected closed triplets as the coordinates of the three bolts of the front cover.
[0080] Specifically, under ideal conditions, all closed triplet pairs are assigned according to their corresponding comprehensive scores. Sort the results in ascending order, then select the closed triplet with the lowest overall score. Determine whether the following convergence condition is met:
[0081] in, The closed triplet with the lowest overall score Overall score A pre-set confidence threshold (low energy equals high match) is used. If the above convergence condition is met, the triplet is considered closed. The structure verification passed, and the closed triplet was output. The coordinates of the three candidate feature points are used as the coordinates of the center point of the three bolts of the front cover.
[0082] This step is based on the overall score. The scoring system employs a tiered decision-making approach to address both ideal recognition and partial occlusion scenarios.
[0083] In some embodiments, under occlusion conditions, the system determines that the target may lack single-point features due to severe oil contamination or mechanical occlusion, resulting in the inability to find a closed triplet with the lowest overall score and a score less than a preset confidence threshold among all closed triplets. In this case, a collaborative inference mechanism is triggered. That is, step S600 further includes the following steps S671 to S677.
[0084] Step S671: Search for the coordinates of two candidate feature points that satisfy the preset binary pair conditions from the candidate feature point set. The binary pair conditions are that the difference between the distance between the two candidate feature points and the prior distance of the front cover bolt is within the preset allowable range.
[0085] Specifically, the pair with the highest matching degree is searched in the candidate feature point set C. The spacing between them must meet the following requirements. ,in, The prior spacing for the front cover bolts. This is the preset error threshold.
[0086] Step S672, based on the three bolts of the front cover The rotational symmetry prior constraint is used to infer the predicted coordinates of the missing node through affine transformation using the coordinates of two candidate feature points in the binary tuple.
[0087] based on Using rotational symmetry priors, we infer the theoretical coordinates of missing nodes through affine transformations. Let the coordinate vectors of two candidate feature points be... The deduction formula is as follows:
[0088] in, For a two-dimensional rotation matrix, the formula is as follows:
[0089] Step S673: In the global pheromone network formed through the chemotaxis-migration-evolution process, a local search domain is constructed with the predicted coordinates of the missing nodes as the center.
[0090] Specifically, using predicted coordinates Construct a local search domain centered on Detecting the local search domain Does the hidden node exhibit a weak grayscale response (i.e., a weak edge feature that is below the Otsu threshold but significant within the prediction domain)? If so, the hidden node is extracted through local dethresholding segmentation.
[0091] Step S674: Perform a second threshold segmentation and connected component analysis in the local search domain to obtain a set of connected components located in the local search domain; the segmentation threshold of the second threshold segmentation is less than the segmentation threshold set in the first threshold segmentation.
[0092] Step S675: Select connected components that meet the preset minimum connected component area requirement from the set of connected components located in the local search domain.
[0093] Step S676: Perform gray-scale weighted centroid calculation on the selected connected components to obtain the coordinates of the completion points.
[0094] Step S677: Use the coordinates of the completion point and the coordinates of the two candidate feature points in the binary tuple as the coordinates of the center points of the three bolts of the front cover.
[0095] Steps S671 to S677 of this embodiment aim to solve the problem of target loss due to weak signals in heavily oiled environments. Within the inferred local search domain... Within this region, a local augmentation search based on an attention mechanism is performed. Unlike the global high-criteria screening used in step S300, this is performed within a high-confidence local search domain. The system automatically performs "threshold relaxation," which reduces the requirement for network biomass intensity, allowing the extraction of low-contrast contours that were originally suppressed as "background noise" by the global Otsu algorithm. Simultaneously, the system calls back the original pheromone field data generated in step S200 to examine the local search domain. Does the system detect weak, aggregated responses within the data? This feedback mechanism, guided by top-down geometric prediction and bottom-up signal extraction, simulates the gaze behavior of biological vision in a blurred environment. If a feature patch satisfying the minimum connected area requirement is detected under relaxed conditions, the system marks it as a "complete point" and includes it in the final result set.
[0096] Based on the above embodiments, this embodiment provides an application example, such as... Figure 2 As shown.
[0097] S0: Image Acquisition and Preprocessing. Before entering the core evolutionary algorithm, high-quality input image data is first constructed to suppress unstructured noise in the industrial environment and enhance the geometric features of the metal surface. This step specifically includes: T1: Image acquisition utilizes a Hikvision industrial vision camera mounted on a fixed structure. A 12-megapixel resolution and global shutter are used to ensure clear, motion-free images are captured even in dynamic or low-vibration environments. The lens is a high-resolution dual telecentric lens to eliminate perspective errors and distortion caused by the thickness of the wheelset front cover. A high-intensity ring-shaped shadowless LED light source is used to capture vertical images of the train wheelset front cover area. Original image. It is defined as a two-dimensional grayscale matrix with a bit depth of 8 bits, as shown in Figure 3(1).
[0098] T2: Region of Interest Locking. To reduce invalid computation, a mask containing the bolt distribution area is constructed based on the geometric center of the front cover of the railway freight car wheelset, according to the prior size parameters of the front cover of the railway freight car wheelset. The image containing only the bolt distribution area is then cropped as the region of interest, as shown in Figure 3(2). The bolt distribution area is cropped as the processing domain of the algorithm, and irrelevant axle box textures in the background are removed.
[0099] T3: Heterogeneous noise suppression. For the "brushed texture" and "oil stains" on the metal surface, bilateral filtering is used to process the extracted bolt distribution area image to effectively smooth out the small metal brushed texture while fully preserving the high-frequency edge information of the bolt hexagonal head. In addition, contrast-limited adaptive histogram equalization is applied to divide the image into several 8×8 sub-blocks and perform histogram equalization on each to provide a clear gradient reference for subsequent potential field modeling. The image after this step is shown in Figure 3 (3).
[0100] S1: Heterogeneous Feature Fusion and Nutrient Potential Field Construction. To enable the digital slime mold to perceive the physical structure of metal surfaces, it is necessary to map real image information onto a two-dimensional nutrient potential field. This algorithm employs multi-scale gradient fusion and texture weighting to construct the nutrient potential field. The specific calculation formula is as follows:
[0101] Where α and β are weighting coefficients, The marginal terms are obtained by the multi-scale Sobel operator, for different scales. Calculate gradient magnitude of smoothed image And merge. The specific calculation formula is as follows:
[0102] This is a texture term, obtained by the LoG (Laplacian of Gaussian) operator, used to emphasize the singularity structure near corner points. This is achieved after obtaining the nutrient potential field. Afterwards, regarding the nutrient potential field conduct Normalization was performed, and the nutrient potential field was also normalized. The gradient response of the highlight region in the image is dynamically compressed (or soft-thresholded) using a Sigmoid nonlinear transform to reduce abrupt interference caused by reflective spots and ensure that particles converge toward the true hexagonal contour. In the potential energy field diagram, the bright areas represent high nutrient concentrations, and the dark areas represent the background. A schematic diagram after S1 is shown below. Figure 4 As shown.
[0103] S2: Chemotaxis and Particle Dynamics Evolution. Based on the nutrient potential field constructed in S1, a hybrid distribution strategy of "global quasi-uniform randomness + local potential energy importance sampling" is adopted to deploy the digital slime mold particle set A. Wide-range search is performed in the unknown region, and high-density coverage is performed in the high potential energy region to balance the global search capability and local convergence speed of the solution space.
[0104] Define the set of digital slime mold particles as , where n is the total number of digital slime mold particles. The initial position of the i-th digital slime mold particle. It follows a mixture probability density function P(x), the specific formula of which is as follows:
[0105] in, This represents the complete set of pixels in the region of interest that has been extracted, which is the effective domain for the algorithm to execute. This is a weighting factor used to adjust the ratio of global search to local convergence in the solution space; in this embodiment, it is taken as... =0.3. This is a quasi-random probability distribution generated based on Halton sequences. This distribution utilizes the properties of low-discrepancy sequences to ensure that particles... The region satisfies the consistency of spatial filling, effectively avoiding the local clustering phenomenon that is prone to occur in traditional pseudo-random distributions, thereby ensuring that particles in the potential energy field... Even in areas with low response rates, basic search coverage is still maintained. This represents the importance sampling distribution term based on the nutrient potential field. This term transforms the physical features of the image into probability weights, so that approximately 70% of the particles are guided to high-potential regions such as bolt edges and corners at the moment of initialization.
[0106] By employing the hybrid distribution strategy of "global quasi-uniform randomness + local potential energy importance sampling," the particle swarm can be highly focused on the vicinity of the target outline in the early stages of evolution, ensuring no potential targets are missed. This significantly reduces the ineffective iteration time for particles to migrate from the background area to the target edge, thus substantially improving the algorithm's convergence efficiency and positioning accuracy. A schematic diagram after S2 is shown below. Figure 5 As shown.
[0107] S3: Pheromones Network Self-Organization and Memory Update. This stage simulates the proto-mass flow motion of slime molds under a nutrient gradient. The state update of digital slime mold particles follows a gradient ascent with inertial terms and random perturbations, while a "deposition-evaporation" mechanism is introduced to construct a global memory network. The particle motion equation treats digital slime mold particles as point masses moving on a two-dimensional potential energy surface. At the t-th iteration, the velocity vector of digital slime mold particle i is... With position vector The updated formula is described as follows:
[0108]
[0109] Where ω represents the inertial weight, which is used to maintain the momentum of motion so that the particle can pass over the tiny scratches or oil stains on the metal surface (local minima). This determines the particle's sensitivity to nutritional potential energy. The gradient vector of the nutrient potential field indicates the direction in which the nutrient concentration increases the fastest at the current location (i.e., the normal pointing to the high potential energy region). To simulate Brownian motion using Gaussian white noise that follows a standard normal distribution, a random diffusion mechanism is introduced to prevent the particle swarm from prematurely converging to a single path. Δt is the unit time step, used to control the fineness of the discrete evolution. This indicates the intensity of the random disturbance.
[0110] definition For grid points at time t The intensity of pheromones at a given location. Following a consensus mechanism in biology, the evolution of the network is jointly determined by particle deposition and natural evaporation from the environment:
[0111] in, (Values range from 0 to 1) represent the evaporation coefficient. Simulating the metabolic process of biological memory, it automatically clears accidentally generated erroneous paths, significantly improving the signal-to-noise ratio of the final pipeline network. This represents the sum of all particles deposited at that point. Deposition increment. A "potential energy adaptive deposition strategy" is adopted; when particles are located in a high-nutrient region, ;otherwise Ensure the pipeline network grows only on a real physical structure, forming a high signal-to-noise ratio interconnected structure. A schematic diagram after S3 is shown below. Figure 6 As shown.
[0112] S4: Biomass topological extraction and geometric co-inference. This aims to extract biomass from the pheromone field after the evolution of step S2 and the completion of pheromone deposition and evaporation in step S3. Discrete coordinates are extracted, and rigid geometric constraints are used to remove artifacts (such as cable interference). The specific steps are as follows: T1: Candidate node extraction and topology pruning, firstly... Perform Otsu thresholding and connected component labeling. Obtain the initial region set. To remove linear interference (such as metal scratches and cables) from the image, a "circularity shape factor" is introduced for pre-screening. Only dense connected components with a circularity greater than 0.6 are retained, while elongated noise is removed. The circularity of the k-th connected component... The definition is as follows:
[0113] in, For connected components area, For connected components The perimeter. For an ideal circle (bolt feature). It approaches 1; however, for thin cables or scratches... Very large and Smaller, resulting in Approaching 0, thus achieving topology pruning for heterogeneous noise. Subsequently, gray-level weighted centroids are calculated for the selected connected components to obtain sub-pixel level coordinates. The coordinates of the k-th candidate node are... The calculation formula is:
[0114] in, For connected components All pixels within Accumulate. As a weighting term, it causes the calculation results to be biased towards the "grayscale centroid" position with the strongest response in the connected domain, thereby enabling the positioning accuracy to reach the sub-pixel level.
[0115] T2: Geometric graph construction and physical constraint pre-screening. Based on the candidate feature point set C obtained after T1 extraction and preliminary screening, this step aims to construct the topological foundation for subsequent triplet verification. For any three points in the candidate feature point set C... A fully connected topology is established. To reduce computational complexity, the algorithm introduces the physical dimensions of the wheelset front cover as a strong prior constraint to construct a sparse connected graph. All pairs of points in set C are traversed. ), calculate its Euclidean distance. Only retain the connecting edges that satisfy the physical scale constraints to establish a set of valid edges. The formula is as follows:
[0116] in, , These are the minimum and maximum permissible physical limits for the bolt spacing of the wheelset front cover, respectively. This is to tolerate minute scaling caused by camera angle tilt or manufacturing tolerances. This step uses a distance gating mechanism to disconnect connections that are too close or too far apart. Subsequent triplet searches only occur within the retained edge set. The search is performed on a closed triangle, thus greatly compressing the search space from all permutations to a physically feasible subspace.
[0117] T3: Based on the geometric consistency principle defined in S3, for each closed triplet generated in step T2... Quantitative evaluation is conducted. A comprehensive scoring function is defined within the system. This score aims to quantify the difference between the observed topology and the ideal physical model, integrating three indicators: "uniformity of side lengths," "angular topological constraints," and "physical scale matching degree." The formula is as follows:
[0118] in, This value is used to assess whether a triangle approximates an equilateral triangle. For an ideal structure, this value is 0. Used to remove distorted structures that deviate from the ideal geometry due to severe perspective distortion or incorrect connections. Ensure that the selected targets are not only the correct shape, but also the correct size to match the actual physical dimensions. These are the penalty weighting coefficients for the three items mentioned above, used to balance the importance of shape, angle, and scale in the scoring.
[0119] T4: Structural verification and collaborative inference, based on The scoring system employs a tiered decision-making approach to handle both ideal recognition and partial occlusion scenarios. Under ideal conditions, the system assigns a tiered score to all triples generated in T3. Sort in ascending order. If a globally optimal solution exists... The convergence conditions are as follows:
[0120] in If the high confidence threshold is met (low energy equals high match), the structure verification is directly passed, and the coordinates of the triplet are output as the final result. Under occlusion conditions, the system determines that the target may have missing single-point features due to severe oil contamination or mechanical occlusion. In this case, a collaborative inference mechanism is triggered. The system searches for the highest-matching triplet in the candidate set C. The spacing between them must meet the following requirements. .based on Using rotational symmetry priors, we infer the predicted coordinates of missing nodes through affine transformations. Let the coordinate vectors of two points be... The deduction formula is as follows:
[0121] in, For a two-dimensional rotation matrix, the formula is as follows:
[0122] To predict coordinates Construct a local search domain centered on The system calls back the original pheromone network field. The system detects whether there is a weak grayscale response (i.e., a weak edge feature that is below the Otsu threshold but significant within the prediction domain) in the region. If it exists, the hidden node is extracted by local threshold reduction segmentation.
[0123] T5: Local Completion Search. This step aims to address the target loss problem caused by weak signals in heavily oiled environments. The system will then search the expected area inferred in T4. Within this region, a local enhancement search based on an attention mechanism is performed. Unlike the global high-standard screening used in stage T1, the system automatically performs "threshold relaxation" within this high-confidence region. This reduces the requirement for network biomass intensity, allowing the extraction of low-contrast contours that were originally suppressed as "background noise" by the global Otsu algorithm. Simultaneously, the system calls back the original pheromone field data generated in stage S2 to check for the presence of weak, aggregated responses within the expected region. This feedback mechanism, guided by "top-down geometric prediction" to "bottom-up signal extraction," simulates the "gazing" behavior of biological vision in a blurred environment. If a feature patch satisfying the minimum connected area requirement is detected under the relaxation condition, the system marks it as a "completion point" and includes it in the final result set.
[0124] In summary, the S4 stage, through hierarchical processing of "morphological pruning - geometric map construction - consistency scoring - collaborative completion," not only achieves accurate quantization from continuous fields to discrete coordinates, but also successfully addresses the pain point of traditional visual algorithms easily losing targets under heavy oil occlusion through rigid priors and local feedback mechanisms, ensuring the completeness of localization results under complex conditions. A schematic diagram after S4 is shown below. Figure 7 As shown.
[0125] Compared with the prior art, the present invention has at least the following beneficial effects: (1) This invention overcomes the interference limitations of "strong reflection" and "high-frequency texture" in complex industrial environments, achieving robust feature extraction. This invention abandons the reliance on fixed thresholds in traditional algorithms, transforming bolt positioning into a "biological evolution guided by potential field" process. Through a unique "pheromone deposition-evaporation" mechanism, the system can actively establish a positive feedback loop in images with extremely low signal-to-noise ratios: even when faced with texture interference such as specular reflection on metal surfaces and oil stains, the algorithm can automatically forget discrete noise paths through the collective cooperation of particle swarms, forming a high-energy network only on the real closed contours. This paradigm shift from static pixel matching to dynamic self-organizing evolution greatly improves the stability of the detection system in unstructured lighting environments.
[0126] (2) A topology self-verification mechanism based on "geometric consistency" was established, which has the ability to eliminate heterogeneous noise and complete occlusion collaboratively. For the rigid structure of three bolts (120°) in industry, this invention constructs a "chemotaxis-memory-consistency" joint model. On the one hand, the system can automatically remove heterogeneous interference such as cables and scratches with inconsistent shapes through topological feature analysis (i.e., pruning in S4); on the other hand, by utilizing the rotational symmetry prior of the wheelset front cover, the system has the ability of "perceptual filling". When a bolt is completely invisible due to extreme oil contamination, the algorithm can use the geometric relationship between the other two points to infer and complete the missing target.
[0127] (3) A lightweight computing paradigm that does not rely on deep learning is constructed, significantly reducing the deployment cost at the edge. This invention is entirely based on explicit physical field models and particle dynamics equations, avoiding the dependence of convolutional neural networks (CNNs) on massive labeled data training and high-end GPU computing power. The entire algorithm has clear logic, strong parameter interpretability, and the core particle parallel operation is easily accelerated on FPGA, DSP, or low-power ARM chips. This solution can complete sub-pixel-level high-precision positioning within millisecond-level industrial cycles, providing a low-cost solution for scenarios sensitive to power consumption and size, such as UAV inspection and handheld maintenance terminals.
[0128] Example 2: Another embodiment of this application relates to a system for extracting the coordinates of the front cover bolts of a railway freight car wheelset. The implementation details of this system are described in detail below. The following implementation details are provided for ease of understanding and are not necessary for implementing this solution. The system for extracting the coordinates of the front cover bolts of a railway freight car wheelset in this embodiment includes an image processing module, a nutrient potential field construction module, an evolution module, a node extraction module, and a filtering module.
[0129] The image processing module is used to preprocess the original image of the front cover area of the railway freight car wheelset and extract the image of the front cover bolt distribution area. The nutrient potential field construction module is used to extract the edge gradient features and texture features of the image of the front cover bolt distribution area using image feature extraction operators, and to perform weighted fusion of the extracted edge gradient features and texture features to construct the nutrient potential field of the target image. The evolution module is used to initialize the digital slime mold particle swarm distributed in the nutrient potential energy field, drive the digital slime mold particle swarm to undergo chemotactic migration evolution, and form a stable global pheromone network after the evolution is completed. During the chemotactic migration evolution, pheromones are dynamically released to the location of the digital slime mold particles according to the nutrient potential energy value at the location of the particles, while following the natural forgetting mechanism to deposit and decay the pheromones at each location. The node extraction module is used to perform the first threshold segmentation and connected component labeling on the global pheromone network to obtain a set of connected components, and to perform gray-level weighted centroid calculation on each connected component in the set of connected components to obtain the sub-image level coordinates of the candidate feature points corresponding to each connected component, and to form a set of candidate feature points. The filtering module is used to filter candidate feature points in the candidate feature point set by utilizing the rigid geometric topological constraints of the front cover bolts, and obtain the coordinates of the center point of the three front cover bolts.
[0130] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.
[0131] Example 3: Another embodiment of this application relates to an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the railway freight car wheelset front cover bolt coordinate extraction method of the above embodiments.
[0132] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0133] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.
[0134] Example 4: Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.
[0135] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0136] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.
Claims
1. A method for extracting the coordinates of bolts on the front cover of a railway freight car wheelset, characterized in that, include: Image preprocessing is performed on the original image of the front cover area of the railway freight car wheelset to extract the image of the front cover bolt distribution area; The edge gradient features and texture features of the front cover bolt distribution area image are extracted using an image feature extraction operator, and the extracted edge gradient features and texture features are weighted and fused to construct the nutrient potential field of the target image; Initialize the digital slime mold particle swarm distributed in the nutrient potential field, drive the digital slime mold particle swarm to undergo chemotactic migration evolution, and form a stable global pheromone network after the evolution is completed; during the chemotactic migration evolution, according to the nutrient potential value at the location of the digital slime mold particle, dynamically release pheromone to the location, and at the same time follow the natural forgetting mechanism to deposit and decay the pheromone at each location. The global pheromone network is subjected to a first threshold segmentation and connected component labeling to obtain a set of connected components; For each connected component in the set of connected components, the gray-level weighted centroid is calculated to obtain the sub-image level coordinates of the candidate feature points corresponding to each connected component, and a set of candidate feature points is formed. By utilizing the rigid geometric topological constraints of the three bolts on the front cover, the candidate nodes in the candidate node set are filtered to obtain the coordinates of the center point of the three bolts on the front cover.
2. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 1, characterized in that, The step of weightedly fusing the extracted edge gradient features and texture features to construct the nutrient potential field of the target image includes: The extracted edge gradient features and texture features are weighted and fused to construct the initial nutrient potential field of the target image; The constructed initial nutrient potential field is normalized. The gradient magnitude of the first type of region in the normalized nutrient potential energy field is subjected to a Sigmoid nonlinear transformation to obtain the final nutrient potential energy field. The first type of region is the region in the nutrient potential energy field where the nutrient potential energy value is greater than the preset nutrient potential energy threshold.
3. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 1, characterized in that, The initialization of the digital slime mold particle swarm distributed in the nutrient potential field includes: The position of the digital slime mold particle swarm in the nutrient potential field is initialized by a hybrid probability density function that combines a quasi-random probability distribution generated based on the Halton sequence and an importance probability distribution based on the nutrient potential field.
4. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 1, characterized in that, During the chemotactic migration evolution process, the evolution and update formulas for the velocity vector and position vector of the data slime mold particles are as follows: In the formula, Let ω be the velocity vector of the digital slime mold particle i at time t+1; ω is the inertial weight. Let be the velocity vector of the digital slime mold particle i at time t; This represents the chemotactic sensitivity coefficient. Let be the gradient vector of the potential field; The intensity of the random disturbance; Let N be a random vector that follows a Gaussian distribution N(0,1). This represents the position vector of the digital slime mold particle i at time t+1; Let represent the position vector of the digital slime mold particle i at time t; Δt is the unit time step.
5. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 1 or 4, characterized in that, The biological consensus mechanism governing the deposition, decay, and evaporation of pheromones at each location within the nutrient potential field is expressed as follows: In the formula, Let be the pheromone intensity at pixel coordinates (x, y) at time t; The coefficient of evaporation; Let be the pheromone intensity at coordinates (x, y) at time t-1; K is the total number of digital slime mold particles passing through pixel coordinates (x, y); Let t be the total pheromone deposition of all digital slime mold particles passing through pixel coordinates (x, y) at time t; Let be the pheromone deposition increment of the i-th digital slime mold particle passing through pixel coordinates (x, y), when pixel coordinates (x, y) are located in the first type of region of the nutrient potential field. When the pixel coordinates (x, y) are located in a region outside the first type of region within the nutrient potential energy field, The first type of region is the region in the nutrient potential energy field where the nutrient potential energy value is greater than the preset nutrient potential energy threshold.
6. The method for extracting the coordinates of the front cover bolts of railway freight car wheelsets according to claim 1, characterized in that, The process of threshold segmentation and connected component labeling of the global pheromone network to obtain a connected component set includes: The global pheromone network is subjected to threshold segmentation and connected component labeling to obtain an initial set of connected components; Calculate the circularity of each connected component in the initial set of connected components; Using the prior circularity of the cover bolt as the first constraint, the initial connected component set is filtered, and connected components whose circularity does not meet the first constraint are removed, resulting in the final connected component set.
7. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 1 or 6, characterized in that, The process of using the rigid geometric constraints of the front cover bolts to filter candidate feature points in the candidate feature point set and outputting the final set of front cover bolt coordinates includes: Traverse the candidate feature points in the set of candidate feature points, form a candidate feature point pair by any two candidate feature points, and calculate the Euclidean distance of each candidate feature point pair. From all candidate feature point pairs in the candidate feature point set, select candidate feature point pairs whose Euclidean distance is within the preset allowable physical limit of the wheel set front cover bolt spacing; Establish a connecting edge between the selected candidate feature point pairs to form a valid edge set; In a graph composed of the set of effective edges, the three vertices of each triangle formed by connecting three edges end to end constitute a closed triplet. Based on the rigid geometric constraints of the front cover bolts, the difference between the topology of each closed triplet and the ideal front cover bolt topology model is quantitatively scored. Based on the comprehensive score of all closed triplets, select a set of closed triplets that meets the condition of having the lowest comprehensive score and a comprehensive score less than the preset reliability threshold, and use the coordinates of the three candidate feature points in the selected closed triplet as the coordinates of the center point of the three bolts of the front cover.
8. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 7, characterized in that, If, based on the overall scores of all closed triplets, a closed triplet that meets the criteria of having the lowest overall score and a score lower than the preset reliability threshold cannot be selected, then the following are also included: Search the candidate feature point set to find the coordinates of two candidate feature points that meet the preset binary pair conditions as a binary pair. The binary pair condition is that the difference between the distance between the two candidate feature points and the prior distance of the front cover bolt is within a preset allowable range. Based on the three bolts of the front cover The rotational symmetry prior constraint is used to infer the predicted coordinates of the missing node through affine transformation using the coordinates of two candidate feature points in the binary tuple. In the global pheromone network formed through chemotaxis, migration, and evolution, a local search domain is constructed with the predicted coordinates of the missing nodes as the center. A second threshold segmentation and connected component analysis are performed in the local search domain to obtain a set of connected components located in the local search domain; the segmentation threshold of the second threshold segmentation is less than the segmentation threshold set in the first threshold segmentation. Filter the connected components that meet the preset minimum connected component area requirement from the set of connected components located in the local search domain; The gray-scale weighted centroids of the selected connected components are calculated to obtain the coordinates of the completion points; The coordinates of the completion point, along with the coordinates of the two candidate feature points in the binary tuple, are used as the coordinates of the center point of the three bolts on the front cover.
9. The method for extracting the coordinates of the front cover bolts of railway freight cars according to claim 7, characterized in that, The comprehensive scoring function expression used in the step of quantitatively scoring the difference between the topology of each closed triplet and the ideal front cover bolt topology model based on the rigid geometric constraints of the front cover bolts is as follows: In the formula, It indicates the degree of deviation between the triangle formed by the closed triplet and the equilateral triangle; It represents the sum of the angular deviations between the interior angles of the triangle formed by the closed triplet and the 60-degree angle; The dimensional deviation between the side length of the triangle formed by the closed triplet and the prior spacing of the wheelset front cover bolts; They are respectively , , The penalty weighting coefficients for the three items.
10. A system for extracting the coordinates of bolts on the front cover of a railway freight car wheelset, characterized in that, include: The image processing module is used to preprocess the original image of the front cover area of the railway freight car wheelset and extract the image of the front cover bolt distribution area. The nutrient potential field construction module is used to extract the edge gradient features and texture features of the image of the front cover bolt distribution area using image feature extraction operators, and to perform weighted fusion of the extracted edge gradient features and texture features to construct the nutrient potential field of the target image. The evolution module is used to initialize the digital slime mold particle swarm distributed in the nutrient potential energy field, drive the digital slime mold particle swarm to undergo chemotactic migration evolution, and form a stable global pheromone network after the evolution is completed. During the chemotactic migration evolution, pheromones are dynamically released to the location of the digital slime mold particles according to the nutrient potential energy value at the location of the particles, while following the natural forgetting mechanism to deposit and decay the pheromones at each location. The node extraction module is used to perform the first threshold segmentation and connected component labeling on the global pheromone network to obtain a set of connected components, and to perform gray-level weighted centroid calculation on each connected component in the set of connected components to obtain the sub-image level coordinates of the candidate feature points corresponding to each connected component, and to form a set of candidate feature points. The filtering module is used to filter candidate feature points in the candidate feature point set by utilizing the rigid geometric topological constraints of the three bolts of the front cover, and obtain the coordinates of the center point of the three bolts of the front cover.