Hi Aniati, Sorry for this late response. I took few days off for vacation. If the true number of textures is 4, you can specify cmin=2, and cmax=6. The clustering program will generate segmentation results with 2, 3, 4, 5, 6 clusters, respectively. Different values for cmin and cmax only affect the segmentation quality slightly. You may want to try turn on and off the gw_flag (1:on, 0:off) to see the difference. The results in our paper were generated using my own version of the k-means clustering algorithm. The clustering algorithm used in "b.seg" written by somebody else in the PRIP lab seems to be more sophistcated. Hope this helps. Happy New Year! Mao