I want to know whether there are some common best practices for unsupervised detection of clusters / colors in images, in order to avoid spurious artifacts. To understand what I mean by 'spurious', here's an example.
Consider the following image:
A "reasonable" human would infer 5 statistically significant colors in this image (4+background).
The method detects 8 colors instead of the expected 5. Upon inspection of the clusters, one finds that k-means finds 2 different backgrounds:
I suspect that this has to do with a slight color variation in the background which nevertheless gains statistical significance due to the fact that the image is mostly background.
Secondly, another 2 of the detected clusters have to do with edge artifacts. Here's one of them:
I hypothesize that this occurs due to aliasing, but I am not certain.
After manually disregarding the spurious clusters, one finally gets the expected answer, which is 5 clusters. However, this manual pruning may not be feasible in images with a larger number clusters.
My question therefore is: Are there common or "standard" best practices to avoid the above (or other commonly encountered) artifacts in automatic image cluster / color detection?