Advertisement

OpenCV实例教程(二):图形绘制基础操作:line()、circle()、fillPoly()、ellipse()

阅读量:

OpenCV基本图形绘制函数应用

复制代码
    #include <opencv2/opencv.hpp>
    
    using namespace cv;
    
    #define WINDOW_NAME1 "【绘制图1】"        //为窗口标题定义的宏
    #define WINDOW_NAME2 "【绘制图2】"        //为窗口标题定义的宏
    #define WINDOW_WIDTH 600                 //定义窗口大小的宏
    
    void DrawEllipse(Mat img, double angle);//绘制椭圆
    void DrawFilledCircle(Mat img, Point center);//绘制圆
    void DrawPolygon(Mat img);//绘制多边形
    void DrawLine(Mat img, Point start, Point end);//绘制线段
    
    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);
    	// 创建空白的Mat图像
    Mat atomImage = Mat::zeros(W

全部评论 (0)

还没有任何评论哟~