Ask Your Question

Revision history [back]

You have to change your code to below.

std::vector<point> contour;

    contour.push_back(normImgTop);
    contour.push_back(normImgEyebrowInner);
    contour.push_back(normImgCNoseTip);
    contour.push_back(normImgCNoseBase);
    contour.push_back(normImgTopLip);
    contour.push_back(normImgDownLip);
    contour.push_back(normImgTipOfChin);
    contour.push_back(normImgBottom);
    contour.push_back(normImgBottomRight);
    contour.push_back(normImgTopRight);

    vector<vector<Point>> contours;
     contours.push_back(contour):
    // draw the polygon
    polylines(roi, contours, true, Scalar(255), CV_AA);

You have to change your code to below.

std::vector<point> contour;

       std::vector<Point> contour;

        contour.push_back(normImgTop);
     contour.push_back(normImgEyebrowInner);
     contour.push_back(normImgCNoseTip);
     contour.push_back(normImgCNoseBase);
     contour.push_back(normImgTopLip);
     contour.push_back(normImgDownLip);
     contour.push_back(normImgTipOfChin);
     contour.push_back(normImgBottom);
     contour.push_back(normImgBottomRight);
     contour.push_back(normImgTopRight);

     vector<vector<Point>> contours;
      contours.push_back(contour):
     // draw the polygon
     polylines(roi, contours, true, Scalar(255), CV_AA);