I need to classify some domain specific images by analysing their color distribution. I have annotated data; this last classification step is supervised.

After some preprocessing and masking and other unrelated tasks, I extract the dominant colors in the image's ROI, by clustering the pixels values with K-means.

I end up with K clusters, their size (i.e. the number of pixels that fall into that cluster) and their centroid (A color is a 3d vector in the Lab* color space, this shouldn't really matter, it could be RGB).

Based on the total number of pixels (which varies from image to image) I convert the absolute cluster size into percentages, and the clusters are sorted by size.

For each image, I end up with features that look like this (for example, with K=3)

image1.png (class A)

Cluster number Cluster size Cluster center L* a* b*
0 81.3% 19.79 5.58 -6.14
1 14.7% 35.63 8.38 5.50
2 5% 19.84 5.73 -3.35

I don't know how to treat this data and what kind of model to use. This is because both the color center and the cluster size are a continuous value, and there are multiple clusters.

I have looked into Computing Image Similarity based on Color Distribution but I have continuous colors and not categorical colors.

I have looked into Classification based on a Clustering Result but I have K clusters per image and not just 1.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.