resolved tickets #904 (nicer floating-point formatting) and #816 (reduce with CV_REDUCE_AVG on 8-bit arrays)

This commit is contained in:
Vadim Pisarevsky
2011-05-31 14:01:21 +00:00
parent 1299941622
commit 6de72ea8ee
2 changed files with 3 additions and 2 deletions

View File

@@ -1873,6 +1873,7 @@ void cv::reduce(const InputArray& _src, OutputArray _dst, int dim, int op, int d
op = CV_REDUCE_SUM;
if( sdepth < CV_32S && ddepth < CV_32S )
temp.create(dst.rows, dst.cols, CV_32SC(cn));
ddepth = CV_32S;
}
ReduceFunc func = 0;