Fuzzy C Means algorithm (FCM) image segmentation MATLAB program C C Program Develop

Fuzzy C­Means algorithm (FCM) image
segmentation MATLAB program
Tag: the matlab, OUTput, image, c the

  Category: C   Author: linxiyyz   Date: 2013­11­24

Fuzzy C­Means algorithm (FCM) image segmentation MATLAB program
The subject used Fuzzy C­Means (FCM) algorithm image segmentation, write a MATLAB program to friends in need,
for reference only. If wrong with that, and hope to be enlighten.

% File name: FCM.m 
% Function: Fuzzy C­Means (FCM) clustering algorithm for image segmentation 
%: Rain curtain 
% Time: 11/17/2011
Image%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FCM algorithm for segmentation 
function clusterResult = FCM (imagePath, C, V, M, iter, epsm) 
Fuzzy C­Means (FCM) clustering algorithm for image segmentation 
% ClusterResult = FCM (imagePath, C, V, M, iter, epsm) 
% Example: clusterResult = FCM ('E: \ Image \ lena.bmp') 
% ClusterResult = FCM ('E: \ Image \ lena.bmp', 3, [0 127 255]) 
% Input: 

% ImagePath: image path 
% C: the number of categories, the default value of 2 
% V: initialize the cluster center, the default value [0255] 
% M: weighted index, the default value of 2 
% Iter: number of iterations, the default value is 100 
For% epsm: iteration stops threshold, the default value is 1.0E­2 
% Output: 
The% clusterResult: clustering results 
% Note: 
The value of% C and V initialization of cluster centers
% Set the default value 
if nargin