From 3267fb90c66ff85d1ffe7066785a5ff555bbe1d1 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Tue, 6 Feb 2018 17:04:53 +0300 Subject: [PATCH] Updated check on OutputArray to allow recreation of fixed_size for 1-d sizes array --- modules/core/src/matrix_wrap.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/core/src/matrix_wrap.cpp b/modules/core/src/matrix_wrap.cpp index 0644905c21..3fead37cbb 100644 --- a/modules/core/src/matrix_wrap.cpp +++ b/modules/core/src/matrix_wrap.cpp @@ -1277,6 +1277,14 @@ void _OutputArray::create(int _rows, int _cols, int mtype, int i, bool allowTran void _OutputArray::create(int d, const int* sizes, int mtype, int i, bool allowTransposed, int fixedDepthMask) const { + int sizebuf[2]; + if(d == 1) + { + d = 2; + sizebuf[0] = sizes[0]; + sizebuf[1] = 1; + sizes = sizebuf; + } int k = kind(); mtype = CV_MAT_TYPE(mtype);