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)
commit601b7d1dd3a3ec9e8af5df461d43632d98ed3a7a
treec32307790a0bef9e6dea55e9678aee1fa135953d
parent5327482b466ab03fd8241a26165a7170cd6fb76f
Fixed a valgrind 'Conditional jump or move depends on uninitialised value(s)' on cv::kmeans(...). The original code used points(sampleCount, 1, CV_32FC2), which confused generateCentersPP into thinking it is a 1 dimensional center, instead of 2. As a result it would set only the x variable and leave y unitialised.
samples/cpp/kmeans.cpp