boundRect.tl和boundRect.br什么意思

boundRect.tl和boundRect.br什么意思?

在opencv中boundingRect的用法:
1、boundingRect函数
函数作用:
计算轮廓的垂直边界最小矩形,矩形是与图像上下边界平行
2、boundingRect函数调用形式
C++: Rect boundingRect(InputArray points)
points 读入的参数必须是vector或者Mat点集
但是

rectangle(drawing, boundRect[i].tl(), boundRect[i].br(), color, 2, 8, 0);

boundRect[i].tl(), boundRect[i].br()指矩形的左上点和右下点,从而调用rectangle()函数绘制矩形。
tl——> top、left
br——>right、bottom

猜你喜欢

转载自blog.csdn.net/m0_45866718/article/details/108096186