mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
This commit is contained in:
@@ -4021,6 +4021,11 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
|
||||
CV_OCL_RUN(_dst.isUMat(),
|
||||
ocl_reduce(_src, _dst, dim, op, op0, stype, dtype))
|
||||
|
||||
// Fake reference to source. Resolves issue 8693 in case of src == dst.
|
||||
UMat srcUMat;
|
||||
if (_src.isUMat())
|
||||
srcUMat = _src.getUMat();
|
||||
|
||||
Mat src = _src.getMat();
|
||||
_dst.create(dim == 0 ? 1 : src.rows, dim == 0 ? src.cols : 1, dtype);
|
||||
Mat dst = _dst.getMat(), temp = dst;
|
||||
|
||||
Reference in New Issue
Block a user