lovely
here’s the older (~4.6.0) one:
static PyObject* pyopencv_cv_Feature2D_compute(PyObject* self, PyObject* py_args, PyObject* kw)
{
using namespace cv;
Ptr<cv::Feature2D> * self1 = 0;
if (!pyopencv_Feature2D_getp(self, self1))
return failmsgp("Incorrect type of self (must be 'Feature2D' or its derivative)");
Ptr<cv::Feature2D> _self_ = *(self1);
pyPrepareArgumentConversionErrorsStorage(4);
{
PyObject* pyobj_image = NULL;
Mat image;
PyObject* pyobj_keypoints = NULL;
vector_KeyPoint keypoints;
PyObject* pyobj_descriptors = NULL;
Mat descriptors;
const char* keywords[] = { "image", "keypoints", "descriptors", NULL };
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OO|O:Feature2D.compute", (char**)keywords, &pyobj_image, &pyobj_keypoints, &pyobj_descriptors) &&
pyopencv_to_safe(pyobj_image, image, ArgInfo("image", 0)) &&
pyopencv_to_safe(pyobj_keypoints, keypoints, ArgInfo("keypoints", 1)) &&
pyopencv_to_safe(pyobj_descriptors, descriptors, ArgInfo("descriptors", 1)) )
{
ERRWRAP2(_self_->compute(image, keypoints, descriptors));
return Py_BuildValue("(NN)", pyopencv_from(keypoints), pyopencv_from(descriptors));
}
pyPopulateArgumentConversionErrors();
}
{
PyObject* pyobj_image = NULL;
UMat image;
PyObject* pyobj_keypoints = NULL;
vector_KeyPoint keypoints;
PyObject* pyobj_descriptors = NULL;
UMat descriptors;
const char* keywords[] = { "image", "keypoints", "descriptors", NULL };
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OO|O:Feature2D.compute", (char**)keywords, &pyobj_image, &pyobj_keypoints, &pyobj_descriptors) &&
pyopencv_to_safe(pyobj_image, image, ArgInfo("image", 0)) &&
pyopencv_to_safe(pyobj_keypoints, keypoints, ArgInfo("keypoints", 1)) &&
pyopencv_to_safe(pyobj_descriptors, descriptors, ArgInfo("descriptors", 1)) )
{
ERRWRAP2(_self_->compute(image, keypoints, descriptors));
return Py_BuildValue("(NN)", pyopencv_from(keypoints), pyopencv_from(descriptors));
}
pyPopulateArgumentConversionErrors();
}
{
PyObject* pyobj_images = NULL;
vector_Mat images;
PyObject* pyobj_keypoints = NULL;
vector_vector_KeyPoint keypoints;
PyObject* pyobj_descriptors = NULL;
vector_Mat descriptors;
const char* keywords[] = { "images", "keypoints", "descriptors", NULL };
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OO|O:Feature2D.compute", (char**)keywords, &pyobj_images, &pyobj_keypoints, &pyobj_descriptors) &&
pyopencv_to_safe(pyobj_images, images, ArgInfo("images", 0)) &&
pyopencv_to_safe(pyobj_keypoints, keypoints, ArgInfo("keypoints", 1)) &&
pyopencv_to_safe(pyobj_descriptors, descriptors, ArgInfo("descriptors", 1)) )
{
ERRWRAP2(_self_->compute(images, keypoints, descriptors));
return Py_BuildValue("(NN)", pyopencv_from(keypoints), pyopencv_from(descriptors));
}
pyPopulateArgumentConversionErrors();
}
{
PyObject* pyobj_images = NULL;
vector_UMat images;
PyObject* pyobj_keypoints = NULL;
vector_vector_KeyPoint keypoints;
PyObject* pyobj_descriptors = NULL;
vector_UMat descriptors;
const char* keywords[] = { "images", "keypoints", "descriptors", NULL };
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OO|O:Feature2D.compute", (char**)keywords, &pyobj_images, &pyobj_keypoints, &pyobj_descriptors) &&
pyopencv_to_safe(pyobj_images, images, ArgInfo("images", 0)) &&
pyopencv_to_safe(pyobj_keypoints, keypoints, ArgInfo("keypoints", 1)) &&
pyopencv_to_safe(pyobj_descriptors, descriptors, ArgInfo("descriptors", 1)) )
{
ERRWRAP2(_self_->compute(images, keypoints, descriptors));
return Py_BuildValue("(NN)", pyopencv_from(keypoints), pyopencv_from(descriptors));
}
pyPopulateArgumentConversionErrors();
}
pyRaiseCVOverloadException("compute");
return NULL;
}
if you take a sharp look, it differs wrt. input parsing:
old (mine):
if( PyArg_ParseTupleAndKeywords(py_args, kw, "OO|O:Feature2D.compute", (char**)keywords, &pyobj_image, &pyobj_keypoints, &pyobj_descriptors)
new (yours):
if( PyArg_ParseTupleAndKeywords(py_args, kw, "O|O:Feature2D.compute", (char**)keywords, &pyobj_image, &pyobj_descriptors)
also missing there:
PyObject* pyobj_keypoints = NULL;
and:
pyopencv_to_safe(pyobj_keypoints, keypoints, ArgInfo("keypoints", 1))
so, the new version has lost an (input) O
in the format string, as well as &pyobj_keypoints
in the following argslist !
this is clearly broken
please report to upper echelons