I am doing Texture Segmentation in Images Using Gabor Filters. I have generated Feature images and now i want to cluster them using square clustering or K-means. Since i am working in MATLAB, I am using the matlab defined functions. The official documentation for K-means clustering states
idx = kmeans(X,k)
where,X= n by p data matrix and k is the number of clusters. I want to know how to use this function for my dataset since i have n feature images which means i have n features for every pixel of the original image. So my question is how do I use my dataset in the above function. Also, if no function exists please explain how can I implement it on my own.
I am referring this research paper( page 6 ) Gabor filters for texture Segmentation