From f78bb2c4e7317a9fa207f852334012a69fcd77fa Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 23 May 2017 22:01:35 +0300 Subject: [PATCH] fixed shape() function (#1177) --- modules/dnn/include/opencv2/dnn/shape_utils.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/dnn/include/opencv2/dnn/shape_utils.hpp b/modules/dnn/include/opencv2/dnn/shape_utils.hpp index 23b9b1cd92..7ecc8dd067 100644 --- a/modules/dnn/include/opencv2/dnn/shape_utils.hpp +++ b/modules/dnn/include/opencv2/dnn/shape_utils.hpp @@ -130,14 +130,9 @@ static inline MatShape shape(const int* dims, const int n = 4) return shape; } -static inline MatShape shape(const MatSize& size) -{ - return shape((const int*)size, size.dims()); -} - static inline MatShape shape(const Mat& mat) { - return shape(mat.size); + return shape(mat.size.p, mat.dims); } namespace {inline bool is_neg(int i) { return i < 0; }}