We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a86e036 + 5376863 commit 7ce56b3Copy full SHA for 7ce56b3
modules/flann/include/opencv2/flann/kmeans_index.h
@@ -773,7 +773,7 @@ class KMeansIndex : public NNIndex<Distance>
773
memoryCounter_ += int(veclen_*sizeof(CentersType));
774
unsigned int* mean_accumulator = new unsigned int[accumulator_veclen];
775
776
- memset(mean_accumulator, 0, accumulator_veclen);
+ memset(mean_accumulator, 0, sizeof(unsigned int)*accumulator_veclen);
777
778
for (unsigned int i=0; i<indices_length; ++i) {
779
variance += static_cast<unsigned long long>( ensureSquareDistance<Distance>(
0 commit comments