我试图实现this的答案,但我总是得到错误。请帮忙。openCV没有匹配函数fillPoly
我的代码:
这是我的错误:
jni/jni_detections/jni_face_det.cpp:121:5: error: no matching function for call to 'fillPoly'
cv::fillPoly(mask, corner_list, num_points, num_polygons, cv::Scalar(255, 255, 255), line_type);
^~~~~~~~~~~~
/home/feli/Development/android/test/dlib/dlib-android/third_party/opencv/jni/include/opencv2/imgproc.hpp:3987:17: note:
candidate function not viable: no known conversion from 'int' to 'const int *' for 3rd argument; take the address of
the argument with & CV_EXPORTS void fillPoly(Mat& img, const Point** pts,
^
/home/feli/Development/android/test/dlib/dlib-android/third_party/opencv/jni/include/opencv2/imgproc.hpp:4005:19: note:
candidate function not viable: no known conversion from 'const Point *[1]' to 'const cv::_InputArray' for 2nd argument
CV_EXPORTS_W void fillPoly(InputOutputArray img, InputArrayOfArrays pts,
^
我OpenCV的版本是3.1.0
看起来你需要改变'CV ::标量(255)''来简历:: Scalar(255,255,255)' –
或Scalar :: all(255)。 –
“第三个参数没有从'int'到'const int *'的已知转换” - 第三个参数需要是一个指向整数的指针,而不是像你所拥有的整数常量。 |另外'CV_8UC2'对于面具看起来很奇怪。为什么2个频道? –