void universalFunc::drawRect(Mat src, Mat &dest, vector<Feather> featherList)
{
dest = src.clone();
for (int i = 0; i < featherList.size(); i++)
{
int x1 = featherList[i].boundingbox.x, y1 = featherList[i].boundingbox.y;
int width = featherList[i].boundingbox.width, height = featherList[i].boundingbox.height;
int x2 = x1 + width, y2 = y1 + height;
Point point1(x1, y1), point2(x2, y2);
rectangle(dest, point1, point2, Scalar(0, 0, 255), 3);
}
}
OpenCV 绘制矩形
最新推荐文章于 2024-04-26 21:00:33 发布