Fixed a valgrind 'Conditional jump or move depends on uninitialised value(s)' on...
authorNghia Ho <nghiaho12@yahoo.com>
Mon, 6 Jan 2014 09:19:07 +0000 (20:19 +1100)
committerNghia Ho <nghiaho12@yahoo.com>
Mon, 6 Jan 2014 09:19:07 +0000 (20:19 +1100)
samples/cpp/kmeans.cpp

index 97de6a0..b742112 100644 (file)
@@ -33,7 +33,7 @@ int main( int /*argc*/, char** /*argv*/ )
     {
         int k, clusterCount = rng.uniform(2, MAX_CLUSTERS+1);
         int i, sampleCount = rng.uniform(1, 1001);
-        Mat points(sampleCount, 1, CV_32FC2), labels;
+        Mat points(sampleCount, 2, CV_32F), labels;
 
         clusterCount = MIN(clusterCount, sampleCount);
         Mat centers(clusterCount, 1, points.type());