我正在尝试使用
我这样调用该函数:
我该如何纠正这个错误?
fillConvexPoly
函数填充遮罩中的三角形,但是我遇到了以下错误。OpenCV Error: Assertion failed (points.checkVector(2, CV_32S) >= 0) in fillConvexPoly, file /home/iris/Downloads/opencv-3.1.0/modules/imgproc/src/drawing.cpp, line 2256
terminate called after throwing an instance of 'cv::Exception'
what(): /home/iris/Downloads/opencv-3.1.0/modules/imgproc/src/drawing.cpp:2256: error: (-215) points.checkVector(2, CV_32S) >= 0 in function fillConvexPoly
我这样调用该函数:
cv::Mat mask = cv::Mat::zeros(r2.size(), CV_32FC3);
cv::fillConvexPoly(mask, trOutCroppedInt, cv::Scalar(1.0, 1.0, 1.0), 16, 0);
trOutCroppedInt定义如下:
std::vector<cv::Point> trOutCroppedInt
我将向该向量中添加3个点:
[83, 46; 0, 48; 39, 0]
我该如何纠正这个错误?