I'm using the pyopencv bindings. This python lib uses boost::python to connect to OopenCV. Now I'm trying to use the SURF class but don't know how to handle the class operator in my python code.
The C++ class is defined as:
void SURF::operator()(const Mat& img, const Mat& mask,
vector<KeyPoint>& keypoints) const
{...}
How can I pass my arguments to that class?
Update: Thanks to interjay I can call the method but now I getting type errors. What would be the python boost::python::tuple ?
import pyopencv as cv
img = cv.imread('myImage.jpg')
surf = cv.SURF();
key = []
mask = cv.Mat()
print surf(img, mask, key, False)
Gives me that:
Traceback (most recent call last):
File "client.py", line 18, in <module>
print surf(img, mask, key, False)
Boost.Python.ArgumentError: Python argument types in
SURF.__call__(SURF, Mat, Mat, list, bool)
did not match C++ signature:
__call__(cv::SURF inst, cv::Mat img, cv::Mat mask,
boost::python::tuple keypoints,
bool useProvidedKeypoints=False)
__call__(cv::SURF inst, cv::Mat img, cv::Mat mask)