Let's analyze the line of violation:
const Point *elementPoints [1] = { contourElement.at(0) };
You declared contourElement
as vector <vector<Point> >
, which means that contourElement.at(0)
returns vector<Point>
, not const cv::Point*
. So, the first mistake.
In the end you need to do something like:
vector<Point> tmp = contourElement.at(0); const Point* elementPoints[1] = { &tmp[0] }; int numberOfPoints = (int)tmp.size();
Later, name it as:
fillPoly (contourMask, elementPoints, &numberOfPoints, 1, Scalar (0, 0, 0), 8);
source share