第37月第22天 opencv 外接矩阵
1.
RotatedRect rect = minAreaRect(pointxy);//查找最小外接矩形 Point2f P[4]; rect.points(P);//外接矩形的四个顶点 for (int j = 0; j <= 3; j++) { line(imageContours, P[j], P[(j + 1) % 4], Scalar(128), 2); }
1.
RotatedRect rect = minAreaRect(pointxy);//查找最小外接矩形 Point2f P[4]; rect.points(P);//外接矩形的四个顶点 for (int j = 0; j <= 3; j++) { line(imageContours, P[j], P[(j + 1) % 4], Scalar(128), 2); }