Merge pull request #9853 from catree:fix_dnn_samples_python3

This commit is contained in:
Alexander Alekhin
2017-10-16 16:18:22 +00:00
4 changed files with 12 additions and 8 deletions
+5
View File
@@ -15,6 +15,11 @@ bool pyopencv_to(PyObject *o, dnn::DictValue &dv, const char *name)
dv = dnn::DictValue((int64)PyLong_AsLongLong(o));
return true;
}
else if (PyInt_Check(o))
{
dv = dnn::DictValue((int64)PyInt_AS_LONG(o));
return true;
}
else if (PyFloat_Check(o))
{
dv = dnn::DictValue(PyFloat_AS_DOUBLE(o));