Commit d6f8a75e authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #5230 from PhilLab:patch-4

parents a15707bc 14c0bfce
......@@ -221,9 +221,9 @@ double cv::kmeans( InputArray _data, int K,
{
const int SPP_TRIALS = 3;
Mat data0 = _data.getMat();
bool isrow = data0.rows == 1 && data0.channels() > 1;
int N = !isrow ? data0.rows : data0.cols;
int dims = (!isrow ? data0.cols : 1)*data0.channels();
bool isrow = data0.rows == 1;
int N = isrow ? data0.cols : data0.rows;
int dims = (isrow ? 1 : data0.cols)*data0.channels();
int type = data0.depth();
attempts = std::max(attempts, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment