Color > Color Cluster

Assigns each pixel from the color Opened Image to one of the specified classes using k-means clustering [1-4]. This can be a powerful and objective way of segmenting color images. Works well for color images with 2 or more feature types of interest, where different colors define the different feature types. This function results in a grayscale image where each class is colored according to the class which it belongs.

To split the resulting image into different Layers, add a Set Memory image step afterwards, then iteratively call that restore image and use “Range Threshold” steps to select the different classes as B/W images.

1. Classes

Number of classes to cluster each pixel into. If you are trying to segment one set of features from the background, you should enter 2 classes.

2. Flatten Background

Controls the window size used for background flattening prior to clustering. Use 0 for no background flattening.

3. Speed

Parameter that controls the resolution of the cluster. Lower speed results in higher resolution clustering, but takes longer. Higher speed results in faster execution but lower resolution clustering.


Example Recipe following a Color Cluster step which selects each class and sets it as a Layer.


[1] Arthur, David, and Sergi Vassilvitskii. “K-means++: The Advantages of Careful Seeding.” SODA ‘07: Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms. 2007, pp. 1027–1035.

[2] Lloyd, Stuart P. “Least Squares Quantization in PCM.” IEEE Transactions on Information Theory. Vol. 28, 1982, pp. 129–137.

[3] Seber, G. A. F. Multivariate Observations. Hoboken, NJ: John Wiley & Sons, Inc., 1984.

[4] Spath, H. Cluster Dissection and Analysis: Theory, FORTRAN Programs, Examples. Translated by J. Goldschmidt. New York: Halsted Press, 1985.


  • Color Cluster is always applied to the original color image
  • Works best when the features of interest are further away from each other on the color spectrum


Need more help with this?
Chat with an expert now ››

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.