Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There is a terrible mistake. A simple conversion of a uchar to float is NOT the right solution. If you look at the details of KMeans, one must minimize the sum of distances :

  • for a real-valued vector, this corresponds to a mean

  • for a binary vector stored in uchar, this does NOT correspond to a mean

Indeed for each coordinate inside the uchar one must make a vote between the ones and the zeros to get a medoid.