Fuzzy C-means clustering method to segment an image into clusters?

2 次查看(过去 30 天)
I would like to segment an image into several clusters by using Fuzzy C-means clustering method. How can i done this? Where can i get the exact code?

回答(1 个)

Image Analyst
Image Analyst 2017-4-3
编辑:Image Analyst 2017-4-3
Perhaps it's in the Fuzzy Toolbox - I don't know I don't have that toolbox. Otherwise you can use the Statistics and Machine Learning Toolbox for something similar. From the help (see links on the right of this page):
Soft clustering using a GMM (Gaussian Mixture Model) is similar to fuzzy k-means clustering, which also assigns each point to each cluster with a membership score. The fuzzy k-means algorithm assumes that clusters are roughly spherical in shape, and all of roughly equal size. This is comparable to a Gaussian mixture distribution with a single covariance matrix that is shared across all components, and is a multiple of the identity matrix. In contrast, gmdistribution allows you to specify different covariance structures. The default is to estimate a separate, unconstrained covariance matrix for each component. A more restricted option, closer to k-means, is to estimate a shared, diagonal covariance matrix.
Fit a GMM to the data, but specify that the components share the same, diagonal covariance matrix. This specification is similar to implementing fuzzy k-means clustering, but provides more flexibility by allowing unequal variances for different variables.
gmSharedDiag = fitgmdist(X,2,'CovType','Diagonal','SharedCovariance',true');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by