fix cv::kmeans function

reshape input matrix, since the function works with data
as with [N x dims] matrix