源码库源码:
typedef struct CvBox2D
{
CvPoint2D32f center; /* Center of the box. */ 中心点(x,y)
CvSize2D32f size; /* Box width and length. */ 尺度(width,height)
float angle; /* Angle between the horizontal axis */ 位移长度
/* and the first side (i.e. length) in degrees */
}
CvBox2D;
cvRectangle(image,cvPoint(track_box.center.x-20,track_box.center.y-20),cvPoint(track_box.center.x+20,track_box.center.y+20),CV_RGB(255,0,0), 3, CV_AA, 0 );
画椭圆框参数设置代码如下:
cvEllipseBox( image, track_box, CV_RGB(255,0,0), 3, CV_AA, 0 );
本文详细解析了CvBox2D结构的定义及其成员变量的含义,包括中心点、尺度和角度等,并提供了使用该结构进行矩形框和椭圆框绘制的代码实例。
2195

被折叠的 条评论
为什么被折叠?



