opencv画图函数

画线函数line

Point a = Point (600,600); 

line(picture,a,center,Scalar(255,0,0));  //参数为:要画线的图像、起始点、结束点、颜色、粗细、线型  

imshow("picture",picture);  

画矩形函数rectangle

rectangle(picture,a,center,Scalar(0,0,255));  //参数为:源图像、顶点、对角点、颜色、粗细、大小  

imshow("picture",picture); 

画椭圆函数ellipse

ellipse(picture,center,Size( 250, 100 ),0,30,240,Scalar(0,0,0));// 参数为:源图像、圆心、长短轴、径向夹角(水平面到长轴的夹角)、起始角度(长轴到起始边沿的夹角)、结束角度(长轴到结束点的夹角)、倾斜的矩形(可选项)、颜色、粗细、线性、偏移 

imshow("picture",picture);

画圆函数circle

circle(picture,Point(x,y),5,Scalar(0,0,0));  //参数为:源图像、圆心、半径、颜色、粗细、线型  

imshow("picture",picture);  

 


你可能感兴趣的:(opencv,画图)