An image segmentation method and system
By combining robust discriminative fuzzy C-means clustering with fuzzy theory and clustering algorithms, the problem of poor segmentation performance of existing image segmentation methods on noisy images is solved, achieving more efficient image segmentation and noise resistance, especially showing better segmentation performance in medical MR images and industrial remote sensing images.
Patent Information
- Application Number
- CN202210786622.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-07-04
AI Technical Summary
Existing image segmentation methods have poor segmentation results when dealing with noisy images, and cannot effectively identify and extract non-uniform and edge information in the image, resulting in insufficient noise resistance.
A robust discriminative fuzzy C-means clustering method is adopted. A sample matrix is constructed through feature extraction, and the membership matrix is used for image segmentation. Combining fuzzy theory and clustering algorithm, the inter-class separability and global information of the sample data are considered, and the objective function is optimized to improve the segmentation performance.
It improves the accuracy and noise resistance of image segmentation, and can better identify and extract non-uniform and edge information in images, especially showing better segmentation results in medical MR images and industrial remote sensing images.
Smart Images

Figure CN115205310B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image segmentation method and system. Background Technology
[0002] In the context of the digital age, the rapid development of information technology has enabled people to obtain a large amount of complex data. Learning to conduct data analysis in a reasonable way and mining useful information from big data can bring more value to people and meet the different application needs of the new era.
[0003] Cluster analysis is one of the core methods in multivariate statistical analysis. It is within the framework of unsupervised learning and saves the cost of labeled data compared to supervised learning, making it more practical.
[0004] In the context of the digital image era, many image segmentation methods have been proposed, mainly including threshold-based segmentation methods, cluster-based segmentation methods, region-based segmentation methods, edge-based segmentation methods, and graph theory-based segmentation methods. In fact, due to the inherent ambiguity of image information, existing segmentation methods suffer from poor segmentation results. Summary of the Invention
[0005] In view of this, the present invention provides an image segmentation method and system to improve the image segmentation effect.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] An image segmentation method, the method comprising the following steps:
[0008] Feature extraction is performed on the sample images to construct a sample matrix of the sample images;
[0009] The membership matrix of the sample matrix is determined by using a robust discriminative fuzzy C-means clustering method.
[0010] The sample image is segmented using the membership matrix.
[0011] Optionally, the step of using robust discriminative fuzzy C-means clustering to determine the membership matrix of the sample matrix specifically includes:
[0012] Initialize the cluster centers for each data cluster;
[0013] Based on the cluster center of each data cluster, calculate the membership degree of each sample point in the sample matrix relative to each data cluster, and construct the membership degree matrix;
[0014] Determine whether the iteration termination condition is met and obtain the result.
[0015] If the judgment result indicates no, update the cluster center of each data cluster according to the membership matrix, and return to the step "Calculate the membership degree of each sample point in the sample matrix relative to each data cluster according to the cluster center of each data cluster, and construct the membership matrix";
[0016] If the judgment result indicates yes, then the membership matrix is output.
[0017] Optionally, the step of calculating the membership degree of each sample point in the sample matrix relative to each data cluster based on the cluster center of each data cluster specifically includes:
[0018] Based on the cluster centers of each data cluster, the formula is used. Calculate the membership degree of each sample point in the sample matrix relative to each data cluster;
[0019] Among them, u ij v represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, c represents the number of data clusters, and v i Let x represent the cluster center of the i-th data cluster. j Let v represent the feature of the j-th sample point. k Let m represent the cluster center of the k-th data cluster, and m represent the fuzziness index.
[0020] Optionally, updating the cluster center of each data cluster according to the membership matrix specifically includes:
[0021] Based on the cluster centers of each data cluster, using the formula Calculate hyperparameters;
[0022] Where, λ t This represents the hyperparameter, where N represents the number of sample points, and x represents the hyperparameter. j Let v represent the feature of the j-th sample point, c represent the number of data clusters, and v i v represents the cluster center of the i-th data cluster. total Indicates the global cluster center.
[0023] Based on the hyperparameters and the membership matrix, the formula is used. Update the cluster centers for each data cluster;
[0024] Among them, v i ' represents the updated cluster center of the i-th data cluster, u ij denoted by , m represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, m represents the fuzziness index, and α represents the preset parameter.
[0025] Optionally, the iteration termination condition is that the number of iterations reaches an iteration threshold.
[0026] Optionally, the iteration termination condition is that the difference between the objective function values obtained from two adjacent iterations is less than the objective function convergence threshold;
[0027] The formula used to calculate the value of the objective function is:
[0028]
[0029] Where J is the objective function value, N represents the number of sample points, c represents the number of data clusters, and u ij x represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster. j Let v represent the feature of the j-th sample point. i v represents the cluster center of the i-th data cluster. total Indicates the global cluster center. m represents the fuzziness index, and α represents the preset parameter.
[0030] An image segmentation system, the system comprising:
[0031] The feature extraction module is used to extract features from the sample image and construct a sample matrix of the sample image;
[0032] The membership matrix determination module is used to determine the membership matrix of the sample matrix using a robust discriminative fuzzy C-means clustering method.
[0033] An image segmentation module is used to segment the sample image using the membership matrix.
[0034] Optionally, the membership matrix determination module specifically includes:
[0035] The initialization submodule is used to initialize the cluster centers for each data cluster;
[0036] The membership calculation submodule is used to calculate the membership degree of each sample point in the sample matrix relative to each data cluster based on the cluster center of each data cluster, and to construct the membership matrix.
[0037] The judgment submodule is used to determine whether the iteration termination condition is met and obtain the judgment result;
[0038] The cluster center update submodule is used to update the cluster center of each data cluster according to the membership matrix if the judgment result indicates no, and return to the step "Calculate the membership degree of each sample point in the sample matrix relative to each data cluster according to the cluster center of each data cluster, and construct the membership matrix".
[0039] The membership matrix output submodule is used to output the membership matrix if the judgment result indicates yes.
[0040] Optionally, the membership calculation submodule specifically includes:
[0041] The membership calculation unit is used to calculate the membership degree based on the cluster centers of each data cluster using the formula. Calculate the membership degree of each sample point in the sample matrix relative to each data cluster;
[0042] Among them, u ij v represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, c represents the number of data clusters, and v i Let x represent the cluster center of the i-th data cluster. j Let v represent the feature of the j-th sample point. k Let m represent the cluster center of the k-th data cluster, and m represent the fuzziness index.
[0043] Optionally, the cluster center update submodule specifically includes:
[0044] The hyperparameter calculation unit is used to calculate the hyperparameters based on the cluster centers of each data cluster using the formula... Calculate hyperparameters;
[0045] Where, λ t This represents the hyperparameter, where N represents the number of sample points, and x represents the hyperparameter. j Let v represent the feature of the j-th sample point, c represent the number of data clusters, and v i v represents the cluster center of the i-th data cluster. total Indicates the global cluster center.
[0046] The cluster center update unit is used to update the cluster center according to the hyperparameters and the membership matrix using the formula... Update the cluster centers for each data cluster;
[0047] Among them, v i ' represents the updated cluster center of the i-th data cluster, u ij denoted by , m represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, m represents the fuzziness index, and α represents the preset parameter.
[0048] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0049] This invention discloses an image segmentation method and system. The method includes the following steps: extracting features from a sample image to construct a sample matrix; using a robust discriminative fuzzy C-means clustering method to determine the membership matrix of the sample matrix; and segmenting the sample image using the membership matrix. This invention utilizes a robust discriminative fuzzy C-means clustering method that combines fuzzy theory with clustering algorithms to achieve image segmentation. It exhibits better segmentation performance for noisy images, stronger recognition and extraction capabilities for non-equilibrium and edge information in images, and more accurate image segmentation results, thus improving the overall image segmentation effect. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 A flowchart of an image segmentation method provided in an embodiment of the present invention;
[0052] Figure 2 Example MR image of the 60th layer provided in an embodiment of the present invention;
[0053] Figure 3 A schematic diagram showing the segmentation results of the MR image at layer 60 using different algorithms provided in embodiments of the present invention;
[0054] Figure 4 Example MR image of the 70th layer provided in an embodiment of the present invention;
[0055] Figure 5 A schematic diagram showing the segmentation results of the MR image at layer 70 using different algorithms provided in embodiments of the present invention;
[0056] Figure 6 A schematic diagram showing the segmentation results of the first type of remote sensing image using different algorithms provided in the embodiments of the present invention;
[0057] Figure 7 This is a schematic diagram of the segmentation results of a second type of remote sensing image using different algorithms provided in embodiments of the present invention. Detailed Implementation
[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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.
[0059] The purpose of this invention is to provide an image segmentation method and system to improve image segmentation results.
[0060] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0061] As an important branch of cluster analysis, fuzzy clustering analysis cleverly combines fuzzy theory with clustering ideas, resulting in better data representation and clustering effects. Research and improvement of fuzzy clustering algorithms have always been a hot topic in cluster analysis research, and many related algorithms have been proposed.
[0062] Beyond theoretical research, the application of fuzzy clustering algorithms continues to expand, encompassing industrial fields such as pattern recognition, machine learning, and artificial intelligence, with particularly wide applications in image segmentation. Image segmentation is a crucial step between image processing and image analysis. Its goal is to divide an image into several regions with different properties and meanings, where features within each region are as similar as possible, and different regions are as different as possible. For example, a grayscale image of size M×N can be represented by the set I = {(x,y)|x = 0, 1, ..., M-1; y = 0, 1, ..., N-1}, where M and N are positive integers, and the set G = {0, 1, ..., 255}, representing the set of gray levels. This digital image can then be represented as a mapping... The goal of image segmentation is to divide a set I into K non-empty subsets π1, π2, ..., π K At the same time, the following conditions must be met.
[0063] (1)
[0064] (2) For all i and j, i ≠ j;
[0065] (3)π i It is a connected region, i = 1, 2, ..., K;
[0066] (4)P(π i = TRUE; i = 1, 2, ..., K, meaning that each sub-region has the same characteristics;
[0067] (5)P(π i ∪π j )=FALSE,i≠j, meaning that different sub-regions have different characteristics.
[0068] In fact, given the inherent fuzziness of image information, applying fuzzy theory to image segmentation is both reasonable and inevitable. Using fuzzy clustering algorithms for image segmentation is a natural consequence of the commonalities between image and cluster analysis. The main contribution of this invention is to apply the proposed clustering algorithm to image segmentation.
[0069] The Fuzzy C-Means Clustering Algorithm (FCM) is a typical fuzzy clustering algorithm. It introduces fuzzy membership as a criterion and uses optimization theory to perform clustering. Its model is simple and easy to program. However, the algorithm is easily affected by noise and outliers. Currently, there are six main problems: (1) imbalanced datasets and non-spherical data clusters; (2) noise and outliers; (3) initialization of data cluster centers; (4) spatial information and computational efficiency of images in image segmentation applications; (5) setting fuzzy parameters; and (6) determining the number of data clusters.
[0070] The FCM algorithm operates within the framework of unsupervised learning. Typically, the distribution characteristics of the data are unknown, and the Euclidean distance criterion used in the model does not consider the inter-class separability of the sample data. This fails to guarantee the distribution characteristics of intra-class compactness and inter-class separability, resulting in weak extraction and recognition capabilities for imbalanced datasets. Furthermore, due to the membership constraint, the membership degree of any point is not zero, making the algorithm susceptible to errors caused by noise and outliers. In image segmentation applications, the algorithm cannot achieve good segmentation results on noisy images, exhibiting weak noise resistance and failing to maintain good image segmentation performance under noise contamination. Based on the above analysis, this paper proposes a robust discriminative fuzzy C-means clustering algorithm for problems (1), (2), and (4). A new fuzzy optimization objective function is established, which fully considers the inter-class separability and global information of the sample data. In image segmentation applications, it has better segmentation results for medical brain MR (nuclear Magnetic Resonance) images and industrial remote sensing images. The image segmentation system based on robust discriminative fuzzy C-means clustering proposed in this invention has better segmentation performance for noisy images, stronger recognition and extraction capabilities for non-equilibrium information and edge information in images, and more accurate image segmentation results. The details are as follows:
[0071] Example 1
[0072] like Figure 1As shown, Embodiment 1 of the present invention provides an image segmentation method, the method comprising the following steps:
[0073] Step 101: Extract features from the sample images to construct a sample matrix of the sample images.
[0074] Step 101 specifically involves: acquiring sample images, where the number of sample images can be multiple; and based on the acquired sample image information, converting each image into a sample matrix X∈[x1,x2,…,x] composed of sample pixels. n ]∈R d ×N Where d is the number of sample features and N is the number of sample points; for example, the original test image is input as the sample image, and each sample image is cropped into a sub-image of a fixed size, and the m×n×p matrix is transformed into an (m×n)×p matrix. m×n is the size of the sub-image, and p is the number of sub-images.
[0075] Step 102: Use the robust discriminative fuzzy C-means clustering method to determine the membership matrix of the sample matrix.
[0076] Step 102 specifically involves:
[0077] S1, Input fuzzy index m, number of data clusters c, parameter α, maximum number of iterations t max The convergence threshold δ of the objective function;
[0078] S2, randomly initialize the cluster center matrix V0, according to Calculate the global cluster center v total For example, the method for initializing the cluster center matrix is to randomly initialize the cluster center matrix.
[0079] S3, according to Calculate the hyperparameter λ t ;
[0080] S4, according to Calculate the membership matrix U;
[0081] S5, according to Calculate the cluster center matrix V;
[0082] S6, according to Calculate the objective function value J;
[0083] Jump to S4 until the iteration condition is met, which is when the number of iterations reaches t. max Alternatively, the difference ΔJ between two consecutive iterations of the objective function value J is less than the set convergence threshold δ of the objective function. The final cluster center matrix is then used as the center of each data cluster in the sample data.
[0084] Step 103: Segment the sample image using the membership matrix. That is, divide the sample points according to the membership matrix U and output the image segmentation result.
[0085] The following explanation uses medical images as an example to illustrate steps 101-103.
[0086] Taking medical MR brain images as an example, the medical MR brain images are first used as sample images, and then the sample images are transformed into a sample matrix X∈[x1,x2,…,x] consisting of sample pixels (i.e., sample points). n ]∈R d×N Where d is the number of sample features and N is the number of sample points. Then, a grayscale peak image of the sample image is generated. The number of data clusters c is determined by observing the grayscale peak image. The fuzziness index m is set to 2, the preset parameter α is set, and the maximum number of iterations t is set. max The objective function convergence threshold δ is used. The cluster center matrix V0 is randomly initialized, and based on... Calculate the global cluster center v total .according to Calculate the hyperparameter λ t Then, according to Calculate the membership matrix U, and according to Calculate the cluster center matrix V.
[0087] In this embodiment, after obtaining new cluster centers and membership matrices in each iteration, the objective function value is calculated. Until the difference ΔJ between two consecutive calculated target values J is less than the set convergence threshold δ of the objective function (e.g., ΔJ≤10). -5 The iteration stops after the number of iterations reaches t. In another embodiment, the iteration can be stopped after the number of iterations reaches t. max (e.g., t) max The iteration stops when the membership matrix reaches 50. Finally, the membership matrix is used as the criterion to perform clustering on the sample matrix, dividing the sample image into c different regions, thus achieving image segmentation of the sample image.
[0088] In this implementation, the image segmentation performance of the algorithm is quantitatively evaluated using accuracy (ACC), mechanical equipment error (ME), mean squared error (MSE), and modified peak signal-to-noise ratio (PSNR). Among these, accuracy... N represents the total number of samples, N corThis represents the number of samples correctly clustered. Higher accuracy indicates better clustering performance of the algorithm. Misclassification rate. A i C represents the number of sample points of the i-th class in the segmentation result of the algorithm. i ME represents the number of sample points of class i in the standard segmented image, and c represents the number of data clusters, i.e., the number of classes in the image segmentation. A smaller ME value indicates that the algorithm's segmentation result is closer to the standard segmentation result, and the image segmentation effect is better; conversely, a larger value indicates a worse segmentation effect. Mean Squared Error MSE represents the mean squared error between the ideal segmentation result and the actual segmentation result, T ij S represents the pixel value at position (i,j) in the ideal segmented image. ij This represents the pixel value at position (i,j) in the segmented image obtained through clustering, where the image size is m·n. The corrected peak signal-to-noise ratio (PSNR) A higher PSNR value indicates better image segmentation performance and stronger noise resistance of the clustering algorithm; conversely, a lower PSNR value indicates poorer segmentation performance and noise resistance of the clustering algorithm.
[0089] The image segmentation performance of the scheme described in this invention is compared and analyzed in detail below using relevant experimental data:
[0090] To compare the performance and differences of different algorithms in image segmentation, this invention selects MR images from medical images and adds different types and levels of noise to the original images to test the segmentation effect of the algorithms on noisy images. To verify the effectiveness and superiority of the proposed method, the classic FCM algorithm and clustering algorithms proposed in recent years, such as PCM (Possibilistic C-means Clustering Algorithm) and REFCM (Relative Entropy Fuzzy C-means Clustering), are selected as comparison algorithms to compare and analyze the image segmentation performance of different algorithms.
[0091] The test images selected for this experiment were medical MR brain images and industrial remote sensing images. The MR brain images were from the MedPix dataset. The dataset contains 256×256 MR brain images. This invention selected slice images from layers 60 and 70, using the four labels of the original MR brain images as the final test objects. To test the algorithm's noise resistance, 0%, 1%, 3%, and 7% noise were added to each original MR brain image, respectively, and these were used as test images for MR brain image segmentation experiments. The specific parameter information of the MR brain test images selected in this invention is shown in Table 1.
[0092] Table 1. Parameter information for different MR brain images
[0093]
[0094] The industrial remote sensing images were obtained from the remote sensing image database released by Northwestern Polytechnical University in 2014. Two remote sensing images were selected, and different levels of salt-and-pepper noise and Gaussian noise were added to them respectively. The segmentation effect of different algorithms on the remote sensing images and their noise resistance performance against different types of noise were tested. The specific parameter information of the industrial remote sensing test images selected in this invention is shown in Table 2.
[0095] Table 2 Parameter information of different remote sensing images
[0096]
[0097]
[0098] Image segmentation results of the 60th layer brain image, such as... Figure 2 As shown.
[0099] The standard segmentation result of an MR brain image contains four categories, with gray values of 0, 120, 150, and 255, respectively. For example... Figure 2 As shown in (a)-(c), these represent the original MR image of the 60th layer, the MR image with four labels retained, and the ideal segmentation result, respectively.
[0100] The MR brain image at layer 60 was selected. Four labels were extracted from the original image, and noise was added at 1%, 3%, 5%, and 7% respectively to create test images. Image segmentation results from different algorithms are shown below. Figure 3 As shown, it can be seen that the FCM algorithm and REFCM algorithm cannot identify the detailed information of brain images, and the segmentation results obtained are very inaccurate. The PCM algorithm misclassifies it into one category, resulting in even more incorrect segmentation results. However, the algorithm of the present invention can not only accurately identify the overall information of brain images, but also has a more accurate ability to identify the detailed information of images, resulting in better segmentation results.
[0101] The results of the four indicators are shown in Table 3. It can be seen that as the noise increases, the image segmentation accuracy of the algorithms decreases. However, the algorithm of this invention maintains a high accuracy, with the lowest misclassification rate, low standard error, and the highest peak signal-to-noise ratio. Therefore, compared with other algorithms, the image segmentation system based on robust discriminative fuzzy C-means clustering of this invention has better segmentation performance for noisy images.
[0102] Table 3. Segmentation metrics (ACC, ME, MSE, and PSNR) for the 60th layer MR image.
[0103]
[0104]
[0105] Similarly, the experiment was conducted using a brain image from layer 70. The original MR image from layer 70, the MR image retaining four labels, and the ideal segmentation result are shown below. Figure 4 As shown in (a), (b), and (c) above. The obtained image segmentation results and metrics are as follows. Figure 5 As shown in Table 4, where Ours represents the method of the present invention, the experimental results once again verify that the algorithm of the present invention has better segmentation performance. Compared with other algorithms, the algorithm proposed in this invention can identify and extract complete information of medical images, and has a better effect on the processing of detailed information. At the same time, for different levels of noise, the obtained segmentation results and evaluation indicators are better than other algorithms. It can be seen that the algorithm of the present invention has better noise resistance performance.
[0106] Table 4. Segmentation metrics (ACC, ME, MSE, and PSNR) for the 70th layer MR image.
[0107]
[0108]
[0109] Based on the above experiments, it is evident that the fuzzy C-means algorithm uses the traditional Euclidean distance criterion as the discrimination basis, failing to reflect the distribution characteristics of inter-class separation in the sample data. This invention introduces the inter-class distance between cluster centers, simultaneously considering both intra-class compactness and inter-class separability of the sample data, resulting in better identification and extraction capabilities of the original data structure. Furthermore, by introducing the deviation between the sample data and the overall cluster centers, global information of the data structure is preserved, reducing the impact of noise and outliers on the overall partitioning structure, leading to better segmentation results for noisy images.
[0110] Next, the present invention conducted experiments on remote sensing images in industrial images. Different remote sensing images were selected, and different sizes of salt-and-pepper noise and Gaussian noise were added to test the segmentation effect of different algorithms on remote sensing images and their noise resistance performance against different types of noise.
[0111] First, this invention selects the remote sensing industrial image airplane_526 as the test image. Salt-and-pepper noise of 0.05, 0.1, and 0.15 is added to the original image respectively, and image segmentation experiments are performed. The segmentation results are as follows: Figure 6As shown in Table 5, the obtained ACC, ME, MSE, and PSNR indicators are as follows. It can be seen that when the original image has no added noise, the accuracy of each algorithm in the obtained image segmentation results is not significantly different; FCM, REFCM, and BEFCM have the same accuracy. Meanwhile, REFCM and BEFCM have the highest peak signal-to-noise ratio (PSNR), both at 45.1655. However, as the salt-and-pepper noise level increases, compared to other algorithms, the BEFCM algorithm of this invention is least affected by noise and has the best denoising effect. Quantitative comparisons yield the same conclusion: as the salt-and-pepper noise increases, the BEFCM algorithm of this invention can still maintain a high accuracy and a high PSNR in the image segmentation experiment, and the other two indicators are also superior to other comparative algorithms. Therefore, the algorithm of this invention has a better segmentation effect on noisy images. Even when the image is heavily contaminated by noise, it can still correctly identify and extract the main information of the image, remove noise, and retain the main information of the image.
[0112] Table 5 Results of the first index for remote sensing image segmentation (ACC, ME, MSE, and PSNR)
[0113]
[0114] Next, to test the noise resistance of different algorithms to different types of noise, this invention selected the remote sensing industrial image airport_380 as the test image, added Gaussian noise of different magnitudes, and conducted image segmentation experiments. The segmentation results are as follows: Figure 7 As shown in Table 6, the results of the four indicators are as follows.
[0115] Table 6. Results of the second metric for remote sensing image segmentation (ACC, ME, MSE, and PSNR)
[0116]
[0117] First, this paper conducts image segmentation experiments based on the original image. Based on the segmentation results, it is clearly evident that the algorithm of this invention achieves a clearer segmentation effect compared to other algorithms. Furthermore, according to the index results in Table 6, the algorithm of this invention also demonstrates higher accuracy and peak signal-to-noise ratio, with all four indicators being optimal. Next, Gaussian noise of 0.05 and 0.1 was added to the original image as test images to verify the algorithm's robustness to Gaussian noise. Figure 7 It can be intuitively seen that as the intensity of Gaussian noise increases, the segmentation results obtained by the algorithm of this invention are clearer and have stronger denoising capabilities compared to other algorithms. Table 6 also quantitatively compares and shows that although the segmentation accuracy of all algorithms decreases under increased noise pollution, the BEFCM algorithm of this invention still maintains the best performance in all four indicators.
[0118] Therefore, it is evident that, regardless of the type of noise, the algorithm of this invention maintains good segmentation performance with increasing noise levels. Compared to other algorithms, it is least affected by noise, yields the clearest segmented image, and achieves the best segmentation effect on noisy images. Whether dealing with salt-and-pepper noise or Gaussian noise, the algorithm of this invention can identify and extract complete image information under the influence of noise, maintaining high accuracy and peak signal-to-noise ratio, resulting in optimal segmentation performance.
[0119] Example 2
[0120] Embodiment 2 of the present invention provides an image segmentation system, the system comprising:
[0121] The feature extraction module is used to extract features from the sample image and construct a sample matrix of the sample image;
[0122] The membership matrix determination module is used to determine the membership matrix of the sample matrix using a robust discriminative fuzzy C-means clustering method.
[0123] The membership matrix determination module specifically includes: an initialization submodule for initializing the cluster centers of each data cluster; a membership calculation submodule for calculating the membership degree of each sample point in the sample matrix relative to each data cluster based on the cluster centers of each data cluster, and constructing a membership matrix; a judgment submodule for judging whether the iteration termination condition is met and obtaining a judgment result; a cluster center update submodule for updating the cluster centers of each data cluster based on the membership matrix if the judgment result indicates no, and returning to the step "calculate the membership degree of each sample point in the sample matrix relative to each data cluster based on the cluster centers of each data cluster, and construct a membership matrix"; and a membership matrix output submodule for outputting the membership matrix if the judgment result indicates yes.
[0124] The membership calculation submodule specifically includes:
[0125] The membership calculation unit is used to calculate the membership degree based on the cluster centers of each data cluster using the formula. Calculate the membership degree of each sample point in the sample matrix relative to each data cluster;
[0126] Among them, u ij v represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, c represents the number of data clusters, and v i Let x represent the cluster center of the i-th data cluster. j Let v represent the feature of the j-th sample point. k Let m represent the cluster center of the k-th data cluster, and m represent the fuzziness index.
[0127] The cluster center update submodule specifically includes: a hyperparameter calculation unit, used to calculate the hyperparameters based on the cluster centers of each data cluster using a formula. Calculate the hyperparameters; where λ t This represents the hyperparameter, where N represents the number of sample points, and x represents the hyperparameter. i Let v represent the feature of the j-th sample point, c represent the number of data clusters, and v k v represents the cluster center of the k-th data cluster. total Indicates the global cluster center. The cluster center update unit is used to update the cluster center according to the hyperparameters and the membership matrix using a formula. Update the cluster center for each data cluster; where v i ' represents the updated cluster center of the i-th data cluster, u ij denoted by , m represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, α represents the fuzziness index, and α represents the preset parameter.
[0128] An image segmentation module is used to segment the sample image using the membership matrix.
[0129] The beneficial effects of this invention are as follows: This invention addresses the issue that the distance metric in fuzzy clustering algorithms fails to reflect the distribution characteristics of inter-class separation in sample data. By incorporating the inter-class distance between cluster centers, a robust discriminative fuzzy C-means clustering algorithm is proposed. This algorithm considers both intra-cluster compactness and inter-cluster separability while preserving the global information of the clustering algorithm. This improves the algorithm's ability to extract the original structure of data clusters, and provides better recognition and clustering results for imbalanced data structures, thus enhancing the algorithm's effectiveness and robustness. Extensive experiments were conducted on medical brain MR images and industrial remote sensing images for image segmentation applications. The results show that the image segmentation system based on robust discriminative fuzzy C-means clustering of this invention has better noise resistance, stronger recognition and extraction capabilities for imbalanced and edge information in images, and more accurate image segmentation results.
[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0131] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An image segmentation method, characterized in that, The method includes the following steps: Feature extraction is performed on the sample images to construct a sample matrix of the sample images; The membership matrix of the sample matrix is determined by using a robust discriminative fuzzy C-means clustering method. The sample image is segmented using the membership matrix; The step of using robust discriminative fuzzy C-means clustering to determine the membership matrix of the sample matrix specifically includes: Initialize the cluster centers for each data cluster; Based on the cluster center of each data cluster, calculate the membership degree of each sample point in the sample matrix relative to each data cluster, and construct the membership degree matrix; Determine whether the iteration termination condition is met and obtain the result. If the judgment result indicates no, update the cluster center of each data cluster according to the membership matrix, and return to the step "Calculate the membership degree of each sample point in the sample matrix relative to each data cluster according to the cluster center of each data cluster, and construct the membership matrix"; If the judgment result indicates yes, then output the membership matrix; The step of calculating the membership degree of each sample point in the sample matrix relative to each data cluster based on the cluster center of each data cluster specifically includes: Based on the cluster centers of each data cluster, the formula is used. Calculate the membership degree of each sample point in the sample matrix relative to each data cluster; in, This represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster. Indicates the number of data clusters. This represents the cluster center of the i-th data cluster. This represents the feature of the j-th sample point. Let m represent the cluster center of the k-th data cluster, and m represent the fuzziness index. The step of updating the cluster center of each data cluster based on the membership matrix specifically includes: Based on the cluster centers of each data cluster, using the formula Calculate hyperparameters; in, Indicates hyperparameters, Indicates the number of sample points. This represents the feature of the j-th sample point. Indicates the number of data clusters. This represents the cluster center of the i-th data cluster. Indicates the global cluster center. ; Based on the hyperparameters and the membership matrix, the formula is used. Update the cluster center for each data cluster; in, This represents the updated cluster center of the i-th data cluster. Let represent the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, and m represent the fuzzy index. This indicates the preset parameters.
2. The image segmentation method according to claim 1, characterized in that, The iteration ends when the number of iterations reaches the iteration threshold.
3. The image segmentation method according to claim 1, characterized in that, The iteration termination condition is that the difference between the objective function values obtained from two adjacent iterations is less than the objective function convergence threshold. The formula used to calculate the value of the objective function is: ; in, The objective function value, Indicates the number of sample points. Indicates the number of data clusters. This represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster. This represents the feature of the j-th sample point. This represents the cluster center of the i-th data cluster. Indicates the global cluster center. , m represents the fuzziness index, This indicates the preset parameters.
4. An image segmentation system, characterized in that, The system includes: The feature extraction module is used to extract features from the sample image and construct a sample matrix of the sample image; The membership matrix determination module is used to determine the membership matrix of the sample matrix using a robust discriminative fuzzy C-means clustering method. An image segmentation module is used to segment the sample image using the membership matrix; The membership matrix determination module specifically includes: The initialization submodule is used to initialize the cluster centers for each data cluster; The membership calculation submodule is used to calculate the membership degree of each sample point in the sample matrix relative to each data cluster based on the cluster center of each data cluster, and to construct the membership matrix. The judgment submodule is used to determine whether the iteration termination condition is met and obtain the judgment result; The cluster center update submodule is used to update the cluster center of each data cluster according to the membership matrix if the judgment result indicates no, and return to the step "Calculate the membership degree of each sample point in the sample matrix relative to each data cluster according to the cluster center of each data cluster, and construct the membership matrix". The membership matrix output submodule is used to output the membership matrix if the judgment result indicates yes. The membership calculation submodule specifically includes: The membership calculation unit is used to calculate the membership degree based on the cluster centers of each data cluster using the formula. Calculate the membership degree of each sample point in the sample matrix relative to each data cluster; in, This represents the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster. Indicates the number of data clusters. This represents the cluster center of the i-th data cluster. This represents the feature of the j-th sample point. Let m represent the cluster center of the k-th data cluster, and m represent the fuzziness index. The cluster center update submodule specifically includes: The hyperparameter calculation unit is used to calculate the hyperparameters based on the cluster centers of each data cluster using the formula... Calculate hyperparameters; in, Indicates hyperparameters, Indicates the number of sample points. This represents the feature of the j-th sample point. Indicates the number of data clusters. This represents the cluster center of the k-th data cluster. Indicates the global cluster center. ; The cluster center update unit is used to update the cluster center according to the hyperparameters and the membership matrix using the formula... Update the cluster center for each data cluster; in, This represents the updated cluster center of the i-th data cluster. Let represent the membership degree of the j-th sample point in the sample matrix relative to the i-th data cluster, and m represent the fuzzy index. This indicates the preset parameters.