diff --git a/xbob/ip/flandmark/flandmark.cpp b/xbob/ip/flandmark/flandmark.cpp index 2dfc39b836d05620b2841e6c00264aeba4744156..5dfd99ee402974400b916a02f771560d429e8090 100644 --- a/xbob/ip/flandmark/flandmark.cpp +++ b/xbob/ip/flandmark/flandmark.cpp @@ -31,6 +31,9 @@ static auto s_class = xbob::extension::ClassDoc( "You input an image and a bounding-box specification and it returns you the " "positions for multiple key-points for the given face image.\n" "\n" + "Consult http://cmp.felk.cvut.cz/~uricamic/flandmark/index.php for more " + "information.\n" + "\n" ) .add_constructor( xbob::extension::FunctionDoc( @@ -219,6 +222,8 @@ static PyObject* PyBobIpFlandmark_call_single(PyBobIpFlandmarkObject* self, if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&iiii", kwlist, &PyBlitzArray_Converter, &image, &y, &x, &height, &width)) return 0; + auto image_ = make_safe(image); + //check if (image->type_num != NPY_UINT8 || image->ndim != 2) { PyErr_Format(PyExc_TypeError, "`%s' input `image' data must be a 2D array with dtype `uint8' (i.e. a gray-scaled image), but you passed a %" PY_FORMAT_SIZE_T "d array with data type `%s'", Py_TYPE(self)->tp_name, image->ndim, PyBlitzArray_TypenumAsString(image->type_num));