Contains knn classification and k-means clustering algorithms. Provide classes to work with image color data.
These are some screenshots generated by the samples. Image taken by @jcbritobr and used with permission (thanks Julio!).
For this example, we use the following RGB samples for each class:
| Plant | Soil | Sky |
|---|---|---|
| 90, 130, 63 | 244, 174, 129 | 255, 254, 255 |
| 150, 193, 113 | 224, 151, 97 | 127, 169, 210 |
| 41, 47, 39 | 230, 212, 191 | 59, 130, 195 |
| 168, 166, 107 | 196, 210, 231 |
Using k=3 generate the following output:
This sample use k-means to simplify the image into just 20 colors. Closest point to centroid is used as the color of each class:
- 18/mai/2022 - Improved DataSource and DataIterator concepts, allowing huge datasets to be used.
- 13/mai/2022 - Separated measurer into 2 interfaces. Replaced Selectors class by SelectorBuilder.
- 12/mai/2022 - Added centroid selection strategies.
- 11/mai/2022 - Full rewrite of the project.
- 15/dec/2013 - Translated to english and inserted in GitHub


