mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
fix meanStdDev overflow for large images
This commit is contained in:
committed by
Alexander Smorkalov
parent
43cebe52eb
commit
987ba6504b
@@ -592,7 +592,8 @@ void meanStdDev(InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray
|
||||
uchar* ptrs[2] = {};
|
||||
NAryMatIterator it(arrays, ptrs);
|
||||
int total = (int)it.size, blockSize = total, intSumBlockSize = 0;
|
||||
int j, count = 0, nz0 = 0;
|
||||
int j;
|
||||
int64_t count = 0, nz0 = 0;
|
||||
AutoBuffer<double> _buf(cn*4);
|
||||
double *s = (double*)_buf.data(), *sq = s + cn;
|
||||
int *sbuf = (int*)s, *sqbuf = (int*)sq;
|
||||
|
||||
Reference in New Issue
Block a user