hello, i have read your blog about k-means and i know that the steps of the algorithme are this :
but i can't figure out what this for loop does in your code :
for (unsigned int i = 0 ; i < singleLineSize ; i++ ){
data.at<float>(i, 0) = colors(labels[i], 0);
data.at<float>(i, 1) = colors(labels[i], 1);
data.at<float>(i, 2) = colors(labels[i], 2);
}
hello, i have read your blog about k-means and i know that the steps of the algorithme are this : but i can't figure out what this for loop does in your code :
can you explain it to me please ?