mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
Merge pull request #64 from vpisarev/bugs_1939_2100
This commit is contained in:
commit
59452dfc6f
@ -279,11 +279,14 @@ static int pyopencv_to(const PyObject* o, Mat& m, const ArgInfo info, bool allow
|
||||
needcopy = true;
|
||||
}
|
||||
|
||||
if( ismultichannel && _strides[1] != (npy_intp)elemsize*_sizes[2] )
|
||||
needcopy = true;
|
||||
|
||||
if (needcopy)
|
||||
{
|
||||
if (info.outputarg)
|
||||
{
|
||||
failmsg("output array %s is not row-contiguous (step[ndims-1] != elemsize)", info.name);
|
||||
failmsg("Layout of the output array %s is incompatible with cv::Mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels)", info.name);
|
||||
return false;
|
||||
}
|
||||
if( needcast )
|
||||
|
Loading…
Reference in New Issue
Block a user