Lines Matching defs:clusters
165 // image with 4 clusters would be sampled like this:
228 std::vector<KMeanCluster> clusters;
229 clusters.resize(kNumberOfClusters, KMeanCluster());
232 std::vector<KMeanCluster>::iterator cluster = clusters.begin();
233 while (cluster != clusters.end()) {
250 // Loop through the previous clusters and check to see if we have seen
254 cluster_check = clusters.begin();
272 cluster = clusters.erase(cluster);
281 // If all pixels in the image are transparent we will have no clusters.
282 if (clusters.empty())
303 std::vector<KMeanCluster>::iterator closest_cluster = clusters.begin();
306 for (std::vector<KMeanCluster>::iterator cluster = clusters.begin();
307 cluster != clusters.end(); ++cluster) {
321 for (std::vector<KMeanCluster>::iterator cluster = clusters.begin();
322 cluster != clusters.end(); ++cluster) {
329 // Sort the clusters by population so we can tell what the most popular
331 std::sort(clusters.begin(), clusters.end(),
334 // Loop through the clusters to figure out which cluster has an appropriate
336 for (std::vector<KMeanCluster>::iterator cluster = clusters.begin();
337 cluster != clusters.end(); ++cluster) {
349 } else if (cluster == clusters.begin()) {