Merge pull request #6395 from Tauranis:master

This commit is contained in:
Maksim Shabunin 2016-04-13 07:53:33 +00:00
commit 49b4af1e5c

View File

@ -432,8 +432,15 @@ public:
double* data = sums.ptr<double>(i); double* data = sums.ptr<double>(i);
for( j = 0; j < cols; j++ ) for( j = 0; j < cols; j++ )
{ {
double t = scale2*(1. - data[j])/(1. + data[j]); if(!cvIsInf(data[j]))
data[j] = t; {
double t = scale2*(1. - data[j])/(1. + data[j]);
data[j] = t;
}
else
{
data[j] = -scale2;
}
} }
} }
break; break;