return Py_None for an empty mat (should fix #1120)
This commit is contained in:
parent
619e503d53
commit
3b97f5d5e9
@ -234,6 +234,11 @@ static int pyopencv_to(const PyObject* o, Mat& m, const char* name = "<unknown>"
|
||||
|
||||
static PyObject* pyopencv_from(const Mat& m)
|
||||
{
|
||||
if( !m.data )
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
Mat temp, *p = (Mat*)&m;
|
||||
if(!p->refcount || p->allocator != &g_numpyAllocator)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user