This operates on a 2-D matrix of ones and zeros. If you do an "imagesc(data)" and "colormap gray" on your matrix, you will see that the zeros will be black and the ones will be white. This will find the k-means of the clusters of ones (white) data in terms of distance in pixels.
how can i give the 1 by 173 matrix as input to the k means clustering algorithm. is this code correct??? but am getting error as
Index exceeds matrix dimension.
[idx,ctrs] = kmeans(a,3);
Hi Guanglei,the code is so nice on biological images.and fair on remote sensing images.have tried to test both methods on remote sensing images but results show otsu is better.
though i have used tested your code on several remote sensing images,I have failed to understand how the code operates.all is that your code segments the image into three classes using FCM clustering thresholding based on 3-class Fuzzy clustering,where by the threshold is obtained by averaging the maximum
in the class with the smallest center and the minimum in the class with the middle center. am i right or wrong about your method?.hope to hear from you.chao