From 24379fcb5fdcbecb48c3057cbefe332525d04a60 Mon Sep 17 00:00:00 2001 From: Tetragramm Date: Thu, 10 Nov 2016 21:35:00 -0600 Subject: [PATCH] Use transpose() as suggested, because it works on pre-existing destination Mats. --- modules/core/src/copy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/copy.cpp b/modules/core/src/copy.cpp index 259b71c645..1dd56f3cfe 100644 --- a/modules/core/src/copy.cpp +++ b/modules/core/src/copy.cpp @@ -833,14 +833,14 @@ static bool ocl_rotate(InputArray _src, OutputArray _dst, int rotateMode) switch (rotateMode) { case ROTATE_90_CLOCKWISE: - _dst.getUMat() = _src.getUMat().t(); + transpose(_src, _dst); flip(_dst, _dst, 1); break; case ROTATE_180: flip(_src, _dst, -1); break; case ROTATE_90_COUNTERCLOCKWISE: - _dst.getUMat() = _src.getUMat().t(); + transpose(_src, _dst); flip(_dst, _dst, 0); break; default: @@ -859,14 +859,14 @@ void rotate(InputArray _src, OutputArray _dst, int rotateMode) switch (rotateMode) { case ROTATE_90_CLOCKWISE: - _dst.getMat() = _src.getMat().t(); + transpose(_src, _dst); flip(_dst, _dst, 1); break; case ROTATE_180: flip(_src, _dst, -1); break; case ROTATE_90_COUNTERCLOCKWISE: - _dst.getMat() = _src.getMat().t(); + transpose(_src, _dst); flip(_dst, _dst, 0); break; default: