I'm trying to resize the rows of a ROI Mat, witch is a polygon with different row size, to the half of the cols of the original Mat, and so I thought of run through all the rows of the Roi Mat and resize each one.
for (int j = 0; j < crop.rows; j++)
{
if(pointPolygonTest( contours[0], Point2f((float)i,(float)j), true) > 0)
//resize(crop.row(j), crop.row(j), Size(img.rows, img.cols/2), 0, 0, CV_INTER_LINEAR);
}
What am I doing wrong? Thank you!