FUZZYC_CVIP
fuzzyc_cvip() - This function performs fuzzy c-means clustering based image segmentation.
Contents
SYNTAX
OutImage = fuzzyc_cvip(inImage, N, parameters)
Input Parameters include :
- inImage - 1-band input image of MxN size or 3-band input image of MxNx3 size.The input image can be of uint8 or double class.If double class, the function assumes the data range of image is from 0 to 1.
- N - Limit to stop the threshold update. Usually, it is small value that ranges from 0 to 20.0. limit = 10.0 (default)
- parameters - Parameters for objective function computation and termination condition of FCM. A row or column vector containing m, maximum iteration, and minimum error. parameters(1): m, fuzzy partition matrix exponent greater than 1 2.0 (default) parameters(2): max_iter, maximum iteration 20 (default) parameters(3): error_min, minimum error to stop maximum iteration 1e-3 (default)
Output Parameter include :
- outImage - Segmented image having same size and same class of input image.
DESCRIPTION
The function performs the image segmenation using fuzzy c-means method. Fuzzy c-means is a clustering technique that partitions the image data into a number of clusters such that each datapoint may have different degree of association with each cluster. A datapoint belongs to a cluster that has the highest degree.For each cluster, the center is computed,and the original datapoints are mapped to these centers vectors.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
% Read Image I = imread('raphael.jpg'); %original image % Call function O1 = fuzzyc_cvip(I); % default N and FCM parameters N = 4; % Number of clusters O2 = fuzzyc_cvip(I,N); % user specified N and default fcm parameters O3 = fuzzyc_cvip(I,N,[2.5 15 0.01]); % user specified N and FCM parameters % Display Input Image figure;imshow(I);title('Input Image 1'); % Display Output Image figure;imshow(O1,[]);title('Output Image - Default N and FCM parameters'); figure;imshow(O2,[]);title('Output Image - User Specified N and default FCM'); figure;imshow(O3,[]);title('Output Image - User Specified N and FCM');
CREDITS
Author: Norsang Lama, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website