From 19ae44a454c3cace7501f74392fc1160e50934f6 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 3 Sep 2024 17:41:31 +0300 Subject: [PATCH] C-API cleanup: removed unnecessary python adapter from ml module --- modules/ml/misc/python/pyopencv_ml.hpp | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 modules/ml/misc/python/pyopencv_ml.hpp diff --git a/modules/ml/misc/python/pyopencv_ml.hpp b/modules/ml/misc/python/pyopencv_ml.hpp deleted file mode 100644 index 564eba5fac..0000000000 --- a/modules/ml/misc/python/pyopencv_ml.hpp +++ /dev/null @@ -1,22 +0,0 @@ -template<> -bool pyopencv_to(PyObject *obj, CvTermCriteria& dst, const ArgInfo& info) -{ - CV_UNUSED(info); - if(!obj) - return true; - return PyArg_ParseTuple(obj, "iid", &dst.type, &dst.max_iter, &dst.epsilon) > 0; -} - -template<> -bool pyopencv_to(PyObject* obj, CvSlice& r, const ArgInfo& info) -{ - CV_UNUSED(info); - if(!obj || obj == Py_None) - return true; - if(PyObject_Size(obj) == 0) - { - r = CV_WHOLE_SEQ; - return true; - } - return PyArg_ParseTuple(obj, "ii", &r.start_index, &r.end_index) > 0; -} \ No newline at end of file