怎么画一条直线cvLine

于老师的书上写的是"cvLine()是绘图函数中最简单的"

void cvLine
(
    Cv Arr* array,    //画哪儿
    CvPoint pt1,       //起点 
    CvPoint pt2,        //终点
    CvScalar color,     //颜色
    int thickness = 1 ,   //多粗
    int connectivity=8     // 反走样模式
);

thickness单位是像素.

最后一个参数connectivity,反走样模式

=8 :

  8连通,较为平滑不会走样

=4 :

  4连通,斜线会产生重叠,看上去过于粗重,画线速度很快

 

 

posted @ 2012-11-10 13:50  Jun14  阅读(1169)  评论(0编辑  收藏  举报