I am trying to communicate between python and c++. Here is the link to the main source code I am using: https://github.com/rajatsaxena/pyImageListToVectorMatcpp which is mostly inspired from here https://github.com/Algomorph/pyboostcvconverter. I want to be able to take a tuple of numpy array (OpenCV images) at python end, the process in c++ and then finally return a tuple of numpy array (OpenCV images).
But I start getting this error:
In function ‘PyObject* pbcvt::getStitchingParams(PyObject*)’:
/home/**/pyImageListToVectorMatcpp/src/python_module.cpp:96:69: error: cannot convert ‘std::vector<cv::Mat>’ to ‘PyObject* {aka _object*}’ for argument ‘1’ to ‘std::vector<cv::Mat> pbcvt::fromTupleToVector(PyObject*)’
vector<Mat> InputImage = pbcvt::fromTupleToVector(InputImage);
^
/home/**/pyImageListToVectorMatcpp/src/python_module.cpp: In function ‘void pbcvt::init_module_pbcvt()’:
/home/**/pyImageListToVectorMatcpp/src/python_module.cpp:459:34: error: too few arguments to function ‘std::vector<cv::Mat> pbcvt::fromTupleToVector(PyObject*)’
pbcvt::fromTupleToVector();
^
In file included from /home/**/pyImageListToVectorMatcpp/src/python_module.cpp:4:0:
/home/**/pyImageListToVectorMatcpp/include/pyImageListToVectorMatcpp.hpp:73:13: note: declared here
vector<Mat> fromTupleToVector(PyObject* o);
^
make[2]: *** [CMakeFiles/pbcvt.dir/src/python_module.cpp.o] Error 1
make[1]: *** [CMakeFiles/pbcvt.dir/all] Error 2
make: *** [all] Error 2
This is because of some problem with my tuple to vector converter script src/pyboost_cv2_converter.cpp obviously which I am not being able to figure out.