I have this void function in c++
void DrawFace(cv::Mat img, Window face)
{
int x1 = face.x;
int y1 = face.y;
int x2 = face.width + face.x - 1;
int y2 = face.width + face.y - 1;
int centerX = (x1 + x2) / 2;
int centerY = (y1 + y2) / 2;
std::vector<cv::Point> pointList;
pointList.push_back(RotatePoint(x1, y1, centerX, centerY, face.angle));
pointList.push_back(RotatePoint(x1, y2, centerX, centerY, face.angle));
pointList.push_back(RotatePoint(x2, y2, centerX, centerY, face.angle));
pointList.push_back(RotatePoint(x2, y1, centerX, centerY, face.angle));
DrawLine(img, pointList);
}
i wanted this to return me just the pointList vector for which i made this change
void Drawface(cv::Mat img, Window face)
{
int x1 = face.x;
int y1 = face.y;
int x2 = face.width + face.x - 1;
int y2 = face.width + face.y - 1;
int centerX = (x1 + x2) / 2;
int centerY = (y1 + y2) / 2;
std::vector<cv::Point> pointList;
pointList.push_back(RotatePoint(x1, y1, centerX, centerY, face.angle));
pointList.push_back(RotatePoint(x1, y2, centerX, centerY, face.angle));
pointList.push_back(RotatePoint(x2, y2, centerX, centerY, face.angle));
pointList.push_back(RotatePoint(x2, y1, centerX, centerY, face.angle));
return pointList
}
It would be really helpful if somebody could point out where i have gone wrong and what changes i could make.
Thanks in advance