mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Updated check on OutputArray to allow recreation of fixed_size for 1-d sizes array
This commit is contained in:
parent
398ebbac98
commit
3267fb90c6
@ -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,
|
void _OutputArray::create(int d, const int* sizes, int mtype, int i,
|
||||||
bool allowTransposed, int fixedDepthMask) const
|
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();
|
int k = kind();
|
||||||
mtype = CV_MAT_TYPE(mtype);
|
mtype = CV_MAT_TYPE(mtype);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user