A TBM tailings slice image self-adaptive segmentation method and system based on fuzzy clustering
By using a fusion difference measurement model based on fuzzy clustering and the Lagrange optimization method, adaptive segmentation of TBM slag images was achieved, solving the problems of manual annotation dependence and lag in existing technologies, and improving the accuracy and intelligence level of slag information extraction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA RAILWAY SHISIJU GROUP CORP
- Filing Date
- 2025-10-20
- Publication Date
- 2026-06-23
AI Technical Summary
Existing methods for analyzing TBM slag information rely on manual offline data collection and expert experience, which are time-consuming and costly. Furthermore, deep learning-based methods require extensive manual annotation, making it difficult to achieve real-time and accurate slag information extraction.
A fuzzy clustering-based method is adopted. By constructing a fusion difference measurement model, the fusion weights of pixel location information and gray value change terms are adaptively determined. The weights are optimized by combining the Lagrange multiplier method, and the pixel membership degree and cluster prototype are iteratively updated to achieve adaptive segmentation of TBM slag images without manual annotation.
It improves the accuracy and stability of TBM slag fragment image segmentation, achieves accurate segmentation without manual annotation, and extracts slag fragment information in real time and efficiently, providing timely and accurate data support for surrounding rock condition assessment and TBM equipment condition monitoring, thereby improving the construction quality and intelligent level of TBM tunnel excavation.
Smart Images

Figure CN121305072B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent TBM technology, specifically an adaptive segmentation method and system for TBM slag image based on fuzzy clustering. Background Technology
[0002] TBMs (hard rock tunnel boring machines) are high-end intelligent equipment used in the construction of tunnels in rock formations. They are widely used in major engineering projects such as railways, highways, water conservancy, municipal engineering, and undersea tunnels. TBMs achieve efficient mechanized construction of tunnel projects through a series of operations including excavation, muck removal, and support.
[0003] The TBM tunneling process generates a large amount of cuttings, which carry rich information about the rock mass, such as the surrounding rock grade, rock strength, and geological structure. They also reflect the condition of the TBM equipment, such as cutterhead load and tool wear. Therefore, accurate analysis of cuttings information is crucial for TBM condition monitoring, tunneling parameter optimization, and safety early warning.
[0004] Traditional methods for analyzing TBM slag fragment information rely heavily on manual offline data collection and expert judgment, which suffers from time lag and difficulty in accurately reflecting the on-site conditions in real time. While deep learning-based slag fragment image segmentation methods have improved information extraction efficiency in recent years, they still require extensive manual annotation, resulting in high costs and difficulties in widespread adoption.
[0005] Therefore, there is an urgent need for an automatic segmentation technology for TBM slag images that does not require manual annotation and has strong adaptive capabilities, so as to achieve efficient automatic extraction of slag information and provide auxiliary annotation for supervised image segmentation models. This technology has significant application value and broad prospects for promotion. Summary of the Invention
[0006] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes an adaptive segmentation method and system for TBM slag image based on fuzzy clustering.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] In a first aspect, the present invention provides an adaptive segmentation method for TBM debris images based on fuzzy clustering, comprising:
[0009] Based on the difference in gray values between pixels and their neighbors in the grayscale image of TBM slag, the grayscale value change term is calculated, and a fusion difference measurement model is constructed by combining the spatial location information of the pixels.
[0010] Based on the fusion difference measurement model, the location information fusion weights are determined using the Lagrange multiplier method. Weighting of grayscale value variation term ;
[0011] Weights based on location information fusion Weighting of grayscale value variation term The fusion difference measurement model is weighted and updated to obtain the updated fusion difference measurement model, and a fuzzy clustering objective function is constructed based on the updated fusion difference measurement model.
[0012] The pixel membership degree and cluster prototype are randomly initialized according to the fuzzy clustering objective function, and the pixel membership degree and cluster prototype are iteratively updated according to the fuzzy clustering objective function until the convergence condition is met, so as to obtain the TBM slag image segmentation result.
[0013] Furthermore, the method also includes:
[0014] The method further includes: preprocessing the grayscale image of the TBM slag sheet, wherein the preprocessing steps are as follows:
[0015] The original color image of the TBM slag sheet is processed by weighted grayscale conversion to obtain the grayscale image of the TBM slag sheet. The formula for calculating the grayscale value after weighted grayscale conversion is specifically expressed as follows:
[0016] ;
[0017] in, Indicates the first line, number The grayscale values of the column pixels after weighting. , , They represent the first line, number The red, green, and blue components of a column of pixels; , , Let these represent the weighting coefficients for the red, green, and blue components, respectively, satisfying... ,and , , .
[0018] Furthermore, the specific formula for calculating the grayscale value change term is as follows:
[0019] ;
[0020] in, Indicates the first line, number The grayscale value change between column pixels and neighboring pixels. This indicates the number of pixels selected within the neighborhood. Represents neighboring pixels grayscale value, , Indicates the first line, number The grayscale value of the column pixels after weighted processing.
[0021] Furthermore, the specific calculation formula for the fusion difference measurement model is as follows:
[0022] ;
[0023] In the formula, Indicates the first line, number Column pixels and the first line, number The fusion difference metric between column pixels. Indicates the first line, number Column pixels and the first line, number The square of the Euclidean distance between column pixels; , Indicates the first line, number Column pixels and the first line, number The grayscale value variation of the column pixels.
[0024] Furthermore, the location information fusion weights Weighting of grayscale value variation term The determination methods include:
[0025] With the goal of minimizing the fusion difference metric, the difference values of pixel location information and grayscale value changes are denoted as follows: and ,in:
[0026] , ;
[0027] Under the constraint that the sum of the fusion weights is a constant 1, a Lagrangian optimization function is constructed and expressed as:
[0028] ;
[0029] Calculate the location information fusion weights for the Lagrange optimization function. Gray value change term fusion weight and Lagrange multipliers Taking the partial derivatives of and setting them all to zero, we obtain the system of optimization condition equations, expressed as:
[0030] , , ;
[0031] Solving the above system of equations simultaneously yields the location information fusion weights. Weighting of grayscale value variation term The calculation formula is:
[0032] , .
[0033] Furthermore, the formula for calculating the fuzzy clustering objective function is as follows:
[0034] ;
[0035] In the formula, This represents the numerical value of the fuzzy clustering objective function. Indicates the total number of pixels in the image. Indicates the number of subclasses. Indicates the first For the pixel The membership degree of each subclass, and satisfying , Indicates the first The pixel and the The fusion difference metric between subclasses;
[0036] The fusion difference metric is determined based on the clustering prototype corresponding to each subclass.
[0037] Furthermore, the update process of the clustering prototype includes:
[0038] In each iteration of solving the fuzzy clustering objective function, the membership degree of all pixels in each subclass to that subclass is calculated based on the currently calculated pixel membership matrix.
[0039] In each subclass, the pixel with the largest membership value is selected as the new cluster prototype for that subclass;
[0040] The spatial location and gray value change of the newly selected cluster prototype are used as the new cluster center. The fusion difference metric of all pixels to each cluster prototype is recalculated, and the membership degree of each pixel to each subclass is updated according to the recalculated fusion difference metric, and then the next iteration calculation is entered.
[0041] The membership degree calculation formula is expressed as follows:
[0042] ;
[0043] The clustering prototype is the pixel with the largest membership value in the current subclass, and its corresponding spatial location and gray value variation term together constitute the feature center of the class.
[0044] Furthermore, the initial determination process of the clustering prototype includes:
[0045] A predetermined number of pixels are randomly selected from the set of pixels in the TBM slag grayscale image as initial clustering prototypes. The initial membership degree of each pixel to each clustering prototype is calculated based on the initial clustering prototypes, and this is used as the initial basis for iterative updating of the fuzzy clustering objective function.
[0046] Furthermore, the method for determining the convergence condition of the fuzzy clustering iteration includes:
[0047] After the t-th iteration is completed, determine the absolute value of the difference between the corresponding elements of the membership matrix obtained in this iteration and the membership matrix obtained in the (t-1)-th iteration, and take the maximum value among all the absolute values of the difference as the convergence criterion.
[0048] When the convergence criterion is less than or equal to a preset threshold for two consecutive iterations, the iteration is determined to be converged; or, when the number of iterations reaches the preset maximum number of iterations, the iteration is also determined to be converged and the iteration is terminated.
[0049] Secondly, the present invention provides an adaptive segmentation system for TBM slag image based on fuzzy clustering, used to implement the aforementioned adaptive segmentation method for TBM slag image based on fuzzy clustering, comprising:
[0050] The fusion difference measurement module is used to calculate the gray value change term based on the difference in gray value between a pixel and its neighboring pixels in the grayscale image of TBM slag, and to construct a fusion difference measurement model by combining the spatial location information of the pixels.
[0051] Fusion weight determination module: used to determine the location information fusion weights according to the fusion difference measurement model using the Lagrange multiplier method. Weighting of grayscale value variation term ;
[0052] Clustering objective function construction module: used for fusing weights based on location information. Weighting of grayscale value variation term The fusion difference measurement model is weighted and updated to obtain the updated fusion difference measurement model, and a fuzzy clustering objective function is constructed based on the updated fusion difference measurement model.
[0053] Fuzzy clustering solution module: used to randomly initialize pixel membership and cluster prototype according to the fuzzy clustering objective function, and iteratively update pixel membership and cluster prototype according to the fuzzy clustering objective function until the convergence condition is met, so as to obtain the TBM slag image segmentation result.
[0054] Compared with the prior art, the beneficial effects of the present invention are:
[0055] This invention constructs a fusion difference measurement model based on fuzzy clustering, which adaptively determines the fusion weight of pixel location information and gray value change term. This solves the problem that traditional methods have difficulty in accurately distinguishing complex situations where spatially close objects have large gray value differences or similar gray values have large spatial distances. This effectively improves the accuracy and stability of TBM slag image segmentation.
[0056] This invention achieves accurate and adaptive segmentation of TBM debris images without manual annotation by designing a fuzzy clustering objective function based on a fusion difference measurement model and establishing an iterative update strategy for clustering prototypes and membership matrices. This overcomes the problems of high cost and difficulty in promotion caused by existing deep learning methods relying on a large amount of manually labeled data.
[0057] This invention, through the aforementioned adaptive fuzzy clustering segmentation technology, can extract TBM slag information in real time and efficiently, providing timely and accurate data support for surrounding rock condition assessment, TBM equipment condition monitoring, and optimization and control of tunneling parameters, significantly improving the construction quality and intelligent level of TBM tunnel excavation. Attached Figure Description
[0058] Figure 1 This is a flowchart of an adaptive segmentation method for TBM slag image based on fuzzy clustering, as described in Example 1.
[0059] Figure 2 This is the original image of the TBM slag film from Example 1.
[0060] Figure 3 This is a clustering result of the original TBM slag sheet image from Example 1.
[0061] Figure 4 This is a segmentation result of the original TBM slag film from Example 1.
[0062] Figure 5 This is an architecture diagram of an adaptive segmentation system for TBM slag image based on fuzzy clustering, as shown in Example 2. Detailed Implementation
[0063] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0064] Example 1
[0065] Please see Figure 1 This invention provides an adaptive segmentation method for TBM slag image based on fuzzy clustering, comprising:
[0066] Based on the difference in gray values between pixels and their neighbors in the grayscale image of TBM slag, the grayscale value change term is calculated, and a fusion difference measurement model is constructed by combining the spatial location information of the pixels.
[0067] Based on the fusion difference measurement model, the location information fusion weights are determined using the Lagrange multiplier method. Weighting of grayscale value variation term ;
[0068] Weights based on location information fusion Weighting of grayscale value variation term The fusion difference measurement model is weighted and updated to obtain the updated fusion difference measurement model, and a fuzzy clustering objective function is constructed based on the updated fusion difference measurement model.
[0069] The pixel membership degree and cluster prototype are randomly initialized according to the fuzzy clustering objective function, and the pixel membership degree and cluster prototype are iteratively updated according to the fuzzy clustering objective function until the convergence condition is met, so as to obtain the TBM slag image segmentation result.
[0070] Understandably, during implementation, it is necessary to convert the original color images of the collected TBM slag fragments into grayscale images to facilitate subsequent fusion difference measurement and fuzzy clustering processing. This embodiment uses slag fragment images collected from a TBM construction project, such as... Figure 2 As shown, the original color image of the slag fragment is a slag fragment of good surrounding rock with an image resolution of 360*275. In practical applications, large-size images can be cut into images of approximate sizes.
[0071] Specifically, the original color image of the TBM slag sheet is processed by weighted grayscale conversion to obtain the grayscale image of the TBM slag sheet. The formula for calculating the grayscale value after weighted grayscale conversion is as follows:
[0072] ;
[0073] in, Indicates the first line, number The grayscale values of the column pixels after weighting. , , They represent the first line, number The red, green, and blue components of a column of pixels; , , Let these represent the weighting coefficients for the red, green, and blue components, respectively, satisfying... ,and , , .
[0074] It should be noted that the weighting coefficients are obtained using common existing methods, such as through engineering experience. The specific values are determined based on the actual engineering project. In this embodiment... , and The values were 0.60, 0.31, and 0.09 respectively.
[0075] In one embodiment, the grayscale value change term is obtained by calculating the difference in grayscale values between a single pixel and its neighboring pixels, and the calculation formula is specifically expressed as follows:
[0076] ;
[0077] in, Indicates the first line, number The grayscale value change between column pixels and neighboring pixels. This indicates the number of pixels selected within the neighborhood. Represents neighboring pixels grayscale value, , Indicates the first line, number The grayscale value of the column pixels after weighted processing.
[0078] It should be noted that the larger the grayscale value variation term, the more significant the difference in grayscale value between the pixel and its neighboring pixels, indicating that the color or texture variation in the area is richer. Conversely, it means that the color or texture of the pixel and its neighboring pixels is relatively simple. The neighboring area is a 3×3 square area centered on the pixel to be calculated.
[0079] In practice, to more accurately quantify the degree of difference between pixels in TBM debris images, a fusion difference measurement model is constructed to effectively improve the accuracy and stability of subsequent fuzzy clustering segmentation.
[0080] Specifically, the fusion difference measurement model is established based on the spatial location information between pixels and the grayscale variation term, and its measurement relationship is as follows:
[0081] ,
[0082] In the formula, Indicates the first line, number Column pixels and the first line, number The fusion difference metric between column pixels. Indicates the first line, number Column pixels and the first line, number The square of the Euclidean distance between column pixels; , Indicates the first line, number Column pixels and the first line, number The grayscale value variation of the column pixels.
[0083] In summary, the fusion difference metric is used to comprehensively describe the magnitude of the difference between two pixels in an image. This difference includes not only the distance between them but also the difference in color depth (i.e., grayscale value variation). If two pixels are close to each other and have similar colors, the fusion difference metric will be small, indicating that they may belong to the same category (e.g., the same piece of debris). Conversely, if two pixels are far apart and have a large color difference, the fusion difference metric will be large, indicating that they may belong to different categories (e.g., the background area between two pieces of debris).
[0084] In the specific implementation process, there are some complex situations in the processing of TBM scrap images. Specifically, some pixels are very close in position but have large differences in color (i.e., grayscale value), such as at the boundary between the scrap area and the background area. In this case, it is not possible to accurately determine whether two pixels belong to the same category based solely on their position. Other pixels are almost identical in color but are far apart in spatial position, such as pixels in different locations in the background area. In this case, it is also not enough to accurately distinguish categories based solely on color.
[0085] To more accurately distinguish these complex situations, it is necessary to assign appropriate fusion weights to the spatial location information of pixels and the differences in grayscale value changes, dynamically determine the influence ratio of each factor, and ensure that the fusion difference measurement model can maintain reasonable segmentation accuracy under different situations.
[0086] In another embodiment, the fusion weights of location information and grayscale value change terms are determined using the Lagrange multiplier method, wherein the location information fusion weights... Weighting of grayscale value variation term The determination methods include:
[0087] With the goal of minimizing the fusion difference metric, the difference values of pixel location information and grayscale value changes are denoted as follows: and ,in:
[0088] , ;
[0089] Under the constraint that the sum of the fusion weights is a constant 1, the Lagrangian optimization function is constructed, specifically as follows:
[0090] ;
[0091] Calculate the fusion weights for the Lagrange optimization function. , and Lagrange multipliers Taking the partial derivatives of and setting them all to zero, we obtain the system of optimization condition equations, specifically expressed as:
[0092] , , ;
[0093] Solving the above system of equations simultaneously yields the location information fusion weights. Weighting of grayscale value variation term The specific calculation formula is as follows:
[0094] , .
[0095] It is understandable that in the grayscale image of TBM debris, the influence of spatial location information and grayscale value variation on pixel differences is not constant. When pixels in the image are close in position but have large color differences, the weight of the grayscale variation term should be appropriately increased. The weight of the position term should be relatively large; when pixels are far apart but similar in color, the weight of the position term should be appropriately increased. Relatively large.
[0096] For example, if two pixels are located in the same piece of waste material, and the pixels are close in position and have the same color, then and If both are relatively small, the model adaptively brings their weights closer together, resulting in a smaller final difference metric. However, if two pixels are located on different fragments, and their positions are close but their colors differ significantly, then... Increase, and the model will automatically improve. Weights are applied to increase the difference metric; if two pixels are located in distant regions but have the same color, then... Increase Smaller, at this time The increase keeps the fusion difference value at a reasonable level.
[0097] In another embodiment, the weights and Substituting these parameters into the fusion difference measurement model allows the weight parameters in the model to adaptively reflect the features of the current TBM slag image, thereby enabling the model to more accurately describe the differences in the actual image. Figure 2 Based on the original TBM slag image shown, the intermediate clustering results of the original TBM slag image after processing by the above-mentioned fusion difference metric model are as follows: Figure 3 As shown; a fuzzy clustering objective function is constructed based on the updated fusion difference measurement model;
[0098] Specifically, the calculation formula for the fuzzy clustering objective function is as follows:
[0099] ;
[0100] In the formula, This represents the numerical value of the fuzzy clustering objective function. Indicates the total number of pixels in the image. Indicates the number of subclasses. Indicates the first For the pixel The membership degree of each subclass, and satisfying , Indicates the first The pixel and the The fusion difference metric between subclasses;
[0101] The fusion difference metric is determined based on the clustering prototype corresponding to each subclass.
[0102] It should be noted that the numerical value of the fuzzy clustering objective function... The objective function is the evaluation criterion used in subsequent iterative optimization processes. The iterative process of the clustering algorithm is the continuous optimization of this objective function, with its value gradually decreasing until convergence. The total number of image pixels... Number of subclasses Based on the actual application scenario, this embodiment is determined as follows. The value is 99000. The value is 30; The numerical value represents the first The pixel belongs to the first The number of possible subclasses ranges from [0, 1].
[0103] It is understandable that the numerical value of the objective function for fuzzy clustering... The larger the value, the less the membership degree of the current pixel classification is matched with the fusion difference metric, indicating that the clustering classification effect is not ideal. During the iterative solution process, the value of the fuzzy clustering objective function is gradually reduced by continuously updating the membership matrix and the clustering prototype. This continues until the convergence condition is met, making subsequent classifications more consistent with the actual distribution of image features.
[0104] In one embodiment, the update process of the clustering prototype includes:
[0105] In each iteration of solving the fuzzy clustering objective function, the membership degree of all pixels in each subclass to that subclass is calculated based on the currently calculated pixel membership matrix.
[0106] In each subclass, the pixel with the largest membership value is selected as the new cluster prototype for that subclass;
[0107] The spatial location and gray value change of the newly selected cluster prototype are used as the new cluster center. The fusion difference metric of all pixels to each cluster prototype is recalculated, and the membership degree of each pixel to each subclass is updated according to the recalculated fusion difference metric, and then the next iteration calculation is entered.
[0108] The membership degree calculation formula is specifically expressed as follows:
[0109] ;
[0110] Understandably, each subclass corresponds to a large number of pixels, and each pixel has a corresponding membership value to that subclass. The process of updating the clustering prototype is to find the pixel with the largest membership value to that subclass in each subclass and use this pixel as the new clustering prototype. After the clustering prototype is updated, the membership of all pixels to each class is recalculated based on the updated clustering prototype. Through multiple rounds of iterative optimization, the clustering prototype can be gradually stabilized, thereby reducing the value of the clustering objective function until the convergence condition is met.
[0111] The clustering prototype is the pixel with the largest membership value in the current subclass, and its corresponding spatial location and gray value variation term together constitute the feature center of the class.
[0112] It should be understood that the clustering prototype is composed of the spatial location information of pixels and the gray value variation attribute. The spatial location information is used to characterize the spatial geometric features of pixels in the image to be segmented, so as to distinguish different spatial regions in the image. The gray value variation attribute is used to characterize the gray value difference features in the local region where the pixel is located, so as to distinguish the gray value feature differences of different textures or regions in the image. The clustering prototype composed of the two can effectively serve as the feature center of the subclass, accurately reflecting the comprehensive attributes of the corresponding category of pixel set in terms of spatial and gray value features, so as to achieve accurate fuzzy clustering and image segmentation.
[0113] In the implementation of TBM image segmentation, due to the large number of image pixels (for example, the total number of pixels in an image with a resolution of 360×275 is approximately 9.9×10⁻⁶), 4 If a fixed rule is used to initialize the clustering prototype, the calculation results may be biased towards a specific region, thus affecting the adaptability of subsequent clustering. To avoid this problem, this embodiment adopts a random initialization strategy.
[0114] Specifically, the initial determination process of the clustering prototype includes:
[0115] A predetermined number of pixels are randomly selected from the set of pixels in the TBM slag grayscale image as initial clustering prototypes. The initial membership degree of each pixel to each clustering prototype is calculated based on the initial clustering prototypes, and this is used as the initial basis for iterative updating of the fuzzy clustering objective function.
[0116] It is understood that the preset number is the number of subclasses required for fuzzy clustering. The initial membership degree represents the similarity between a pixel and the initial prototype. The higher the membership degree value, the closer the pixel is to the cluster prototype in terms of spatial location and grayscale features. This random initialization combined with dynamic adjustment based on membership degree feedback enables the model to have good robustness and adaptability, and can converge quickly under different slag image features, avoiding the local optimum problem caused by the selection of initial values.
[0117] It should be noted that the final effect of clustering depends on the stability and convergence of the iterative process; therefore, in order to objectively and accurately determine whether the clustering algorithm has reached a stable classification state, this embodiment adopts a convergence condition based on the degree of change of the membership matrix.
[0118] In implementation, the method for determining the convergence condition of the fuzzy clustering iteration includes:
[0119] After the t-th iteration is completed, determine the absolute value of the difference between the corresponding elements of the membership matrix obtained in this iteration and the membership matrix obtained in the (t-1)-th iteration, and take the maximum value among all the absolute values of the difference as the convergence criterion.
[0120] When the convergence criterion is less than or equal to a preset threshold for two consecutive iterations, the iteration is determined to be converged; or, when the number of iterations reaches the preset maximum number of iterations, the iteration is also determined to be converged and the iteration is terminated.
[0121] For example, after each iteration, an updated membership matrix is obtained, where each element represents the degree of membership of each pixel to each subclass. The membership matrix obtained in the t-th iteration is: The membership matrix obtained in the (t-1)th iteration is Calculate the absolute value of the difference between corresponding elements in the two membership matrices, and take the maximum value as the convergence criterion for the current iteration. The specific calculation formula is as follows:
[0122] ;
[0123] In the formula, This represents the maximum difference in membership degree change during the t-th iteration. , They represent the first and second. For the pixel The membership values of each subclass in the t-th and (t-1)-th iterations;
[0124] when When the value exceeds the preset threshold, it indicates that the classification result is still changing significantly, the algorithm has not yet converged, and further iterations are needed; when When the result is less than or equal to the preset threshold, it indicates that the clustering and classification results have changed very little after continuous iterations and have become stable, and the iteration is terminated.
[0125] To avoid the clustering algorithm iterating indefinitely in the TBM slag image segmentation application, if the above convergence criteria are not met, but the number of iterations has reached the preset maximum number of iterations, the iteration is also determined to be converged and the iteration is terminated.
[0126] It should be noted that the preset threshold and the maximum number of iterations are determined according to the actual application scenario, and will not be elaborated on here. In this embodiment, the preset threshold is 0.001 and the maximum number of iterations is 100.
[0127] like Figure 4 As shown, after the iteration reaches the convergence condition, the final membership matrix and cluster prototype are obtained. Based on the final membership value, each pixel in the image is assigned to the cluster subclass with the highest membership, thereby achieving accurate segmentation of the TBM slag image and obtaining the final image segmentation result.
[0128] Example 2
[0129] like Figure 2As shown in the example, the parts not detailed in this embodiment are as shown in Example 1. This embodiment discloses an adaptive segmentation system for TBM slag image based on fuzzy clustering, including:
[0130] The fusion difference measurement module is used to calculate the gray value change term based on the gray value difference between a pixel and its neighboring pixels in the gray value image of TBM slag, and to construct a fusion difference measurement model by combining the spatial location information of the pixels.
[0131] Fusion weight determination module: used to determine the fusion weights corresponding to the location information and the gray value change term respectively according to the fusion difference measurement model and the Lagrange multiplier method;
[0132] Clustering objective function construction module: used to perform weighted updates on the fusion difference measurement model based on the fusion weights to obtain the updated fusion difference measurement model, and to construct a fuzzy clustering objective function based on the updated fusion difference measurement model;
[0133] Fuzzy clustering solution module: Randomly initializes pixel membership and cluster prototypes according to the fuzzy clustering objective function, and iteratively updates pixel membership and cluster prototypes based on the fuzzy clustering objective function until the convergence condition is met, thereby obtaining the TBM slag image segmentation result.
[0134] Some of the data in the above formula are calculated by removing dimensions and taking their numerical values. The formula is the closest to the real situation obtained by software simulation of a large amount of collected data. The preset parameters and preset thresholds in the formula are set by those skilled in the art according to the actual situation or obtained through simulation of a large amount of data.
[0135] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. An adaptive segmentation method for TBM slag image based on fuzzy clustering, characterized in that, include: Based on the difference in gray values between pixels and their neighbors in the grayscale image of TBM slag, the grayscale value change term is calculated, and a fusion difference measurement model is constructed by combining the spatial location information of the pixels. Based on the fusion difference measurement model, the location information fusion weights are determined using the Lagrange multiplier method. Weighting of grayscale value variation term ; Weights based on location information fusion Weighting of grayscale value variation term The fusion difference measurement model is weighted and updated to obtain the updated fusion difference measurement model, and a fuzzy clustering objective function is constructed based on the updated fusion difference measurement model. The pixel membership degree and cluster prototype are randomly initialized according to the fuzzy clustering objective function, and the pixel membership degree and cluster prototype are iteratively updated according to the fuzzy clustering objective function until the convergence condition is met, so as to obtain the TBM slag image segmentation result. The specific calculation formula for the fusion difference measurement model is as follows: ; In the formula, Indicates the first line, number Column pixels and the first line, number The fusion difference metric between column pixels. Indicates the first line, number Column pixels and the first line, number The square of the Euclidean distance between column pixels; , Indicates the first line, number Column pixels and the first line, number The grayscale value variation of the column pixels.
2. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 1, characterized in that, The method further includes: preprocessing the original color image of the TBM slag sheet, the preprocessing steps of which are as follows: The original color image of the TBM slag sheet is processed by weighted grayscale conversion to obtain the grayscale image of the TBM slag sheet. The formula for calculating the grayscale value after weighted grayscale conversion is specifically expressed as follows: ; in, Indicates the first line, number The grayscale values of the column pixels after weighting. , , They represent the first line, number The red, green, and blue components of a column of pixels; , , Let these represent the weighting coefficients for the red, green, and blue components, respectively, satisfying... ,and , , .
3. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 1, characterized in that, The specific formula for calculating the grayscale value change term is as follows: ; in, Indicates the first line, number The grayscale value change between column pixels and neighboring pixels. This indicates the number of pixels selected within the neighborhood. Represents neighboring pixels grayscale value, , Indicates the first line, number The grayscale value of the column pixels after weighted processing.
4. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 1, characterized in that, The location information fusion weight Weighting of grayscale value variation term The determination methods include: With the goal of minimizing the fusion difference metric, the difference values of pixel location information and grayscale value changes are denoted as follows: and ,in: , ; Under the constraint that the sum of the fusion weights is a constant 1, a Lagrangian optimization function is constructed and expressed as: ; Calculate the location information fusion weights for the Lagrange optimization function. Gray value change term fusion weight and Lagrange multipliers Taking the partial derivatives of and setting them all to zero, we obtain the system of optimization condition equations, expressed as: , , ; Solving the above system of equations simultaneously yields the location information fusion weights. Weighting of grayscale value variation term The calculation formula is: , 。 5. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 1, wherein the calculation formula of the fuzzy clustering objective function is: ; In the formula, This represents the numerical value of the fuzzy clustering objective function. Indicates the total number of pixels in the image. Indicates the number of subclasses. Indicates the first For the pixel The membership degree of each subclass, and satisfying , Indicates the first The pixel and the The fusion difference metric between subclasses; in, The fusion difference metric is determined based on the clustering prototype corresponding to each subclass.
6. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 5, characterized in that, The update process of the clustering prototype includes: In each iteration of solving the fuzzy clustering objective function, the membership degree of all pixels in each subclass to that subclass is calculated based on the currently calculated pixel membership matrix. In each subclass, the pixel with the largest membership value is selected as the new cluster prototype for that subclass; The spatial location and gray value change of the newly selected cluster prototype are used as the new cluster center. The fusion difference metric of all pixels to each cluster prototype is recalculated, and the membership degree of each pixel to each subclass is updated according to the recalculated fusion difference metric, and then the next iteration calculation is entered. The membership degree calculation formula is expressed as follows: ; The clustering prototype is the pixel with the largest membership value in the current subclass, and its corresponding spatial location and gray value variation term together constitute the feature center of the class.
7. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 6, characterized in that, The initial determination process of the clustering prototype includes: A predetermined number of pixels are randomly selected from the set of grayscale images of TBM scrap as initial clustering prototypes. The initial membership degree of each pixel to each clustering prototype is calculated based on the initial clustering prototypes, and this is used as the initial basis for iterative updating of the fuzzy clustering objective function.
8. The adaptive segmentation method for TBM slag image based on fuzzy clustering according to claim 1, characterized in that, The convergence criteria for the fuzzy clustering iteration include: After the t-th iteration is completed, determine the absolute value of the difference between the corresponding elements of the membership matrix obtained in this iteration and the membership matrix obtained in the (t-1)-th iteration, and take the maximum value among all the absolute values of the difference as the convergence criterion. When the convergence criterion is less than or equal to a preset threshold for two consecutive iterations, the iteration is determined to be converged; or, when the number of iterations reaches the preset maximum number of iterations, the iteration is also determined to be converged and the iteration is terminated.
9. An adaptive segmentation system for TBM slag image based on fuzzy clustering, characterized in that, An adaptive segmentation method for TBM slag image based on fuzzy clustering as described in any one of claims 1-8 includes: Fusion Difference Measurement Module: This module is used to calculate the gray value change term based on the difference in gray value between a pixel and its neighboring pixels in the grayscale image of a TBM slag sheet, and to construct a fusion difference measurement model by combining the spatial location information of the pixels. Fusion weight determination module: used to determine the location information fusion weights according to the fusion difference measurement model using the Lagrange multiplier method. Weighting of grayscale value variation term ; Clustering objective function construction module: used for fusing weights based on location information. Weighting of grayscale value variation term The fusion difference measurement model is weighted and updated to obtain the updated fusion difference measurement model, and a fuzzy clustering objective function is constructed based on the updated fusion difference measurement model. Fuzzy clustering solution module: used to randomly initialize pixel membership and cluster prototype according to the fuzzy clustering objective function, and iteratively update pixel membership and cluster prototype according to the fuzzy clustering objective function until the convergence condition is met, so as to obtain the TBM slag image segmentation result.