# Differences

This shows you the differences between two versions of the page.

parcon18:project3 [2018/03/05 07:33] romain created |
parcon18:project3 [2018/03/14 17:13] (current) guillaume [Use cases] |
||
---|---|---|---|

Line 179: | Line 179: | ||

* `Uniform Choice` is the simplest strategy. It chooses `n` colors uniformly in the entire color space, regardless of the colors used in the image. If the image has a dominant color, the means created by this strategy will likely be very far away from the clusters formed by this dominant color. You can try setting the `Uniform Choice` strategy with 1, 10 and 30 steps. You will notice the initial choice is quite bad, but the quality improves as the k-means algorithm is applied in more steps. | * `Uniform Choice` is the simplest strategy. It chooses `n` colors uniformly in the entire color space, regardless of the colors used in the image. If the image has a dominant color, the means created by this strategy will likely be very far away from the clusters formed by this dominant color. You can try setting the `Uniform Choice` strategy with 1, 10 and 30 steps. You will notice the initial choice is quite bad, but the quality improves as the k-means algorithm is applied in more steps. | ||

- | * `Random Sampling` is another simple strategy, but with better results. For the initial means, it randomly samples `n` colors from the image. This yields good results if the image has few dominant colors, but it cannot handle subtle nuances in the image. Again, if you try this strategy with 1, 10 and 30 k-means iteration | + | * `Random Sampling` is another simple strategy, but with better results. For the initial means, it randomly samples `n` colors from the image. This yields good results if the image has few dominant colors, but it cannot handle subtle nuances in the image. Again, if you try this strategy with 1, 10 and 30 k-means iteration steps, you will notice improvements as the k-means algorithm is ran more. |

- | steps, you will notice improvements as the k-means algorithm is ran more. | + | |

* `Uniform Random` is the most complex strategy to pick means, but it also produces the best results. It works by uniformly splitting the color space in sub-spaces. It then counts the number of pixels that have colors belonging to that sub-space. Based on this number, it chooses a proportional number of means in the sub-space, by randomly sampling from the pixels in that sub-space. Therefore, if your image has dominant colors, this strategy will drop a proportional number of means for each dominant color, thus allowing the k-means algorithm to capture fine nuances. | * `Uniform Random` is the most complex strategy to pick means, but it also produces the best results. It works by uniformly splitting the color space in sub-spaces. It then counts the number of pixels that have colors belonging to that sub-space. Based on this number, it chooses a proportional number of means in the sub-space, by randomly sampling from the pixels in that sub-space. Therefore, if your image has dominant colors, this strategy will drop a proportional number of means for each dominant color, thus allowing the k-means algorithm to capture fine nuances. | ||