Skip to content

Commit b4ddf3d

Browse files
committed
Merge pull request opencv#10678 from terfendail:OutputArray_recreate
2 parents 42b25d7 + 3267fb9 commit b4ddf3d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/core/src/matrix_wrap.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,14 @@ void _OutputArray::create(int _rows, int _cols, int mtype, int i, bool allowTran
12771277
void _OutputArray::create(int d, const int* sizes, int mtype, int i,
12781278
bool allowTransposed, int fixedDepthMask) const
12791279
{
1280+
int sizebuf[2];
1281+
if(d == 1)
1282+
{
1283+
d = 2;
1284+
sizebuf[0] = sizes[0];
1285+
sizebuf[1] = 1;
1286+
sizes = sizebuf;
1287+
}
12801288
int k = kind();
12811289
mtype = CV_MAT_TYPE(mtype);
12821290

0 commit comments

Comments
 (0)