fixed building Python wrappers when Numpy is not available

This commit is contained in:
Vadim Pisarevsky
2010-11-03 17:57:51 +00:00
parent 37c1204d55
commit 8a8ba57b20
5 changed files with 29 additions and 7 deletions

View File

@@ -693,4 +693,11 @@ static inline PyObject* pyopencv_from(const Moments& m)
"nu30", m.nu30, "nu21", m.nu21, "nu12", m.nu12, "mu03", m.nu03);
}
static inline PyObject* pyopencv_from(const CvDTreeNode* node)
{
double value = node->value;
int ivalue = cvRound(value);
return value == ivalue ? PyInt_FromLong(ivalue) : PyFloat_FromDouble(value);
}
#endif