1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2018-12-03 18:38:27 +03:00
19 changed files with 301 additions and 158 deletions
+1 -1
View File
@@ -175,7 +175,6 @@ void GMM::addSample( int ci, const Vec3d color )
void GMM::endLearning()
{
CV_Assert(totalSampleCount > 0);
for( int ci = 0; ci < componentsCount; ci++ )
{
int n = sampleCounts[ci];
@@ -183,6 +182,7 @@ void GMM::endLearning()
coefs[ci] = 0;
else
{
CV_Assert(totalSampleCount > 0);
double inv_n = 1.0 / n;
coefs[ci] = (double)n/totalSampleCount;