Te second parameter is supposed to be InputArrayOfArrays whereas you have made it into a single vector. You should change it back to a std::vector<std::vector<cv::Point> and it should work.