ImLab Scilab Function
Last update :
imfuzzykmeansclassify_2 - Fuzzy k-means method classification phase: third step of image segmentation using fuzzy k-means clustering method.
Calling Sequence
-
[classes_image] = imfuzzykmeansclassify(prototype,mask,weights,fuzzyness,threshold1,threshold2,im1[,im2[,im3[,im4[,im5[,im6[,im7[,im8[,im9[,im10]]]]]]]]])
Parameters
-
prototype
: representative values of the classes. It can be obtained with 'imfuzzykmeanstrain' ImLab function or user defined.
-
mask
: matrix returned by an ImLab function or user-defined matrix allowing to define which pixels are considered in the segmentation (pixels with non null value). This mask must be the same as the one used in 'imlearningdata' ImLab function (image segmentation first step).
-
weights
: vector containing the weights for each image, in other words the relative importance of each image in clustering. These weights must be the same as the ones used in 'imlearningdata' ImLab function.
-
fuzzyness
: fuzzyness degree during the training phase. It must be bigger than 1. Default value to use is 2.
-
threshold1
: threshold corresponding to the membership degree from which the object is classified in the class with the highest membership degree.
-
threshold2
: threshold allowing to determinate if an object is classified in the rejection class : this class contains uncertain objects. Let u1 and u2 be the highest membership degrees (u1 > u2) for one object. If (u1 - u2) > threshold2 then the considered object is classified in the rejection class.
-
imx
: (hyper)matrix which contains interesting data for clustering. These images must be the same as the ones used in 'imlearningdata' ImLab function. All the images parameters must have the same dimension and the same size.
-
classes_image
: image which contains the class number of each pixel. This image has the same dimension and the same size than the image arguments. This is the result of the segmentation.
Description
Thanks to the prototype, this function classifies all the pixels of images that are defined by the mask. The class membership degrees are calculated. Let u1 and u2 be the highest membership degrees (u1 > u2) for one pixel. The value of the pixel in the classes image can be the number of the class with the highest membership degree (if u1 >= threshold1), or the number k of the rejection class (if (u1 - u2) > threshold2). Note that class numbers begin at 0.Note that the distance used is the euclidean one.