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

fixed possible overflow in getThreshVal_Otsu_8u (ticket #602)

This commit is contained in:
Vadim Pisarevsky
2010-11-04 12:38:27 +00:00
parent a2676b2777
commit b5f366fb70
+1 -1
View File
@@ -444,7 +444,7 @@ getThreshVal_Otsu_8u( const Mat& _src )
double mu = 0, scale = 1./(size.width*size.height);
for( i = 0; i < N; i++ )
mu += i*h[i];
mu += i*(double)h[i];
mu *= scale;
double mu1 = 0, q1 = 0;