What does it mean when an array is used as another array's index? This is the code I saw, and I don't understand
res = center[label.flatten()]
center and label come from the opencv method kmeans.
ret, label, center = cv2.kmeans(flat, K, None, criteria, 10, cv2.KMEANS_RANDOM_CENTERS)
center = cv2.cvtColor(np.uint8([center]), cv2.COLOR_LAB2BGR)
center = center[0]